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

move robot in rviz and gazebo

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

shane gravatar image

hello,

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
1

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

Jakub gravatar image

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

Setup a navigation stack for your robot, see the turorial http://ros.org/wiki/navigation/Tutorials/RobotSetup. Then use gazebo for the robot simulation and from rviz send commands to /move_base topic (another tutorial http://ros.org/wiki/navigation/Tutorials/Using_rviz_with_the_Navigation_Stack.

edit flag offensive delete link more
1

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

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

edit flag offensive delete link more
0

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

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

Question Tools

Stats

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

Seen: 4,446 times

Last updated: Dec 08 '17