Move_basic tutorial / is my map ok?


#21

You’ll note that your robot has two potential positions for the camera. The forward facing position is how the robot ships, but you’ll notice that right next to it on the same piece of metal are 4 mount holes. You can unscrew the camera and mount the camera on these 4 mount holes with the camera pointing straight up and the cable going through the strain relief “T” hole.

This will generally give more accurate navigation results, as the positional accuracy of the fiducial system is better in measuring lateral distance than in measuring distance away from the robot.

Make sure you use a correctly sized screw driver - the screws are, by design, quite tight. It also seems that on this batch our factory was over zealous in applying thread-locking compound.


#22

@davecrawley I get it now… already unscrewed the camera! But tell me it’s ok to let the camera upside down? It’s that the correct position? As you can see in my last attached picture I was upside-down! Thanks for the help once again!


#23

Yes the camera is supposed to be upside down. We did it that way so that we could make strain relief work, and because flipping images is easy to do in software. You just need to make sure that the orientation of the camera matches what the software expects and you need to make sure that the position of the camera matches whats in the URDF.


#24

@davecrawley @rohbotics i´ve positioned the camere in the proper side and now im getting more problems than ever…

See the images i´ve attached! Now that i´ve changed the camera´s position the robot thinks that is against the fiducials and not below them! Theres must be some setting that i need to change in order to solve this! No?

Do i need to change the “vFlip/hFlip” on (rosrun rqt_reconfigure rqt_reconfigure)???

I tested the waypoints and it was a disaster as i expected since the robot thinks that is in front of the fiducials and not right below them!


#25

Yes, you need to edit the configuration to tell the robot the orientation of the camera.

On the pi, edit /etc/ubiquity/robot.yaml to have the following lines

raspicam:
    position: 'upward'

Rohan


#26

@rohbotics Thanks for the fast response, that is the same file that holds the sonars config, so the file must be like this?

#Robot Configuration
#sonars: None
sonars: ‘pi_sonar_v1’

raspicam:
position: ‘upward’


#27

That is correct,

Just make sure that the position field under raspicam is indented 4 spaces.

Rohan


#28

Okok… I’ll test that way!!


#29

@rohbotics @davecrawley now with the robot.yaml edited to support the camera on the upward position the robot appears in the right place, that is just below the fiducial but is drifting and on the rviz you can see that the robot it’s still pointed in the wrong direction… I need it to be pointed to the left! Can you understand my problem?

You can check the drifting on the video: https://streamable.com/olhga
As you can see in the picture the robot is pointed to the left but in the rviz hes pointed towards the wall!!


#30

Doing an extreme zoom of your photo - it looks like your camera orientation is not correct. Looks like you’ve mounted the camera with the cable coming out the front of the robot rather than sideways in to the robot.

I can’t really tell for sure with your last picture but that’s what it looks like. Looks to me like you need to rotate your camera 90 degrees.


#31

I passed the cable trough… see picture please!!

I believe that maybe there’s some more configs to do in some file like robot.yaml!! IDK!!


#32

@davecrawley @rohbotics can u please help me? Did u look ate the photos? The camera is in the right position… there’s must be another place/file like the robot.yaml to define or change the camera from forward to upward, no? I’ll just read all the documentation and didn’t find anything related to camera mount configuration!!


#33

Yes that does look correct. We are looking at this right now - it may be a URDF bug.


#34

@davecrawley this may help, I placed the camera in a non predifined position “just for test purposes” and now the fiducial map works like a charm, and the robot is respecting the waypoints almost to the centimeters!! That’s good news, but still, I can’t use the camera in this position in a production scenario! See picture attached!!

In this scenario I have the robot.yaml file with the parameter:
raspicam:
position: ‘upward’
*Respecting the 4 spaces before “position:…”


#35

I have found and identified the bug, fix will be out by tonight.


#36

Wow good job! That was fast :slight_smile:


#37

@rohbotics do we need to run this in order to get the fix?

sudo apt-get update
sudo apt-get upgrade


#38

Thanks! :slight_smile:

Yes that is the command, but it is still working through the packaging and build process right now.
It will probably be another hour before you can download it.

Rohan


#39

Its up, run:

sudo apt-get update
sudo apt-get upgrade

to get the bug fix.

Rohan


#40

I did the apt update/upgrade
i mounted the camera in upward position (*), updated /etc/ubiquity/robot.yaml
reboot and remade the simple_navigation.

(*) as a side note, the screws were super tight with glue. I struggled to unmount the cam. maybe using a straight screw head (instead of ‘+’ shaped head) would help.

the map slightly makes more sense now

but it’s still somehow tilted.

now I did try to print fiducial_49.pdf (the one I used for followme demo) on a bigger and expensive Xerox printing machine with basic office A4 paper. With a basic ruler laying around, I did measure again 141~142mm.
We do have a plotter to draw big A0 stuff (with a big roll) that it notorious for printing 1:1. But i would rather print on adhesive paper and i’m not sure it can take A4 paper (will check).

However, without using a caliper, I just updated
/opt/ros/kinetic/share/magni_nav/launch/aruco.launch and change line 17 to read:
<arg name="fiducial_len" value="0.142" /> as suggested by @rohbotics

And now I have a much better looking map:

When I send navigation goals, i still struggle with the orientation but it looks like magni moves where I instruct it to go.

I’ll continue the tutorials. starting by going back to my lab where i have 80+ fiducials & likely measure a dozen fiduciuals with a caliper to make sure 0.142 is correct.