How do I set up the Zed camera with ar_track_alvar in gazebo?

asked 2018-06-24 21:39:40 -0500

sebasferruiz gravatar image

I am working on a project with a simulation of a race car that uses the Zed camera and needs to track ar tags. I have everything set up, the ar tag inside gazebo, the proper packages built, etc. But when I run the following launch file:

<launch> <arg name="marker_size" default="5.0"/> <arg name="max_new_marker_error" default="0.08"/> <arg name="max_track_error" default="0.2"/>

<arg name="cam_image_topic" default="/camera/zed/image_raw" />
<arg name="cam_info_topic" default="/camera/zed/camera_info" />
<arg name="output_frame" default="camera" />

<node name="ar_track_alvar" pkg="ar_track_alvar" type="individualMarkersNoKinect" 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)" />


And then try to echo the topic /ar_pose_marker, it returns me: "Warning, no messages received and simulated time is active". Since that code is standard for this topic and the only thing that changes is the path to the camera I think the problems lies precisely in there. How do I set the path to the zed camera in those 3 arguments (cam_image_topic, cam_info_topic and output_frame)?

I am using ros indigo.


edit retag flag offensive close merge delete