ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
If your robot already moves in gazebo you should do the following steps to move your robot in rviz:
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>
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>
Now launch your project and now you should be able to select in rviz->global options -> fixed frame world.