Fiducial-Based Localization

top - - - ←back- - - - - - - - - - next

This document assumes that you are running the software on a Ubiquity Robotics robot base, using the supplied Raspberry Pi camera. It also assumes that you have a workstation with ROS installed, which is connected to a network in common with the robot. You will need a printer, too.

Basic Concept

The Ubiquity Robotics localization system uses a number of fiducial markers of known size (illustrated below). Detection of the markers is done by using the robot’s camera. The characteristics of the images of the fiducial markers enable the robot to compute its location.

Fiducial Markers

A PDF file containing a range of fiducial markers can be generated on your workstation with a command such as: rosrun aruco_detect create_markers.py 100 112 fiducials.pdf

The 100 and 112 specify the starting and ending numerical IDs of the markers. It is not important what these are (we recommend starting at 100), but it is important that each marker has a unique ID. Print the PDF file to produce the fiducials.

Check the Fiducials

The fiducials must be printed accurately. The image must be 14 cm by 14 cm, to within half a millimeter. Depending on the printer settings, these dimensions may be off. For instance, the printer may be trying to fill the page. Measure with a good rule, and change the settings if necessary.

Mount the fiducials

Affix the fiducials (in any order) to any convenient surface, such as a ceiling, where they will be viewed by the robot’s camera. They need to be at a sufficient spacing so that more than one is visible at a time, if the robot is at least 6 feet away from the wall or ceiling holding the fiducials. Below you will see how to test that the spacing is OK.

Running the Software

Login to the robot from your workstation using ssh. Then execute the following command on the robot to launch the detection and SLAM nodes:

roslaunch magni_nav aruco.launch

It should be run for the first time with at least one marker visible to the robot’s camera. A map (this is a file of fiducial poses) is created such that the current position of the robot is the origin.

Using rviz to Monitor Map Creation

Use The following command on your workstation to run the robot visualization tool, rviz.

roslaunch magni_viz view_nav.launch

This will produce a display as shown below. The bottom left pane shows the current camera view. This is useful for determining if the fiducial density is sufficient. The right-hand pane shows the map of fiducials as it is being built. Red cubes represent fiducials that are currently in view of the camera. Green cubes represent fiducials that are in the map, but not currently in the view of the camera. The blue lines show connected pairs of fiducials that have been observed in the camera view at the same time. The robustness of the map is increased by having a high degree of connectivity between the fiducials.

Visualizing with rviz

back- - - - - - - - - - next