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. |
PR2 Plugs Itself In
Description: Simulate environment for testing autonomous PR2 plugging in.Tutorial Level: INTERMEDIATE
Contents
This tutorial uses the plugs code from the pr2_plugs stack.
Installation
For this tutorial, you need to install the 'pr2all' variant of ROS (see installation instructions). On Ubuntu, this means:
sudo apt-get install ros-cturtle-pr2all
And you will also need to check out a unreleased package ( use at your own risk):
svn co https://code.ros.org/svn/wg-ros-pkg/stacks/wg_robots_gazebo/trunk wg_robots_gazebo
Compiling
Add above wg_robots_gazebo directory path to your ROS_PACKAGE_PATH environment variable. Now you should be able to compile the simulation plugging in package:
rosmake pr2_plugs_gazebo_demo
Running
First, export environment variable
export ROBOT=sim
This sets the launch scripts to use sim.machine in pr2_machine.
Start the plugging in simulation:
roslaunch pr2_plugs_gazebo_demo pr2_plugs_demo.launch
Trigger the plugging in action:
rosrun pr2_plugs_executive app_plugin.py
Watch the plugging in process: