1. Upgrading the PR2 from Diamondback to ElectricDescription: How to upgrade a PR2 from Diamondback to Electric
Tutorial Level: ADVANCED
Next Tutorial: UpgradingToFuerte
This tutorial covers how to update ROS on the PR2 from Diamondback to Electric.
Prerequisite: your PR2 must be running Ubuntu Lucid (10.04); packages for ROS Electric don't exist for prior Ubuntu versions.
confirm that your apt sources (in /etc/apt/sources.list.d) contain:
deb http://packages.ros.org/pr2/ubuntu lucid main deb http://packages.ros.org/pr2/ubuntu lucid pr2 deb http://packages.ros.org/ros/ubuntu lucid main
- Note that the first two lines may be combined into a single line as:
deb http://packages.ros.org/pr2/ubuntu lucid main pr2
sudo apt-get update
sudo apt-get upgrade
If you are asked about /etc/ros/plugs/hw_calibration.yaml, choose to keep the existing file (the default)
sudo apt-get install pr2-core-electric
- Update the URDF to the latest version
- Make sure that /etc/ros/diamondback/urdf/robot.xml and /etc/ros/diamondback/urdf/robot_uncalibrated.xml exist, and point to matching versions of the URDF
- run this script to generate an updated URDF
1 #!/bin/bash 2 3 mkdir -p /tmp/urdf-patch 4 pushd /tmp/urdf-patch 5 diff -U 5 /etc/ros/diamondback/urdf/robot_uncalibrated.xml /etc/ros/diamondback/urdf/robot.xml > urdf.diff 6 cp /etc/ros/electric/urdf/robot_uncalibrated.xml . 7 patch -F5 robot_uncalibrated.xml -o robot.xml -i urdf.diff 8 popd 9 cp /tmp/urdf-patch/robot.xml robot_calibrated_updated.xml
- Check the output to make sure there weren't any errors
- copy the resulting robot_calibrated_updated.xml to /etc/ros/electric/urdf and symlink robot.xml to it
- Update the distro symlink in /etc/ros/ to point to electric
- Update motor firmware for new motor heating model
- run roscore and roslaunch /etc/ros/robot.launch ; confirm no major errors (TODO: details, expected warning messages)
3. URDF Update Notes (read this if you have hardware modifications)
The most complicated part of this upgrade is the process for extracting the calibration parameters from the existing URDF and applying them to the new URDF version in Electric. If you have made hardware modifications to your robot, ensure that robot_uncailbrated.xml points to the pre-modification URDF. This way, the upgrade should extract your changes to the URDF along with your calibration data, and intelligently apply those changes to the new version of the URDF file. This has been tested and confirmed with the internal Willow Garage robots that have a Kinect added to the URDF.