• Diff for "Tutorials/UpgradingToLucid"
Differences between revisions 38 and 39
Revision 38 as of 2011-04-25 17:34:34
Size: 11505
Editor: wim
Comment:
Revision 39 as of 2011-04-25 17:34:46
Size: 11497
Editor: wim
Comment:
Deletions are marked like this. Additions are marked like this.
Line 46: Line 46:
|| Default ROS version || boxturtle || cturtle/diamondback || || ROS version || boxturtle || cturtle/diamondback ||

1. Upgrading a PR2 to Lucid

Description: This tutorial covers upgrading the PR2 and basestation to Ubuntu 10.04 (Lucid Lynx). It explains the process for backing up and restoring some critical files.

Keywords: Lucid, Ubuntu

Tutorial Level: ADVANCED

2. Overview

This tutorial covers how to upgrade the PR2 from Ubuntu 9.04 (Jaunty Jackalope) to Ubuntu 10.04 (Lucid Lynx).

All PR2's shipped before February 2011 were installed with Ubuntu 9.04. As of January 2011, Willow Garage has released PR2 basestation installer 0.5.x, which runs Ubuntu 10.04 on the PR2 and the basestation.

To upgrade the PR2, you will need to download the ISO for the installer, back up your files, install the basestation, then install the PR2. This tutorial will heavily reference the PR2 Manual. Make sure you have the latest version of the PR2 Manual from the PR2 Support website.

The Lucid installation is still in development. Willow Garage has experienced kernel stability problems with some of the Lucid releases. If your robot experiences a kernel panic, you can attempt to debug using our "Service Port Diagnosis" instructions under "Remove and Replace Instructions", or file a ticket to Willow Garage.

2.1. Changes from Previous Configurations

The PR2 computer configuration has significantly changed with this release.

Item

0.4.x

0.5.x

OS

Ubuntu 9.04 (Jaunty)

Ubuntu 10.04 (Lucid)

Kernel

2.6.29-6-rt

2.6.31-10-rt-pr2

ROS version

boxturtle

cturtle/diamondback

Other changes are enumerated at: https://code.ros.org/trac/pr2debs/wiki/JauntyLucidDifferences

2.1.1. "robot start"

The "sudo robot start" command is now simply "robot start". Starting the robot with this command will display the current ROS environment:

pr2admin@pr1023:~$ robot start

Active User: pr2admin
Message: testing config
Acquired: Mon Jan 10 16:23:02 2011

The following users have running processes:
 * pr2admin (65)


Kill these processes? [(y)es/(n)o/(s)how]:y
Killing 63 processes now...
=====================PROGRESS=====================
##################################################
All processes killed successfully.
Using environment:
ROS_ROOT=/opt/ros/cturtle/ros
ROS_PACKAGE_PATH=/opt/ros/cturtle/stacks
USER=pr2admin
HOME=/u/pr2admin

It is recommended to use the command

roslaunch /etc/ros/robot.launch

to start the robot.

Before using the robot, claim it with "robot claim".

3. Backing Up Your Configuration

/!\ This is not guaranteed to be a complete list of any files that your robot may need. Contact all users of your robot before reinstalling.

{X} All files on your basestation and your robot will be erased during the installation.

3.1. Back up your Basestation

On the basestation, you may want to copy the following files to a secure location:

  • /etc/network/interfaces - Your networking information

  • /home - User data

If you want to, you will need to back up this data to a separate server. The entire basestation disk will be wiped during the install process.

3.2. Back Up Your PR2

3.2.1. Send Diagnostic Logs

Stop all ROS software by running "sudo robot stop". Copy any remaining hardware logs to Willow Garage. First send bags from the pr2 to the basestation

pr2admin@c1$ sudo sendhwlog

Then send bags from the basestation to Willow Garage:

pr2admin@basestation$ sudo /etc/cron.hourly/hwlogsend

{X} All participants in the PR2 Beta Program are required to send their logs before continuing. Any logs that are not sent will be wiped from the PR2.

3.2.2. Backup User Accounts and Data

It is generally easiest to backup user data to the removable drives. However, you may instead back up the same data to a separate machine on your network.

pr2admin@c1$ mount /removable
pr2admin@c1$ mkdir /removable/archive_jan2011

{X} If you do not mount /removable, the files will be copied to the main hard drive on c1, which will be erased during the installation.

If you want to back up all users, you may use the pr2-usermigrate command:

pr2admin@c1$ sudo pr2-usermigrate save /removable/archive_jan2011/myrobot.users

If you choose not to backup users, you may instead choose to recreate select users by hand after reinstalling.

Next backup all user data from both drives:

pr2admin@c1$ sudo rsync -a /pr/1/ /removable/archive_jan2011/c1
pr2admin@c1$ sudo rsync -a /pr/2/ /removable/archive_jan2011/c2

{X} Check that the files are on /removable/ before continuing the installation. Check with users in your workplace to make sure they have copied any critical files off the robot before continuing.

{X} It is safest to copy /removable/archive_jan2011 off of the robot before continuing.

3.2.3. Back up the Calibration Data

You should back up the cturtle robot calibrated urdf from /etc/ros/cturtle/urdf

For example:

pr2admin@c1$ sudo cp /etc/ros/cturtle/urdf/robot_calibrated_10_18_2010.xml /removable/archive_jan2011/

Note: Your urdf will likely have a different date

4. Install Basestation

Download the ISO for version 0.5.x from the PR2 Support Wiki. Use this ISO to make a DVD.

Follow the PR2 Manual section 4.5 to reinstall your basestation from this installation disc. This installation will take a long time, over 1 hour.

If the installer prompts about configuration of the lvm, answer "Yes" to all prompts.

4.1. Restore Basestation Settings

Once the basestation is installed, you must configure it again. Please consult section 4.4.1 of the PR2 Manual.

If you are comfortable with the process, the following should be sufficient:

  • Change the hostname of your basestation from "basestation" by modifying the following files:
    • /etc/hostname

    • /etc/hosts

    • /etc/dhcp3/dhclient.conf

  • If you copied your /etc/network/interfaces file off your basestation, you can copy it back now. Otherwise modify the file /etc/network/interfaces as described in the PR2 Manual.

  • Reboot the basestation to verify that it boots correctly with the new networking configuration.
  • Verify that you can contact your basestation from your network.

/!\ When upgrading the basestation fails bacause of immediate configure problems, add the following file to your system: /etc/apt/apt.conf.d/06immediateconfigure

  • APT::Immediate-Configure "false";pr2admin@prbase2

5. Install the PR2

Once the basestation is configured, plug the robot into the service port of the basestation.

On basestation run:

pr2admin@basestation$ sudo robot-install

You can access the robot via the service port to reboot it:

pr2admin@basestation$ ssh pr2admin@c1
pr2admin@c1$ sudo pr2-shutdown --reboot --netboot

This is explained in the PR2 Manual, section 4.6. The installation will take more than one hour.

If the installer prompts about configuration of the lvm, answer "Yes" to all prompts.

5.1. Configure the Robot

5.1.1. Pair Robot with Basestation

This section is explained in the PR2 Manual, Section 4.4.

After installation has completed, boot the robot using a paperclip to push the recessed c1/c2 power buttons, or by powering the entire robot off and on again using the red switch.

Wait for the computers to boot. You should hear 4 series of rising notes. When the computers have booted you should be able to ping c1 and c2 from the basestation.

Now, brand the robot by running:

sudo robot-brand <ROBOT_NAME> <C1_NAME> <C2_NAME> <VPN_SUBNET>

Replacing <ROBOT_NAME> with the name of your robot, etc. Answer yes to all of the prompts.

/!\ At Willow Garage, our convention is to use "10.68.1XX.0" for the <VPN_SUBNET> where "XX" is the last two digits of the robot's serial number.

5.1.2. Set up IP-forwarding from the basestation to the robot

If you want the basestation to forward traffic to your robot, as described in section 4.4.7 of the PR2 Manual, edit the file /etc/robot-forward.conf on the basestation and add the lines:

<C1_NAME> <VPN_SUBNET>.1 <ROBOT_IP1>
<C2_NAME> <VPN_SUBNET>.2 <ROBOT_IP2>

Work with your system administrator to make sure <ROBOT_IP1> and <ROBOT_IP2> resolve to the names <C1_NAME> and <C2_NAME>. This should be the case if you used the same names and IPs from before the upgrade. Use the same <VPN_SUBNET> as you used in the "robot-brand" step above.

/!\ At Willow Garage, we use "dhcp" in place of <ROBOT_IP1> and <ROBOT_IP2>.

On the basestation, run:

sudo robot-forward start

Verify that you can ping your PR2 from another computer on your building network, and from your basestation.

5.1.3. Modify resolv.conf

To make sure your robot can resolve computers on your local network, on c1, edit /etc/resolv.conf and /unionfs/overlay/etc/resolv.conf to add:

search <YOUR_DOMAIN>

5.1.4. Setup LVM for C2

Because the robot now uses LVM to store home directories, you must create the LVM on c2:

pr2admin@c2$ sudo pr2-setup-c2-lvm

5.1.5. Restore the Robot URDF

Copy the URDF file from the removable drive back into /etc/ros/cturtle/urdf, and make a symlink from /etc/ros/cturtle/urdf/robot.xml to this file. For example:

pr2admin@c1$ sudo cp /removable/archive_jan2011/robot_calibrated_10_18_2010.xml /etc/ros/cturtle/urdf/
pr2admin@c1$ cd /etc/ros/cturtle/urdf && sudo ln -sf robot_calibrated_10_18_2010.xml robot.xml

Note: Your urdf will likely have a different date

5.1.6. Restore Robot Users

If you backed up your users, use the pr2-usermigrate to restore the users and groups for your PR2.

On the robot, run:

pr2admin@c1$ sudo pr2-usermigrate load /removable/archive_jan2011/myrobot.users

If necessary, copy user directory contents back to their home directories. Willow Garage typically leaves these on the removable drive and allows individual users to copy over what they want on an as-needed basis.

5.2. Camera Firmware

Starting in camera_drivers 1.3.1, new firmware is available for the WGE100 cameras on the PR2. This firmware allows a more robust transport of image data from the cameras.

Follow the tutorial Upgrading WGE100 Firmware to upgrade all cameras on your robot.

5.3. Check Robot

Run:

sudo pr2-systemcheck

to verify that your robot is working.

PR2Wiki: Tutorials/UpgradingToLucid (last edited 2011-04-25 17:34:46 by wim)