ar_track_alvar not recognizing an AR tag
I am running a Gazebo simulation with a hectorquadrotor with a front facing camera. I want to use the artrackalvar package to recognize a single AR tag in the camera's field of view, and publish the pose information of the AR tag for me to subscribe to in another node. Running rqtimageview I can see the AR tag in the camera frame, but when I use rostopic echo /arposemarker it keeps outputting a marker with no information, which I think means it is publishing the topic but not finding any markers to include data of. Why isn't it finding the marker and publishing its pose in /arposemarker? I have included my launch file that spawns the quadrotor in the world and initializes the artrack_alvar package:
<?xml version="1.0"?>
<remap from="camera_image/compressed" to="$(arg cam_image_topic)/compressed" />
<remap from="camera_info" to="$(arg cam_info_topic)" />
I spawn the AR tag with a separate launch file:
<?xml version="1.0" encoding="UTF-8"?>
<arg name="x" default="0.5" />
<arg name="y" default="0.0" />
<arg name="z" default="0.5" />
<arg name="roll" default="0.0"/>
<arg name="pitch" default="1.5708"/>
<arg name="yaw" default="0.0" />
<arg name="urdf_robot_file" default="$(find hector_quadrotor_gazebo)/urdf/ar_0001.urdf" />
<arg name="robot_name" default="ar_0001" />
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_ar0001_urdf.launch">
<arg name="x" value="$(arg x)" />
<arg name="y" value="$(arg y)" />
<arg name="z" value="$(arg z)" />
<arg name="roll" value="$(arg roll)"/>
<arg name="pitch" value="$(arg pitch)"/>
<arg name="yaw" value="$(arg yaw)" />
<arg name="urdf_robot_file" value="$(arg urdf_robot_file)" />
<arg name="robot_name" value="$(arg robot_name)" />
</include>
Asked by mjc1021 on 2018-12-12 18:04:58 UTC
Answers
What I was doing was fine. It ended up being a problem with the ar tag itself that I was spawning. I used someone else's dae file and urdf file for their ar tag and spawned it instead of mine and it worked fine.
Asked by mjc1021 on 2018-12-13 15:30:24 UTC
Comments