Note: This tutorial assumes that you have completed the previous tutorials: Startup PR2 in Simulation. |
Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Working with Gazebo over ROS
Description: For the most part, working with Gazebo is the same as working with a robot.Tutorial Level: BEGINNER
Next Tutorial: Basic PR2 Controls over ROS
Getting the state of the robot
First, startup PR2 in simulation. To see joint states of the PR2 robot, type
rostopic echo joint_states | less
This message is published at 100Hz.
Controlling the robot
Similarly, you can launch controllers and use them to control the robot. For example, type
rosmake pr2_teleop roslaunch pr2_teleop teleop_keyboard.launch
You can then use keyboard commands to drive the robot around.
Reading from keyboard --------------------------- Use 'WASD' to translate Use 'QE' to yaw Press 'Shift' to run
teleop_pr2_keyboard node publishes velocity commands to the PR2 base controller. For more about the interface to mechanism controllers, see the PR2 mechanism controls stack.