Fiducial Follow does not work


I tried the steps in

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

all it does is spin around slowly.

How do I troubleshoot?


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


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:

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


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


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.