ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

By default ALVAR markers have a size of 1. What this means is that the width and height of the marker including the margins, or the "outer dimensions of the black box" is set to 1 unit. When you detect a marker and compute its pose relative to the camera, the position will be given in these units.

This is normally fine for generic augmentations but if you want to know the pose in real-world coordinates you need to specify a size for the marker. This is done by printing the marker, measuring its size in millimetres with a ruler and using that as marker_size. The position of the pose will then be given in millimetres. Of course you can use meters or any other scale that you prefer.

This is even more important if you are trying to track markers of multiple size. In this case, you do have to specify their sizes relative to each other. In SampleMultiMarker, we set the smaller markers to 4 cm and the larger one to 8 cm. You should adjust these numbers if your printer printed markers with different sizes.

This version of ALVAR is quite old and I can't remember if there was a problem with SampleMultiMarker due to the fact that it used markers of different sizes. You could try creating a new multi maker with markers of the same size. You can do this by manually adjusting lines 56-64 of SampleMultiMarker or using SampleMultiMarkerBundle to generate a mmarker.xml file.