This page is intended to collect notes from our usage of the PR2 at Stanford.

Driving the Robot

  • Unplug the big power cable from the back of the robot!
  • Reset the big red run-stop switch on the back of the robot by twisting it.
  • Push the green START button on the wireless run-stop
  • Connect your laptop to the PR2 wireless access point PR1000LAN using the password we discussed in person. If you don't know this password, talk to me (Morgan)
  • Tuck arms:

roslaunch tuckarms_application tuckarms_application.launch
  • To enable the PS3 joystick:

roslaunch pr2_teleop teleop_joystick.launch

Follow the instructions here: pr2_teleop

  • Remember to plug the robot into the charger when you're done.
  • BE CAREFUL!!! this is a big heavy robot.

Bringing up the robot

  • Simple: $sudo robot start. This launches the basic services and brings up the robot using the default launch file
  • If you want to run a custom bring up or use a non-default (i.e. non-boxturtle) ROS installation:

source .bash.ros #Source the appropriate paths of the installation
export ROS_MASTER_URI=http://pr1000:11311

On separate terminals, run:
roscore

and:
roslaunch pr2_bringup pr2.launch #Or the appropriate launch file

Turning on the projector

rosrun dynamic_reconfigure reconfigure_gui
  • Once in there, select "camera_synchronizer_node" from the drop-down list. Then, click on "AlternateProjector (5)" next to "narrow_stereo_trig_mode".

  • To turn the projector off, select "WithoutProjector (4)"

Making the tilt laser go up and down

we have a script for this. email me. but here is a simple sine-wave controller:

rosrun pr2_mechanism_controllers send_periodic_cmd.py laser_tilt_controller linear 1 1 0

When you're done with the robot

The robot is quite noisy. You should turn it off when you're done using it, for noise pollution as well as to ensure nothing bad happens when nobody is around to babysit the robot:

  • Get a shell to the robot. If you have a laptop handy, just connect its wireless to PR1000LAN, open a terminal, and type:

ssh c1
  • Next, stop all ROS processes:

sudo robot stop
  • Finally, shut down the computers

sudo pr2-shutdown
  • Wait until you hear four series of beeping sounds and the red lights go off from the robot computers.
  • Turn off the e-stop on back of the robot and hit the STOP button on the wireless run-stop.
  • Turn off the big red circuit breaker switch on the bottom of the back of the robot.
  • Plug in the big black charger cord in the bottom of the back of the robot.

Making a map

  • fire up gmapping on the robot

roslaunch pr2_2dnav_slam pr2_2dnav.launch
  • offboard the robot, bring up rviz in a slam-friendly configuration:

roslaunch pr2_navigation_slam rviz_move_base_slam.launch
  • drive around for a while. watch rviz to make sure it's sane and you have explored what you wanted.
  • save the map to disk:

rosrun map_server map_saver
  • at time of writing, map_saver won't exit, so just ctrl-c it when it's says "Done"

Driving on a static map

  • launch rviz in a nav-friendly configuration:

roslaunch pr2_navigation_global rviz_move_base.launch
  • tuck the robot's arms so they don't flop around and crash into stuff

rosrun pr2_tuckarm tuckarm.py b
  • launch the map server with the map you built using the previous section:

roslaunch map_server map_server FILENAME
  • launch the pr2 nav system:

roslaunch pr2_2dnav pr2_2dnav.launch
  • in rviz, set the robot pose
  • if the robot is seeing false obstacles on the floor due to an uneven surface, do this, you can raise the obstacle detection threshold like this (but be careful!):

rosparam set /sac_ground_removal/sac_distance_threshold 0.08

Adjust the autonomous navigation speed

/opt/ros/boxturtle/stacks/pr2_navigation/pr2_navigation_global/config

change the max_x_vel and max_rotational_vel parameters. They are 0.55 and 1.0, respectively, in "vanilla" boxturtle. NEVER GO FASTER THAN THIS!!!

Launch the inverse kinematics server

this just does the right arm:

roslaunch launch/pr2_ik_rarm_node.launch

Troubleshooting

Some issues I've run into while using the PR2:

* md5sum mismatch: This usually occurs when using multiple computers (e.g. PR2 and base station or a recorded bag file). It is due to differences in the message versions expected at either end. Make sure you upgrade/downgrade accordingly so that compatible versions of ROS messages are being used at both ends

Wiki: stanford_notes (last edited 2010-05-28 20:07:57 by Morgan Quigley)