Roslaunch Magni Rviz

You should be able to get fiducial follow working by running the launch file on the Pi and placing fiducial 49 in front of the robot.

@rohbotics, well that’s the problem, when I place the mark 49 in front of it, Magni moved backwards and starts spinning around and around…, and it does not follow the Fiducial 49 , and I’m just running the fiducial_follow.launch in the Pi (not VM), see link below,

Please let me know what I done wrong here,

Hi @inmoov, I haven’t gotten fiducial_follow working (I need slam for my application), but I recall reading about it. I think the spinning behaviour occurs when it can’t see the fiducial anymore, it spins to try and find one. However, the other behaviour that you might be experiencing is the robot is trying to maintain a specific distance away from the fiducial, if you move it too close to the camera the robot might move backwards, but then if you move the fiducial out of view it might start spinning, so thats how I think you got the move backwards and spin.
I suggest doing everything but start the magni with alot of space between it and the fiducial and then slowly walk towards the magni untill it starts moving towards you.

The other trap that I fell into with fiducial_slam is that if you “just print” them you can get incorrect sizes, we printed a bunch of them and then when we measured them they were 13.6cm accross instead of 14cm accross. The magni uses the size of the fiducial to guage the distance, so if its too small it will get really close, and if its too big it will try and stay really far away. (that said it probably shouldn’t really matter for fiducial follow, but the 0.4cm error can add up when you are doing slam navigation.

On thing though, at 0.47 seconds some blurry red text flashes accross the screen, I wonder whats written in it:

Anyway, you’re almost there, I think everything is working!

@rohbotics, this is the warning below, I cannot stress enough that I didnt modify anything in the Pi itself,

Also, you are right, Fiducial 49 is only 13.6cm when printed from the PDF in this website, https://learn.ubiquityrobotics.com/quick_start/49.pdf

How come it is not 140cm?? do you have the 140 cm exact version?

Thanks

@rohbotics @johnnyv

Again I did not modify anything in the Pi,

This is the other warning while running Fiducial follow, …, why is that?

hi @inmoov, yeah thats a normal message. Eventually your hard drive will run out of space because it will be full of ros logs, but for the moment you can ignore it I guess.

The fiducial size shouldn’t matter too much, but if you do slam you should either print them out the correct size, or do what I did and change the settings in the launch files (although there are lots of places its hard-coded in as 14cm).

I’m not too sure about the camera calibration, I haven’t calibrated my camera yet and things are working ok, @rohbotics, should we go through the effort? My understanding is that the calibration will reduce abberations in the lens of the camera… I guess now that I think about it I probably should do it…

@inmoov anyway, did you try giving the magni more space and slowly walking towards it from far away with the fiducial?

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.

Camera calibration is not required for fiducial follow, although it will make it marginally more accurate. It is highly recommended for fiducial slam @johnnyv.

@inmoov try moving further back from the magni and holding the marker higher up so that it is in the field of view. I would try ~4 feet or ~125cm off the ground.

Rohan

@rohbotics, This time I stand further away with Fiducial 49 , when Magni sees it , it spins around straight away, I dont even get a chance to walk slowly towards it. I’m around 170cm tall and I hold the marker around up to my chest so I guess it is around 125cm above the ground level, and it still does the same thing…, see below:

so I reckon Magni somehow sees it (I’m already further away…) , and it just spins itself straight away…,
Please help to resolve, really scratching my head…,

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.