Ask Your Question

ar_track_alvar fails to find IndividualMarkers with Kinect

asked 2017-12-28 09:43:41 -0500

simff gravatar image

updated 2018-02-18 07:29:10 -0500

Hello guys,

I cannot find a credible reason why my Kinect camera is not able to detect AR Markers, I am using ar_track_alvar with ROS Kinetic, Gazebo 7 and Husky robot. To test the package I placed a single marker (size 50 cm) in front of my robot, as seen in this Figure. Markers have been generated in the Gazebo simulator by running the script, and later inserting them as Gazebo models (SDF files). My launch file looks like this

<arg name="marker_size" default="5" />
<arg name="max_new_marker_error" default="0.05" />
<arg name="max_track_error" default="0.2" />

<arg name="cam_image_topic" default="/camera/depth/points" /> <!-- cam_image_topic requires the type sensor_msgs/Image , put /camera/rgb/image_raw or /camera/depth/image_raw-->
<arg name="cam_info_topic" default="/camera/depth/camera_info" /> <!--/kinect_head/rgb/camera_info put /camera/rgb/camera_info-->
<arg name="output_frame" default="/base_link" /> <!-- camera_link also tried-->

<node name="ar_track_alvar" pkg="ar_track_alvar" type="individualMarkers" respawn="false" output="screen">
    <param name="marker_size"           type="double" value="$(arg marker_size)" />
    <param name="max_new_marker_error"  type="double" value="$(arg max_new_marker_error)" />
    <param name="max_track_error"       type="double" value="$(arg max_track_error)" />
    <param name="output_frame"          type="string" value="$(arg output_frame)" />

    <remap from="camera_image"  to="$(arg cam_image_topic)" />
    <remap from="camera_info"   to="$(arg cam_info_topic)" /> 


Instead of depth/points and depth/camera_info, I also tried to use rgb/image_raw and rgb/camera_info in the corresponding image_topic and info_topic fields, with no results. The marker size corresponds to the exact size in the Gazebo model file, so I am supposing there is no error in there. By echoing the Kinect topics I get non empty messages, hence the plugin is working fine. A double and visual check for this is visible in this Rviz Figure as well.


As seen both the rgb and depth camera can output the marker.

What I cannot get is the marker´s pose, and also the marker´s frame in Rviz; this simply mean that the tag is not detected at all. The /visualization_marker topic is infact empty.

Here the graph with topics is visible.

I am really stuck with it, any help would be really appreciated!

Regards, Simone.

edit retag flag offensive close merge delete


Can you please embed your images in the question instead of linking to them? This will help the question to remain self-contained should the links disappear (which happens quite often).

jayess gravatar imagejayess ( 2018-01-09 08:49:53 -0500 )edit

Hi jayess, At the time I entered the question I was not able to do so, I think because I did not have enough karma. I just edited the question with Figures also. Sorry for the previous mistake, I am newby to ROS answers.

simff gravatar imagesimff ( 2018-01-09 10:20:46 -0500 )edit

No worries :)

jayess gravatar imagejayess ( 2018-01-09 10:25:11 -0500 )edit

Could you please post your solution as answer instead of as an update to your question?

jayess gravatar imagejayess ( 2018-01-15 10:30:13 -0500 )edit

Updated ! :)

simff gravatar imagesimff ( 2018-02-18 07:32:14 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-02-18 07:31:50 -0500

simff gravatar image


It appeared that the tag could only be detected on its back side, hence I simply flipped it using SDF Gazebo code. Tag tracking was also very weak, and I often has "segmentation fault errors". I solved this by highering the tags some x-cm from the ground and highering the horizontal Kinect FOV.

Hope this might help someone in case!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-12-28 09:43:41 -0500

Seen: 532 times

Last updated: Feb 18 '18