Roslaunch Magni Rviz

OK! This thread has been going on for a while so let’s just go back to the beginning and make sure that everything is working right before we try to jump in to solutions. So let’s just go step by step one thing at a time.

  1. Confirm that you battery is fully charged e.g. check that when you plug the robot in that the charge light goes red the fan switched on the fan and ran for a little bit before the light changes to green and the fan turns off. The core systems of the robot (e.g. the main computer) is designed to still run on a low battery, because otherwise how is the robot going to know that the battery is low. This creates confusion because sometimes there is odd behavior due to a low battery but the main computer is still running so people think everything is OK.

  2. Confirm you can switch the robot on and that you have 5 lights on main control board right above the charging port and that the top light is blinking briefly approximately once every 6 seconds.

  3. Confirm that each wheel resists movement - they both are actively controlled and will sense an attempt to turn them manually. You should feel resistance if you try to move a wheel and it should spring back a little bit.

  4. Now connect to the robot WiFi and SSH in to the (this is in the documentation and I believe you know how to do this) if you don’t I can give detailed instructions. Do not try to run RVIZ or share topics yet

  5. Once you are logged in to the robot through a terminal on the robot type:
    rosrun teleop_twist_keyboard teleop_twist_keyboard

  6. This should run teleop and you should be able to drive the robot around with the keys i,j,l
    if that is running fine and there aren’t any problems then CTRL-C

  7. Run fiducial follow. In general fiducial follow works best if the fiducial is about 2 meters away so place the fiducial there in plain view of the camera. The robot should follow the fiducial and generally move around looking at the fiducial.

  8. If its not working as expected exit fiducial follow and type:
    rostopic list

And share what you find here.

1 Like

Hi @davecrawley

I have responded back to you in bold and I look forward to your response in resolving my long period issue,

  1. I have confirmed the battery is full , see the video links below of my verification

  1. Yes, the main control board 5 lights and the top light blinks every 6 seconds , see the video links below of my verification
  1. Confirmed that each wheel resists movement - see the video links below of my verification
  1. Connected to the robot WiFi and SSH in to the - done

  2. Once you are logged in to the robot through a terminal on the robot type:
    rosrun teleop_twist_keyboard teleop_twist_keyboard - Done

  3. This should run teleop and you should be able to drive the robot around with the keys i,j,l
    if that is running fine and there aren’t any problems then CTRL-C - done - no problems in doing this, - see the video links below of my verification

7. Run fiducial follow - it didnt work (Problem here) - please see video below

  1. done on rostopic list - see output below :

I have teamviewer, can you remote in to my Magni and check what is wrong ? It will be faster , my Magni is connected to my home wifi network which you can remote in to check

Please help to resolve,
Thanks

Hi @inmoov,

I think a good next step would be for you to see what your Pi is seeing. For all of this, I would recommend having your Magni up on blocks so that the wheels can spin without actually moving the Magni.

You will need a workstation running ROS, either natively on Linux or in a VM with a network adapter in bridge mode. First make sure that the robot and your workstation are on the same wifi network.

Then run fiducial follow on the robot.

roslaunch magni_demos fiducial_follow.launch

Then set these environment variables on the workstation:

export ROS_MASTER_URI=http://ROBOT_HOSTNAME.local:11311
export ROS_HOSTNAME=WORKSTATION_HOSTNAME.local

In that same shell run:

rosrun rqt_image_view rqt_image_view

In the GUI that comes up, you can select the /raspicam_node/image/compressed topic to see what the robot sees. You can also select the /fiducial_images/compressed topic to see the fiducial detections overlayed onto the image.

You should experiment with this to make sure that your fiducials are being detected correctly.

Rohan

Hi @rohbotics,

ok, I followed your instructions, and here is the result,

does this look to you that the fiducial are being detected correctly? this marker 49 ,

every time I put this in front of the camera, the wheels are just non stop spinning ,

I’m not sure why it took you so long to respond back to my issue, but I had this issue for over 17 days now, thats over two weeks since I got this robot , and I still couldnt get fiducial follow me to work, I’m very frustrated at this ,

in your youtube promotion video, it seems so easy …, but I struggled alot with it,

please reply back to me with resolution promptly please,

awaiting for your response,

Hi @davecrawley,

Have you replicated this issue that I’m having? any solution please?

Hi @inmoov

Sorry again for the delay in response. Your fiducial detection looks correct, thanks for posting that.

It seems like there is an inconsistency in the code, as @johnnyv noticed, fiducial_follow is actually configured for an odd fiducal size by default. The fact that your marker is the proper 14cm makes the robot think that it is much closer to the marker than it really is, causing it to back up. I have filed an issue for this inconsistency.

As a temporary fix, you can pass in the fiducial size manually roslaunch magni_demos fiducial_follow.launch fiducial_len:=0.14

Once you do that, you can put Magni up on blocks and move the marker around in front of it. When the marker is around 0.6 meters away and centered in the view, the wheels should slow down or stop.

Rohan

Hi @rohbotics,

I tried your suggestion on your temporary fix, it didnt fix alright

I moved back like 3 meters away and the wheels never stops…,

see video below

I even placed the marker 49 at the camera level at the very center…, wheels dont stop…is just non stop moving , even at 3 meters away…

Please provide a Valid solution ,

Hi @inmoov,

Quick question: are the wheels spinning forward or backward in that video? I can’t tell.

If they are moving forward, that makes sense because the robot is trying to get closer to the marker. fiducial_follow tries to move the robot in a way that brings it about 60cm away from the marker.

Rohan

no @rohbotics,

One wheel is moving forward and the other wheel is moving backward, so this kind of movement, it seems to be rotating , anyways, by the time I moved 60 cm away, it should stop but it didnt…so I Moved further away, and the wheels just keeps spinning non stop like how I described …

Ok thanks, for the info.

Trying to debug further here: What is the contents of /etc/ubiquity/robot.yaml your pi?

Rohan

@rohbotics

Here below is the contents you are after:

Please help to resolve, it is still a big problem to me

The problem is that your configuration says that the camera is positioned upward, but your actual camera is in the forward position. Please change this to “forward” (you will need to use sudo when you open the file in nano)

Fiducial_follow needs the camera position in order to figure out where the fiducial it sees is relative to the robot. Right now it sees the fiducial, but thinks it is somewhere else, and then when it tries to move towards it, it makes no progress, causing it to keep moving.

@rohbotics

I followed your suggestion and corrected it , see below

it recognize the marker which I can see in the rqt_image_view (fiducial image view),

but IT DOES THE SAME thing again, like my recordings in the youtube videos… still very frustrated, please help to Resolve!

@rohbotics, ok this worked!! I had to restart the Pi for the changes to kick it, editing the robot.yaml file to position Forward really does the trick! I’m glad it is finally working,

I got a question now on the camera ribbon, it is quite short in length, and I want to get a longer cable for it,
below is a link for it, can you let me know if this suits? (15cm in length)

Thank you

Hello, I am not following this thread but yes you may use that 15cm cable. I have run much longer cables with success.

These camera cables are extremely picky in proper insertion into the connectors and of course putting them in backwards makes camera not even work. Please note very carefully before removal which way the contacts on the cable go and be aware you really must insert the cable all the way. It is VERY easy to not have it in all the way and then the camera does not work.

Pay close attention and do not rush when you look at this page: https://learn.ubiquityrobotics.com/camera_sensors

Thank you,
mark

Hi @mjstn2011,

Thanks for reply, I will get those cables soon then.

Additional followup. We are starting to characterize use of 40cm and longer cables. I would not recommend that just yet but just letting you know on the side that we are having good results even with longer cables than 40cm using proper routing of the cable.

There are people with entries on forums on the web using cables I personally feel are WAY too long. keep in mind I look at these cables with an RF network analyzer so perhaps I am too cautious.

Some people are reporting using EXTREMELY long cables like 2 meters. To me that is highly risky and judging by the debates one could argue that if there is a debate it is likely approaching or exceeding design limits that are conservative.

Here is just one link found quickly but it seems to present points I would agree with in first few posts, I did not read entire post.

So I myself would become cautious on lengths approaching a meter as an upper bound.

thus 15cm is well within reasonable limits for a sound design.

Take care,
Mark

1 Like

@mjstn2011, another question here,

Is it possible that I can run a more powerful computer than rasperri Pi on Magni?
if can, do I need to connect these two computers to the main motherboard? or how does it work?

thanks
Roger

The most powerful model we offer right now is the Raspberry Pi 4 which we only recommend if you have a MCB rev 5.2 due to a power supply limitations on earlier boards we introduced prior to even knowning there was going to be a Raspberry Pi 4. The Pi 4 came out very recently so we did not know about it till it was announced but fortunately the Pi 4 seems to work on MCB 5.2.

This is all I could say we offer at this time. We only know of other things other customers have done or we have experimented with which I list below but cannot recommend unless the customer is a very experienced Linux/ROS user who has done this sort of system before.

One way people get more graphics processing ability is to run a second more powerful CPU mounted on the magni for a dual CPU board ROS environment all on same network. They use a separate CPU board like the Nvidia Jetson Nano as a second ROS system that uses the Magni Raspberry Pi as the ROS master and they form a ROS based system and tell the Magni where to drive.

We do not have any sort of application note for this type of setup which is very advanced.

Some even more highly advanced customers are putting together systems to completely replace the Raspberry Pi and use a different and more powerful CPU board but those are proprietary solutions and even more involved than the two cpu ROS system approach.