# Move\_basic tutorial / is my map ok?

**URL:** <https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108>\
**Category:** General Questions\
**Created:** [August 14, 2018, 1:49pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108 "2018-08-14T13:49:35Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![davecrawley](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/davecrawley/32/24_2.png) [@davecrawley](https://forum.ubiquityrobotics.com/u/davecrawley)\
**Post date:** [August 28, 2018, 7:17pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/21 "2018-08-28T19:17:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 28, 2018, 7:55pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/22 "2018-08-28T19:55:25Z")

</div>

@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!

---

<div class="post-metadata">

**Author:** ![davecrawley](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/davecrawley/32/24_2.png) [@davecrawley](https://forum.ubiquityrobotics.com/u/davecrawley)\
**Post date:** [August 28, 2018, 10:09pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/23 "2018-08-28T22:09:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 29, 2018, 4:16pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/24 "2018-08-29T16:16:33Z")

</div>

@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?

 ![magni_raspberry_cam_v2](https://frm.ubiquityrobotics.com/uploads/default/original/1X/535e0fb86bec7f92beea40bb57fab124c31e4b99.jpeg) ![camera_facing_up_rviz](https://frm.ubiquityrobotics.com/uploads/default/original/1X/9212bcaae72242e117cd76abc24402626e77cc64.jpeg) ![camera_facing_up_rviz_correct](https://frm.ubiquityrobotics.com/uploads/default/original/1X/a47c6d99f652b760b7c84793b624bdf9cdef87c7.jpeg)

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!

 ![waypoints_problem](https://frm.ubiquityrobotics.com/uploads/default/original/1X/499be6bb19a967ec294c68d4e7dbb87a4d76de2b.jpeg)

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [August 29, 2018, 4:51pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/25 "2018-08-29T16:51:54Z")

</div>

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

```auto
raspicam:
    position: 'upward'

```

Rohan

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 29, 2018, 4:59pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/26 "2018-08-29T16:59:57Z")

</div>

@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’

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [August 29, 2018, 5:18pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/27 "2018-08-29T17:18:47Z")

</div>

That is correct,

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

Rohan

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 29, 2018, 5:39pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/28 "2018-08-29T17:39:58Z")

</div>

Okok… I’ll test that way!!

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 29, 2018, 6:57pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/29 "2018-08-29T18:57:31Z")

</div>

@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](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!!

 ![20180829_200041](https://frm.ubiquityrobotics.com/uploads/default/original/1X/e215017d4b62393046d77afb5a876d2a56c682c2.jpeg)

---

<div class="post-metadata">

**Author:** ![davecrawley](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/davecrawley/32/24_2.png) [@davecrawley](https://forum.ubiquityrobotics.com/u/davecrawley)\
**Post date:** [August 29, 2018, 9:03pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/30 "2018-08-29T21:03:47Z")

</div>

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.

 ![robotfront](https://frm.ubiquityrobotics.com/uploads/default/original/1X/f1fc81b4e671dd5aae15a6248ad92983c93e696d.jpeg)

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 29, 2018, 9:12pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/31 "2018-08-29T21:12:57Z")

</div>

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!!

 ![20180829_221129](https://frm.ubiquityrobotics.com/uploads/default/original/1X/213866196385af9df6edb7621a636562599a08a2.jpeg)

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 30, 2018, 7:39pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/32 "2018-08-30T19:39:56Z")

</div>

@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!!

 ![20180830_204115](https://frm.ubiquityrobotics.com/uploads/default/original/1X/b96e6f2fd7578f46aa3d402151da4718ced59b55.jpeg)

---

<div class="post-metadata">

**Author:** ![davecrawley](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/davecrawley/32/24_2.png) [@davecrawley](https://forum.ubiquityrobotics.com/u/davecrawley)\
**Post date:** [August 30, 2018, 10:26pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/33 "2018-08-30T22:26:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 30, 2018, 11:48pm UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/34 "2018-08-30T23:48:18Z")

</div>

@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!!

 ![20180831_001241](https://frm.ubiquityrobotics.com/uploads/default/original/1X/cea923fcc16a2b0eea029c7378285bcf6d95af6d.jpeg)

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

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [August 31, 2018, 12:21am UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/35 "2018-08-31T00:21:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 31, 2018, 12:39am UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/36 "2018-08-31T00:39:17Z")

</div>

Wow good job! That was fast 🙂

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 31, 2018, 1:02am UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/37 "2018-08-31T01:02:41Z")

</div>

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

`sudo apt-get update`  
`sudo apt-get upgrade`

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [August 31, 2018, 1:18am UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/38 "2018-08-31T01:18:57Z")

</div>

Thanks! 🙂

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

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [August 31, 2018, 2:05am UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/39 "2018-08-31T02:05:46Z")

</div>

Its up, run:

```auto
sudo apt-get update
sudo apt-get upgrade

```

to get the bug fix.

Rohan

---

<div class="post-metadata">

**Author:** ![alexis](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@alexis](https://forum.ubiquityrobotics.com/u/alexis)\
**Post date:** [August 31, 2018, 11:10am UTC](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108/40 "2018-08-31T11:10:53Z")

</div>

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

 ![image](https://frm.ubiquityrobotics.com/uploads/default/original/1X/133b2b617d4a2afe4eb490aaffe5d53632bb9025.png)

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:

 ![image](https://frm.ubiquityrobotics.com/uploads/default/original/1X/afc448d29adc47655f4151dd7e1ec75c09d167e0.png)

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.

[Previous page](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108.md?page=1)

[Next page](https://forum.ubiquityrobotics.com/t/move-basic-tutorial-is-my-map-ok/108.md?page=3)
