# Fiducial Follow does not work

**URL:** <https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106>\
**Category:** General Questions\
**Created:** [August 13, 2018, 2:16am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106 "2018-08-13T02:16:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephenclark](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@stephenclark](https://forum.ubiquityrobotics.com/u/stephenclark)\
**Post date:** [August 13, 2018, 2:16am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106/1 "2018-08-13T02:16:31Z")

</div>

I tried the steps in

> **[Running Fiducial Follow](https://learn.ubiquityrobotics.com/fiducial_follow)**
>
> Tutorials for Magni

but can not get magni to find the printed fiducial #49.

all it does is spin around slowly.

How do I troubleshoot?

---

<div class="post-metadata">

**Author:** ![stephenclark](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@stephenclark](https://forum.ubiquityrobotics.com/u/stephenclark)\
**Post date:** [August 13, 2018, 2:25am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106/2 "2018-08-13T02:25:21Z")

</div>

in addition when I run  
$ raspistill -o test.jpg  
and view the image I get an upside down picture.

---

<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 13, 2018, 4:12pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106/3 "2018-08-13T16:12:23Z")

</div>

Well the camera is designed to be mounted upside-down so that the cable can go through the provided strain relief system. Obviously we’ve set up all the ROS stuff to either flip the image or to understand that the image is up-side down and this usually works fine - if you use raspistill though you’ll get an upside-down image.

Now if the robot rotates in place - that usually means that it found the fiducial at least once, and that its trying to re-acquire it. Sometimes with fiducial follow if you have lighting conditions that are a lot brighter or a lot darker than the camera is expecting it can loose the fiducial or acquire it only intermittently

If you use raspistill you may see something quite different to what you will see if you use the ROS diagnostic tools. Apart from anything with fiducial follow the algorithm sends special camera parameters to the raspberry pi camera to allow for a faster frame rate so that you can get a smoother fiducial follow. For this and other good reasons, the systems ability to deal with widely varying lighting conditions is reduced and sometimes it requires manual intervention.

What I would do is

1. Make sure that you’ve set up your laptop so that topics are shared between the robot and the laptop. If you don’t know what I am talking about or don’t know how to do this please check our documentation here:

> **[How to set up a ROS workstation](https://learn.ubiquityrobotics.com/workstation_setup)**
>
> Tutorials for Magni

The short version is you need ROS desktop full on your laptop, your laptop needs to be connected to your robot over the network and you need to have set environment variables so that the robot is master and the laptop is receiving those topics. Something like

export ROS\_MASTER\_URI=http:// **robot IP address** :11311  
export ROS\_IP=http:// **workstation IP address**

needs to either be typed in before you do this or ideally it needs to be placed in your .bashrc file.

1. Acquire the image on the camera by running rqt\_image\_view or rviz on your laptop. These programs will subscribe to the shared topics that are now getting to your laptop and will allow you to troubleshoot in real time. rqt\_image\_view and rviz should be able to show you what the robot sees from its camera. In general if the fiducial appears in these tools normally and properly exposed then fiducial follow will be able to find it.

2. If the image looks over-exposed or under exposed use  
rosrun rqt\_reconfigure rqt\_reconfigure

and this will enable you to make adjustments to the camera parameters until the image looks right. Usually I adjust the image gain and set the shutter speed to “0”. You can make adjustments and observe the difference it makes to the camera image in real time.

1. If you’ve got a nice image coming out of the robot and the fiducial seems clear then try fiducial follow again.

2. If that isn’t working, use either rviz, rostopic echo or even just look at the information messages coming off fiducial follow to see if it is publishing locations of fiducials.

3. Let us know how you get on

---

<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 13, 2018, 4:21pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106/4 "2018-08-13T16:21:44Z")

</div>

also, it’s worth noting that those cam are delivered with a protective adhesive taped on the lens. You have to remove it otherwise the image is rather blurred

---

<div class="post-metadata">

**Author:** ![stephenclark](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@stephenclark](https://forum.ubiquityrobotics.com/u/stephenclark)\
**Post date:** [August 14, 2018, 1:21am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106/5 "2018-08-14T01:21:22Z")

</div>

so i found out the answer. I forgot to remove the protective adhesive tape. thanks Alexis.  
David, thanks for the detailed answer but it was not needed.

---

<div class="post-metadata">

**Author:** ![inmoov](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/inmoov/32/473_2.png) [@inmoov](https://forum.ubiquityrobotics.com/u/inmoov)\
**Post date:** [July 12, 2020, 2:20pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106/6 "2020-07-12T14:20:24Z")

</div>

Hi Dave,

I’m very struggling trying to get Friducial to work on Magni,

I followed your steps up to entering two commands in Ubuntu,

export ROS\_MASTER\_URI=http:// **robot IP address** :11311  
export ROS\_IP=http:// **workstation IP address**

I have done that, and I got the below results in errors…

 ![2020-07-13 00_18_24-](https://frm.ubiquityrobotics.com/uploads/default/original/1X/6e8dc59b99d4bd7fe0c609f373acafcb2fd48dd5.png)

I then typed in rqt\_image\_view from the VM …and got a blank image…, …not showing what the camera is seeing…,

Please help…,

---

<div class="post-metadata">

**Author:** ![inmoov](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/inmoov/32/473_2.png) [@inmoov](https://forum.ubiquityrobotics.com/u/inmoov)\
**Post date:** [July 12, 2020, 3:08pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106/7 "2020-07-12T15:08:08Z")

</div>

Hi Dave,

And when I try to run it from the workstation VM, I get these errors…,

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

Please help,  
Thanks

---

<div class="post-metadata">

**Author:** ![inmoov](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/inmoov/32/473_2.png) [@inmoov](https://forum.ubiquityrobotics.com/u/inmoov)\
**Post date:** [July 12, 2020, 3:09pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow-does-not-work/106/8 "2020-07-12T15:09:46Z")

</div>

And I also get this error as well, regarding couldnt find an AF\_INET address …

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

what does it mean? still unable to control the robot using the workstation VM…,
