Upload
hoangtuyen
View
215
Download
0
Embed Size (px)
Citation preview
2ROS + PR2 Training Workshop
Overview
1.What is the robot
2.Connecting to the robot
3.Visible Devices
4.The Operating System● c1 vs. c2
5.The robot internal network
6.Administrative tasks
7.Removable drives
8.Wireless
9.Practice
3ROS + PR2 Training Workshop
What is the robot
1.Two computers:● Dual Xeon quad-core● 24 GB RAM● 500 GB internal disk● 1.5 TB removal drive● Ubuntu 9.04 (Jaunty Jackalope)
4ROS + PR2 Training Workshop
Robot wireless
1.There are TWO wireless devices:● Wireless client:
– Linksys wrt610n– Supports wireless N– Connects to your building network
● Wireless Access point– Cradlepoint ctr350– Supports wireless G– Connect to this with your laptop
5ROS + PR2 Training Workshop
Connecting to the Robot
1.Local connection:● Only involves robot● Wired: plug in to the service port● Wireless: connect to “robotLAN”● DHCP on 10.68.0.0 network● ssh to:
– 10.68.0.1 (c1)– 10.68.0.2 (c2)
6ROS + PR2 Training Workshop
Connecting to the Robot
1.Remote connection:● Requires external “basestation”
– Runs VPN server– We provide: Zareason core2 duo, 4 GB RAM– A different computer/server could be set up easily
● Robot initiates VPN connection:– Wireless client– WAN port
● Basestation forwards traffic to the robot:– Can forward from building network directly– Can provide select clients with VPN certificates
7ROS + PR2 Training Workshop
The Operating System
1. All computers running 64bit Ubuntu Jaunty
2. Most things that work on Ubuntu should work on the robot without much configuration
3. There are some fancy things going on:
● NFS between computers– Computer 2 mounts entire OS– Home directories can be on either disk
● Some “fancy” routing:– Iptables and routing policy database
8ROS + PR2 Training Workshop
The default account
1.The default account on the basestation and the robots is: “pr2admin”
2.The password is: “willow”
9ROS + PR2 Training Workshop
C1/C2 Overview
1.The computer on robot-right is “c1”● 10.68.0.1● Hosts the OS for both computers● Does all of the routing● Controls switching between WAN and Wireless● Any configuration happens on c1● Sometimes referred to as “master” or “prX1”● Internal disk stores OS (never reformat this unless
reinstalling OS)● c1:/home available on both machines as /pr/1
10ROS + PR2 Training Workshop
C1/C2 Overview
1.The computer on robot-left is “c2”● 10.68.0.2● Mounts the entire file-system from c1:
– “/slave” on c1 works as overlay via unionfs-fuse● Most of the file-system is read-only:
– Exceptions: /var, /tmp, /home● Sometimes referred to as “slave” or “prX2”● Internal disk stores c2:/home● c2:/home available on both machines as /pr/2
11ROS + PR2 Training Workshop
PR2 Internal Network
1.The internal network of the robot is 10.68.0.0/24● c1 is: 10.68.0.1● c2 is: 10.68.0.2● Wireless router is: 10.68.0.5● Basestation is: 10.68.0.6 (when plugged into
service port)● Wireless Access Point: 10.68.0.250
2.Traffic from the VPN (10.68.X.0/16), is NAT'd to 10.68.0.0/24
12ROS + PR2 Training Workshop
PR2 Internal Network
1.c1 has 7 network interfaces:● ecat0: talks to motor control boards● lan0: primary internal interface● lan1-3: secondary internal interfaces● wan0: goes to WAN port on back of robot● tun0: goes to basestation over VPN
13ROS + PR2 Training Workshop
PR2 Internal Network
1.c2 has 2 network interfaces:● lan0: primary internal interface● lan1: secondary internal interface
14ROS + PR2 Training Workshop
Creating User Accounts
1.The default account on the robot is: “pr2admin”
2.New accounts are created with the “adduser” command
3. Users that need root access get added to “admin” group
4.Users that need to install software get added to the “apt” group
5.Users that need to modify ROS settings, robot calibration, etc. get added to the “rosadmin” group
$ sudo adduser leibs
$ usermod a G admin leibs
$ usermod a G apt watts
$ usermod a G rosadmin vpradeep
15ROS + PR2 Training Workshop
Creating User Accounts
1.User home directories are listed as “/u/name”
2.“/u” actually contains symlinks to /pr/1 or /pr/2
3.A user directory can be moved to c2 by moving the directory and changing the symlink:
$ ls lh /utotal 4.0Klrwxrwxrwx 1 root root 11 20100316 17:57 leibs > /pr/2/leibslrwxrwxrwx 1 root root 14 20100316 18:07 pr2admin > /pr/1/pr2adminlrwxrwxrwx 1 root root 9 20100316 18:04 ros > /pr/1/ros
$ sudo mv /pr/1/leibs /pr/2/leibs$ sudo rm /u/leibs$ sudo ln sf /pr/2/leibs /u/leibs
16ROS + PR2 Training Workshop
Creating User Accounts
1.New users will be prompted to generate their ssh-keys the first time they log in.
2.The default .bashrc will source /etc/ros/setup.bash● This makes the system-install immediately
available to new users
17ROS + PR2 Training Workshop
Installing/Upgrading Software
1.We install debs on top of stock Ubuntu:● Available from:
http://code.ros.org/packages/pr2/ubuntu jaunty main
● Main deb: “pr2-environment”● “pr2-core” depends on ros-boxturtle-pr2all
2.To upgrade:$ sudo aptget update
$ sudo aptget distupgrade
18ROS + PR2 Training Workshop
/etc/ros
1.The robots and basestation make use of /etc/ros for configuration:● Applies to system-wide default ROS config● Source using:
– /etc/ros/setup.bash– /etc/ros/setup.sh
● /etc/ros/env: mapped to environment variables for system-wide default ROS configuration
● Start robot with:– roslaunch /etc/ros/robot.launch
19ROS + PR2 Training Workshop
Useful admin commands
1.pr2-systemcheck
● Runs a full set of tests across c1 and c2 which verify the system is setup and functioning
● This should be the first test if the computers do not appear to be working correctly
● NOTE: If possible you should always run this with sudo
2.pr2-shutdown
● This command can be used to shutdown both computers.
$ sudo pr2shutdown$ sudo pr2shutdown reboot$ sudo pr2shutdown reboot netboot
20ROS + PR2 Training Workshop
Useful admin commands
1.pr2-brand● This changes the name of the robot and target basestation:
$ sudo pr2brand robotname c1name c2name 192.168.1.100
2.formatdisk● Partitions and formats a disk on the robot.
$ sudo formatdisk /dev/removable$ sudo formatdisk /dev/sda
21ROS + PR2 Training Workshop
Useful admin commands
1.sendhwlog● This command is used to send the contents of
“/hwlog” back to Willow Garage. By default it is run daily via cron.
– sends logs to the basestation
– sends logs directly to Willow Garage
$ sendhwlog
$ sendhwlog wg
22ROS + PR2 Training Workshop
Chrony
1. We use chrony to do time-synchronization between the basestation and robot computers
● Sometimes chrony ends up misconfigured, best solution is to restart all 3 chrony servers.
● On, basestation, then C1, then C2:
$ sudo /etc/init.d/chrony restart
● You should see:
Restarting time daemon: chronyd is running and online.
23ROS + PR2 Training Workshop
Removable Drives
1.The robots come with 2 removable drives
2.Disks plugged into these will show up as:/dev/removable
3.If the drive is not formatted yet, use “formatdisk” to do so.
4.fstab is set up to mount /dev/removable1 at /removable, so users just need to run:
5.Each removable drive is only accessible from the computer it is plugged into
$ mount /removable
24ROS + PR2 Training Workshop
Wireless Router
1.The PR2 comes with a linksys wrt610n router
● It uses this router to connect up to your building wireless
2.To configure it, connect to the service port and point a web-browser to: 10.68.0.5
● The default login is root/willow
3. You will want to configure one of the 2 radios to connect up to the appropriate ESSID for your network in client mode
● NOTE: You should never put this router in AP mode
25ROS + PR2 Training Workshop
Wireless Access Point
1. The robot also comes with its own WAP
2. To configure it, connect to the service port and point a web-browser to: 10.68.0.250
● The default login is root/willow
● Specify the ESSID and security settings
3. Be careful enabling / providing access to this WAP:
● Anyone on the robot local network is being NAT'd back onto your building network via c1 and basestation
● This is potentially a security risk
● We recommend disabling the WAP except for when you explicitly need it
26ROS + PR2 Training Workshop
This week
1.Software-wise, feel free to do what you want. These are your computers.
2.Please leave default passwords:● Pr2admin account:● Wireless router● Wireless client
3.We may have to wipe computers before they are shipped:● Back up all your work before you leave on friday
27ROS + PR2 Training Workshop
Where To Get More Help
1.Everything covered here should be mentioned in the PR2 Manual
2.http://support.willowgarage.com contains additional FAQ information
3.Mailing list:
28ROS + PR2 Training Workshop
Practice
1.Login to the pr2admin account
2.Create a new user
3.Create a new admin user
4.Update the robot software
5.Format the internal disk on c2
6.Move one of the users home directories
7.Set up the cradlepoint with a new ESSID
8.Run pr2-systemcheck
9.Add a file to etc on c2
10.Reboot the robot