Rosanswers logo

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.

Originally posted by simff on ROS Answers with karma: 98 on 2017-12-28

Post score: 2

Original comments

Comment by jayess on 2018-01-09:
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).

Comment by simff on 2018-01-09:
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.

Comment by jayess on 2018-01-09:
No worries :)

Comment by jayess on 2018-01-15:
Could you please post your solution as answer instead of as an update to your question?

Comment by simff on 2018-02-18:
Updated ! :)


1 Answer 1


Rosanswers logo


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!

Originally posted by simff with karma: 98 on 2018-02-18

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.