Difference between revisions of "PR2 Getting Started"

From Healthcare Robotics Wiki
Jump to: navigation, search
(Getting Started)
(Getting Started)
Line 15: Line 15:
 
#* Option 1 (recommended): Run the HRL lab install ([http://www.hsi.gatech.edu/hrl-wiki-internal/index.php/New_to_the_lab%3F more details]).  To get an HRL svn account email Charlie.
 
#* Option 1 (recommended): Run the HRL lab install ([http://www.hsi.gatech.edu/hrl-wiki-internal/index.php/New_to_the_lab%3F more details]).  To get an HRL svn account email Charlie.
 
#* Option 2: Check out gt-ros-pkg following Google's [http://code.google.com/p/gt-ros-pkg/ instructions].  To obtain commit privileges email hai (haidai at gmail).
 
#* Option 2: Check out gt-ros-pkg following Google's [http://code.google.com/p/gt-ros-pkg/ instructions].  To obtain commit privileges email hai (haidai at gmail).
# Install current version (C Turtle as of 6/30/2010) of ROS ([http://www.ros.org/wiki/ROS/Installation details])
+
# Install current version (Fuerte) of ROS ([http://www.ros.org/wiki/ROS/Installation details])
 
# Network setup:
 
# Network setup:
 
#* For '''laptops''' connecting to gtpr2LAN, insert "export ROS_IP=10.68.0.SOMETHING" into your .bashrc where SOMETHING is the number of your choice in the 255 block, then register your laptop's MAC address with the robot router on 10.68.0.5 so that it gets a static internal IP on connect.
 
#* For '''laptops''' connecting to gtpr2LAN, insert "export ROS_IP=10.68.0.SOMETHING" into your .bashrc where SOMETHING is the number of your choice in the 255 block, then register your laptop's MAC address with the robot router on 10.68.0.5 so that it gets a static internal IP on connect.

Revision as of 16:22, 30 August 2012

Prerequisites

Below is a list of topics/skills that you should be familiar with or have when working on with the PR2, ROS, and HRL in general:

  • Basic command line manipulation skills (ls, mv, cp, ssh, find, grep, etc)
  • Ubuntu/Linux package management
  • Basic networking
  • Subversion
  • Python
  • Linux build tools (CMake, Make, gcc)
  • 3D rigid body transformations
  • Linear algebra

Getting Started

  1. Install Ubuntu (for details go to Installing Ubuntu)
  2. Check out GT's code
    • Option 1 (recommended): Run the HRL lab install (more details). To get an HRL svn account email Charlie.
    • Option 2: Check out gt-ros-pkg following Google's instructions. To obtain commit privileges email hai (haidai at gmail).
  3. Install current version (Fuerte) of ROS (details)
  4. Network setup:
    • For laptops connecting to gtpr2LAN, insert "export ROS_IP=10.68.0.SOMETHING" into your .bashrc where SOMETHING is the number of your choice in the 255 block, then register your laptop's MAC address with the robot router on 10.68.0.5 so that it gets a static internal IP on connect.
      1. The other option is to insert into your .bashrc: export ROS_IP=`ifconfig $1 | grep "inet addr" | gawk -F: '{print $2}' | gawk '{print $1}' | grep "68"`
    • For HSI computers, make sure that you can ping pr2c1.hsi.gatech.edu, pr2c2.hsi.gatech.edu, and pr2base.hsi.gatech.edu
  5. Setup chrony (important for using tf):
    • Place this file File:Chrony.doc (rename to .conf) into /etc/chrony replacing the existing chrony.conf.
    • Restart chrony with "/etc/init.d/chrony restart"
    • Check your synchronization by executing "chronyc", then entering "sources" at the chrony prompt.
  6. Verify your installation by typing "rostopic list" at the command line. This will return a long list of topics published by the robot.
  7. Sign up to Willow's ros-users and pr2-users list (link). Forward your Google account to Hai Nguyen (or your advisor) so that you can be added to the gt-pr2 Google groups list.

Starting the Robot

  1. On your local machine, start the Dashboard. But first, set your environment variables to communicate with the master:
    1. export ROS_MASTER_URI=http://pr2c1.hsi.gatech.edu:11311
      1. To make the above change permanent, edit ~/.bashrc
      2. Somewhere AFTER the line that reads: "source /opt/ros/cturtle/setup.sh", add "export ROS_MASTER_URI=http://pr2c1.hsi.gatech.edu:11311". Then source your .bashrc.
    2. Then run the dashboard: rosrun pr2_dashboard pr2_dashboard
    3. You should see the Dashboard pop up with red, yellow, and green buttons. If the buttons are gray, ask for help.
  2. SSH into pr2c1 (10.68.0.1 on the internal network, and just pr2c1 in HSI)
  3. Launch basic PR2 ROS nodes. There seem to be three ways of starting up the robot. They are listed below. The first is probably what you will do most commonly,the second does exactly the same thing as the first and the third is for if you want to mess with low level controllers and need to start with local environment variables instead of root. Including a '-e' option with 'sudo robot start' will accomplish the same thing. This is included to reduce confusion from the ros.org tutorials:
    1. sudo robot start ('sudo robot stop' stops the robot)
      • This is the preferred method. To use your declared environmental variables (used when you need to make the pr2_controller_manager aware of custom controllers) add "-e".
    2. roslaunch /etc/ros/cturtle/robot.launch
    3. roslaunch pr2_bringup pr2.launch
      • This does not bring up the other launch scripts and parameters in robot.launch (webui.launch, robot.xml, and pr2_analyzers.yaml)