Roslaunch Magni Rviz

Hi @rohbotics, @davecrawley

Any updates on my Fiducial Follow issue please?

Thanks

hey @inmoov, for my two cents, in that video you never went close to the robot. Try seeing if you can get the fiducial in the frame of the robot’s camera.
You could use RVIZ to see what the camera sees. I think you can get rviz up by running the following command on your VM roslaunch magni_viz view_nav.launch

@johnnyv,

because if you see in the video, I was more further away, as soon as I hold up the mark 49, it started spinning around, and if I move more closer, the magni will hit the table behind it already damaging my table and Magni itself, that’s what will happen,

@rohbotics

have you got other suggestions for me? Fiducial Follow, I’m still stuck on, couldnt get it to work,

interesting, although I didn’t observe you moving towards the robot in that video though…

One thing though, if you look in the definition of the fiducial_follow launch file, you can see the argument fiducial_len, which by default is set to 0.0982.

When I printed the fiducials out on a4 without turning off scaling they came out as 0.136m wide. Perhaps fiducial follow thinks that your fiducial is much too big and magni is backing off to make it look smaller?

One way to fix this would be to measure (to within the mm) the actual size of your fiducial patch and then update your launch file accordingly.

Also, do you have access to a larger outdoor area where you can test this without potentially damaging your magni or a table?

@johnnyv ok but I thought @rohbotics mentioned “{The marker size should be exactly 14cm for slam purposes, but it shouldn’t matter too much for fiducial follow. If you want a specific marker size you will need to play with your printer settings to make sure that you are printing 1:1 scale. }”

so I thought the size of the mark 49 at 13.6cm dont matter, and it should work,

so are you telling me to try print 1:1 scale for the exact 14cm of the marker 49?

at this stage, I’m not confident in modifying the original fiducial_follow.launch file…, just afraid of mucking it up…,

hey @inmoov yeah, I am suggesting that you should modify your fiducial_follow.launch file. I’m not 100% sure that this is your problem, but certainly it will be affecting things.
I’m not suggesting you try to print 1:1 to match the 14cm scale though, as that won’t change the fact that the fiducial follow app is expecting the fiducial to be 9.82cm, and so will want to stay further away than expected from the fiducial. If you could somehow print a fiducial that was exactly 9.82cm then that would be better.

Probably the safest thing you could do is take the robot somewhere that it can drive without damaging itself or something else. Like, maybe you could find an unused tennis court? I’m sure the court owner might find the whole situation interesting enough to let you use it when no-one else is there.

Once you are somewhere that the robot can reverse without breaking things, you might find that it stops at a certain distance, and then moves backwards and forwards with you and the fiducial.

Just very confused @johnnyv , because you are telling me one thing and @rohbotics is telling me the other, are you both the software engineers for Ubiquity Robotics?

Hi @inmoov no I don’t work for ubiquity I’m just a random person on the internet. You should probably trust @rohbotics more.

THANKS @johnnyv , now I have to struggle on printing a 1:1 marker 49,

Hi @johnnyv, All,

I ran the command in the VM as you suggested (roslaunch magni_viz view_nav.launch) , so how do I see what the camera see in there? I see no image,

I can ssh into Magni though,

Any suggestions please?

Thanks

Hi @johnnyv,

Also , I had printed 1:1 scale of the Marker 49 (pdf)

And that didnt work, Magni does the same thing, when it sees this mark, it backs off and start spinning in circle like in the videos I posted.

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 …