ar_track_alvar output frame issue

asked 2019-08-25 11:01:02 -0500

Giaco94 gravatar image

Hi guys i need your help. I try to use ar_track_alvar to detect an ar_tag on gazebo sim using a simulated camera.

Here there is my urdf file of the robot:

<?xml version="1.0"?>

<robot xmlns:xacro="" name="robot">

  <xacro:property name="M_PI" value="3.1415926535897931" />

    <link name="camera_link">

        <origin xyz="0 0 0" rpy="0 0 0" />
          <box size="0.2 0.2 0.2"/>

        <origin xyz="0 0 0" rpy="0 0 0" />
          <box size="0.2 0.2 0.2"/>
        <material name="grey">
            <color rgba="0.2 0.2 0.2 1.0"/>

        <mass value="0.001" />
        <origin xyz="0 0 0" rpy="0 0 0" />
        <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001" />


  <!-- camera -->
  <gazebo reference="camera_link">
    <sensor type="camera" name="camera1">
      <camera name="head">
          <!-- Noise is sampled independently per pixel on each frame.
               That pixel's noise value is added to each of its color
               channels, which at that point lie in the range [0,1]. -->
      <plugin name="camera_controller" filename="">


And here my launch file

<?xml version="1.0" ?>


  <arg name="x_robot" default="0.0"/>
  <arg name="y_robot" default="0.0"/>
  <arg name="z_robot" default="0.0"/>
  <arg name="tf_prefix" default="$(optenv ROS_NAMESPACE)"/>

  <arg name="marker_size" default="30.0" />
    <arg name="max_new_marker_error" default="0.08" />
    <arg name="max_track_error" default="0.2" />
    <arg name="cam_image_topic" default="/robot/rrbot/camera1/image_raw" />
    <arg name="cam_info_topic" default="/robot/rrbot/camera1/camera_info" />
    <arg name="output_frame" default="/camera_link" />

  <!-- Init Gazebo -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch"/>

  <group ns="robot">
    <!-- Include the robot.urdf file -->
    <param name="robot_description" command="$(find xacro)/ $(find robot_simulation)/urdf/robot.urdf.xacro"/>

    <!-- Spawn the robot into gazebo -->
    <node name="spawn_robot" pkg="gazebo_ros" type="spawn_model"
            args="-param robot_description
                  -x $(arg x_robot)
                  -y $(arg y_robot)
                  -z $(arg z_robot)
                  -model my_robot"
            respawn="false" output="screen" />

  <group ns="tag">
    <!-- Include the robot.urdf file -->
    <param name="ar_tag_gazebo" command="$(find xacro)/ $(find robot_simulation)/urdf/ar_tag.urdf.xacro"/>

    <!-- Spawn the robot into gazebo -->
    <node name="spawn_tag" pkg="gazebo_ros" type="spawn_model"
            args="-param ar_tag_gazebo ...
edit retag flag offensive close merge delete