Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

why am I not able to use the argument value of a xacro under a gazebo tag?

I'm just showing the relevant parts..

<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="xyz">
<xacro:arg name="robot_names" default=" "/>

<gazebo>
    <plugin name="object_controller" filename="libgazebo_ros_planar_move.so">

      <commandTopic>cmd_vel</commandTopic>
      <odometryTopic>odom</odometryTopic>
      <robotNamespace><remapping>/tf:=tf</remapping>  </robotNamespace>
      <ros>    <remapping>/tf:=tf</remapping>    </ros>

      <!-- Set control loop update rate -->
      <odometryRate>100</odometryRate>
      <!-- Set odom publish rate -->
      <publish_rate>100</publish_rate>

      <!-- Set if odom required -->
      <publish_odom>true</publish_odom>
      <publish_odom_tf>true</publish_odom_tf>

      <!-- Frame IDs -->
      <odometry_frame>${robot_names}</odometry_frame>
      <robot_base_frame>${robot_names}base_link</robot_base_frame>

      <!-- Set odom covariance -->
      <covariance_x>0.0001</covariance_x>
      <covariance_y>0.0001</covariance_y>
      <covariance_yaw>0.0001</covariance_yaw>

    </plugin>  
  </gazebo>

</robot>

why am I not able to use the argument value of a xacro under a gazebo tag?

I'm just showing the relevant parts..

<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="xyz">
<xacro:arg name="robot_names" default=" "/>

<gazebo>
    <plugin name="object_controller" filename="libgazebo_ros_planar_move.so">

      <commandTopic>cmd_vel</commandTopic>
      <odometryTopic>odom</odometryTopic>
      <robotNamespace><remapping>/tf:=tf</remapping>  </robotNamespace>
      <ros>    <remapping>/tf:=tf</remapping>    </ros>

      <!-- Set control loop update rate -->
      <odometryRate>100</odometryRate>
      <!-- Set odom publish rate -->
      <publish_rate>100</publish_rate>

      <!-- Set if odom required -->
      <publish_odom>true</publish_odom>
      <publish_odom_tf>true</publish_odom_tf>

      <!-- Frame IDs -->
      <odometry_frame>${robot_names}</odometry_frame>
      <robot_base_frame>${robot_names}base_link</robot_base_frame>

      <!-- Set odom covariance -->
      <covariance_x>0.0001</covariance_x>
      <covariance_y>0.0001</covariance_y>
      <covariance_yaw>0.0001</covariance_yaw>

    </plugin>  
  </gazebo>
</robot>

</robot>

why am I not able to use the argument value of a xacro under a gazebo tag?

I'm just showing the relevant parts..

<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="xyz">
<xacro:arg name="robot_names" default=" "/>
default="robot_1"/>

<gazebo>
    <plugin name="object_controller" filename="libgazebo_ros_planar_move.so">

      <commandTopic>cmd_vel</commandTopic>
      <odometryTopic>odom</odometryTopic>
      <robotNamespace><remapping>/tf:=tf</remapping>  </robotNamespace>
      <ros>    <remapping>/tf:=tf</remapping>    </ros>

      <!-- Set control loop update rate -->
      <odometryRate>100</odometryRate>
      <!-- Set odom publish rate -->
      <publish_rate>100</publish_rate>

      <!-- Set if odom required -->
      <publish_odom>true</publish_odom>
      <publish_odom_tf>true</publish_odom_tf>

      <!-- Frame IDs -->
      <odometry_frame>${robot_names}</odometry_frame>
      <robot_base_frame>${robot_names}base_link</robot_base_frame>

      <!-- Set odom covariance -->
      <covariance_x>0.0001</covariance_x>
      <covariance_y>0.0001</covariance_y>
      <covariance_yaw>0.0001</covariance_yaw>

    </plugin>  
  </gazebo>
</robot>