Ask Your Question

move robot in rviz and gazebo

asked 2012-08-16 23:00:06 -0500

shane gravatar image


i want to tell a roboter where to move to in rviz (with the 2D Nav Goal) and simulate that in gazebo. does that work? and if yes, how?

thanks in advance

ps.: sry for the noobie-question, but i really don't what to do.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2012-08-17 23:47:14 -0500

Jakub gravatar image

updated 2012-08-17 23:48:16 -0500

Setup a navigation stack for your robot, see the turorial Then use gazebo for the robot simulation and from rviz send commands to /move_base topic (another tutorial

edit flag offensive delete link more

answered 2017-12-08 07:42:23 -0500

Markus gravatar image

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=""> <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.

edit flag offensive delete link more

answered 2012-08-22 11:15:21 -0500

lbwdruid gravatar image

Just use pr2_mechanism to write a plugin for your robot to control it in Gazebo. You could follow this tutorial: PR2 Mechanism. It's quite convenient to do your task with a Cartesian controller.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-08-16 23:00:06 -0500

Seen: 3,874 times

Last updated: Dec 08 '17