Detecting markers (ar_track_alvar) - Gazebo & RViz

asked 2018-08-24 20:38:03 -0600

Dylan gravatar image

updated 2018-08-24 20:39:43 -0600

Hello everyone,

I'm using an AR.Drone 2.0 in a Gazebo simulation and what I need to do know is to detect a predetermined tag that is on the floor (and then I have to land there, but that's not today). I made an AR tag using Blender (like it's indicated here: ), and I was able to put that tag in the Gazebo simulation:

I would like to detect that pattern when it's in my field of view. I created the tag with id=850, but I read that it's not necessary to calibrate the pattern in the Gazebo or RViz simulation (is that true? how can it search for something that is not learned?).

This is my launch file for the ar_track_alvar:

    <arg name="marker_size" default="9.0" />
    <arg name="max_new_marker_error" default="0.08" />
    <arg name="max_track_error" default="0.2" />
    <arg name="cam_image_topic" default="/quadrotor/ardrone/bottom/ardrone/bottom/image_raw" />
    <arg name="cam_info_topic" default="/quadrotor/ardrone/camera_info" />
    <arg name="output_frame" default="camera_optical" />
    <!-- <arg name="output_frame" default="base_link" /> -->

    <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 this is the rqt_graph when I use that code: (it's beautiful, isn't it?)

But when I use RViz, I can't find the marker. I can set everything except for the marker:

and I think that the problem is that there's nothing in the visualization_marker topic, but I don't know why it should be something:

there's no other marker topic to choose

So, what can I do? How can I detect that marker in RViz? Is my code ok? I run something like this:

1) the simulator launch (it's qlab simulator, and it's based on the tum simulator)

2) my code, like this: roslaunch ar_tag_toolbox ar_track_ardrone.launch

3) takeoff & drive it with the teleop_twist_keyboard

Thanks :D

edit retag flag offensive close merge delete