ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If your robot already moves in gazebo you should do the following steps to move your robot in rviz:

  1. add your robot model in rviz-> add button -> robot model.
  2. include the p3d plugin in your robotname.gazebo.xacro file:

    <xacro:if value="$(arg ground_truth)"> <gazebo> <plugin name="ground_truth" filename="libgazebo_ros_p3d.so"> <framename>world</framename> <bodyname>base_footprint</bodyname> <topicname>/gazebo/$(arg robot_name)/odom</topicname> <updaterate>100.0</updaterate> </plugin> </gazebo> </xacro:if>

  3. transform ground truth pose to tf (include this in your main launch file:)

    <node name="odom_to_tf" pkg="message_to_tf" type="message_to_tf"> </node>

  4. Now launch your project and now you should be able to select in rviz->global options -> fixed frame world.