This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| robots:pr2_guidelines [2014/08/13 13:18] – [Running Kinect2 from PR2] wiedemeyer | robots:pr2_guidelines [2017/02/22 17:13] (current) – [Rebooting the robot] lisca | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== Prerequisites ===== | ||
| + | You are required to be on two mailing lists before you can work on the | ||
| + | pr2: | ||
| + | * robots@ias.cs.tum.edu (register [[https:// | ||
| + | * pr2-users@lists.willowgarage.com (register [[https:// | ||
| + | You also need to watch the pr2 [[https:// | ||
| + | it. We recommend to read the [[https:// | ||
| + | |||
| + | ===== Accounts ===== | ||
| + | You can get your account from the administrators [[mailto: | ||
| + | with it. If you do not know all possible effects of an action, ask one | ||
| + | of the administrators before. Installation of new software packages | ||
| + | with `aptitude` or `apt-get` is not a problem. Messing around in | ||
| + | configuration files or doing something like `sudo make install` is not | ||
| + | allowed. Please be always aware that the robot may be reinstalled and | ||
| + | your home directory gets deleted during this process. Never keep any | ||
| + | important data on the robot. Always copy important data to your | ||
| + | local machine. | ||
| + | |||
| + | ===== Computer' | ||
| + | Consistent time-stamping of data exchanged between the user's computer and the robot' | ||
| + | The general strategy is to have the two computers (user' | ||
| + | In our case the external time source will be the robot' | ||
| + | |||
| + | I order to employ chrony to keep synced your computer time with the base station computer time, make sure: | ||
| + | |||
| + | 1. you have chrony installed | ||
| + | |||
| + | < | ||
| + | sudo apt-get install chrony | ||
| + | </ | ||
| + | |||
| + | 2. you updated your chrony configuration file: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | allowing chrony to check if whether another chronyd client is already running (to be **newly added** to your chrony.conf file): | ||
| + | |||
| + | < | ||
| + | pidfile / | ||
| + | </ | ||
| + | |||
| + | and telling chrony client which is the chrony server to whom to sync (to **replace** the old servers in your chrony.conf): | ||
| + | |||
| + | < | ||
| + | server pr2a minpoll 3 maxpoll 15 maxdelay .010 | ||
| + | initstepslew 0 pr2a 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org | ||
| + | </ | ||
| + | |||
| + | 3. restarting chrony client (running on user's computer) | ||
| + | |||
| + | < | ||
| + | sudo / | ||
| + | </ | ||
| + | |||
| + | 4. check your installation / configuration | ||
| + | |||
| + | Start chrony: | ||
| + | |||
| + | < | ||
| + | chronyc | ||
| + | </ | ||
| + | |||
| + | Ask chrony the synchronization sources: | ||
| + | |||
| + | < | ||
| + | sources | ||
| + | </ | ||
| + | |||
| + | You should get something similar with: | ||
| + | |||
| + | < | ||
| + | 210 Number of sources = 1 | ||
| + | MS Name/IP address | ||
| + | ============================================================================ | ||
| + | ^* pr2a.ai.loc | ||
| + | </ | ||
| + | |||
| + | The **asterisk * ** appearing in front of the source confirms your computer time is synced to the pr2base. | ||
| + | |||
| + | Exit chrony: | ||
| + | |||
| + | < | ||
| + | exit | ||
| + | </ | ||
| + | |||
| + | Now you should be fine. | ||
| + | |||
| + | A second test would be: | ||
| + | |||
| + | < | ||
| + | ntpdate -q pr2a | ||
| + | </ | ||
| + | |||
| + | with an expected value smaller than 0.0001 milisecond. | ||
| + | |||
| + | Sometimes the clocks on the computers get into an inconsistent state. This will show up as an error in the pr2dashboard as: "NTP offset from XXX to YYY; Offset too great." | ||
| + | |||
| + | For additional details you may have a look how the synchronization problem between PR2's C1 and C2 is solved with the base station help http:// | ||
| + | |||
| + | |||
| + | ===== Software installation ===== | ||
| + | Get familiar with [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | ===== Running the robot ===== | ||
| + | |||
| + | To work on the robot, your computer must be either connected to the lab network. The robot' | ||
| + | |||
| + | < | ||
| + | export ROS_IP=< | ||
| + | export ROS_MASTER_URI=http:// | ||
| + | </ | ||
| + | |||
| + | to run some ros nodes locally. To start your stuff, ssh into the | ||
| + | robot with | ||
| + | |||
| + | < | ||
| + | ssh < | ||
| + | </ | ||
| + | |||
| + | You will see a message if the robot is free or claimed right now. If | ||
| + | it is claimed, go and find the person who claimed it and ask if he/she | ||
| + | still needs it. __Never__ kill someone else's processes without asking. | ||
| + | If the robot is not claimed, first find the wireless runstop. It | ||
| + | should be close around the robot. | ||
| + | |||
| + | Now claim the robot: | ||
| + | |||
| + | < | ||
| + | robot claim | ||
| + | </ | ||
| + | |||
| + | Make sure that the runstop is off before you start up the robot with: | ||
| + | |||
| + | < | ||
| + | roslaunch / | ||
| + | </ | ||
| + | |||
| + | The robot should come up now. To check, set the %%ROS_MASTER_URI%% on | ||
| + | your local machine to %%http:// | ||
| + | with | ||
| + | |||
| + | < | ||
| + | rosrun rqt_pr2_dashboard rqt_pr2_dashboard | ||
| + | </ | ||
| + | |||
| + | You should see only green fields. | ||
| + | dashboard whenever you are working on the robot. | ||
| + | |||
| + | It might be a good idea to first start the core manually before | ||
| + | running the robot and to run all your commands in a [[http:// | ||
| + | that it will not hit anything while calibrating. | ||
| + | robot, __always__ make sure that the wireless runstop is in reach. If | ||
| + | you need to leave the robot for a short amount of time, make sure that | ||
| + | you always press the runstop and make sure that the pr2's power cable | ||
| + | is plugged in. **First plug in the power cable into the PR2's inlet, then into the wall outlet**. This is important because the power cable and the pr2 power inlet might get damaged otherwise. When you are done on the robot, move it to its docking | ||
| + | station and plug in the network cable and the power cable. Press the red button on the | ||
| + | runstop. Now release the robot with: | ||
| + | |||
| + | < | ||
| + | robot release | ||
| + | </ | ||
| + | |||
| + | No food or drink in the PR2 workspace, in particular anywhere the PR2 | ||
| + | might make contact with. Keep the joystick plugged into the USB hub | ||
| + | nearby the robot charging station when not in use. Obey standard PR2 | ||
| + | safety protocol, including: No sharp objects in the PR2’s grasp. | ||
| + | liquids near the PR2, regardless of how sturdy you think the container | ||
| + | is. No objects may be placed on top of the PR2. Be wary of small | ||
| + | objects (e.g. screws). If you suspect anything has fallen in the PR2, | ||
| + | cut the power with the breakers and contact [[mailto: | ||
| + | |||
| + | ===== Running Kinect2 from PR2 ===== | ||
| + | |||
| + | * Make sure the robot is running. | ||
| + | * Make sure your user has access to the [[ias: | ||
| + | |||
| + | ==== Starting Kinect 2 Node ==== | ||
| + | |||
| + | - Connect to pr2a: < | ||
| + | - Start the Kinect2 bridge: (stopping with **CTRL+C**) < | ||
| + | |||
| + | |||
| + | |||
| + | ===== Checklists ===== | ||
| + | |||
| + | ==== Running the robot ==== | ||
| + | |||
| + | * Check if the robot is claimed. Do not kill other people' | ||
| + | * Make sure the runstop is off | ||
| + | * Claim and start up the robot with < | ||
| + | * Run the dashboard on your local machine | ||
| + | * Release the runstop. The robot might calibrate. Make sure that it doesn' | ||
| + | * Work with the robot. | ||
| + | * Always have the runstop in reach. | ||
| + | * When you are done working with the robot press the " | ||
| + | * Release the robot < | ||
| + | | ||
| + | ==== Leaving the robot for a short time ==== | ||
| + | |||
| + | * Press the runstop | ||
| + | * Make sure the robot is plugged in | ||
| + | |||
| + | ==== Shutting down the robot ==== | ||
| + | |||
| + | * Move the robot to its docking station | ||
| + | * Plug in the robot (Ethernet and power). **First plug in the power cable into the PR2's inlet, then plug in the power cable into the wall outlet** | ||
| + | * Press the red button on the runstop | ||
| + | * Release the robot with `robot release` | ||
| + | * Plug the PS3 controller into the USB hub nearby the robot | ||
| + | |||
| + | ==== Rebooting the robot ==== | ||
| + | |||
| + | * on pr2b enter the command < | ||
| + | |||
| + | * on pr2a enter the command < | ||
| + | |||
| + | * flip off the power switch (on the back side of robot' | ||
| + | |||
| + | * flip on the power switch (on the back side of robot' | ||
| + | |||
| + | * pr2a should boot automatically (no help needed) | ||
| + | |||
| + | * in case help is needed then in your favourite browser, open pr2a's remote BIOS screen http:// | ||
| + | |||
| + | * pr2b needs manual trigger for the the booting process | ||
| + | |||
| + | * in your favourite browser, open pr2b's remote BIOS screen http:// | ||
| + | |||
| + | * ask [[mailto: | ||
| + | |||
| + | * hit enter in order to trigger the pr2b's booting process (just follow the instructions on the screen) | ||
| + | |||
| + | * next step: the calibration routine (trigger at the first run of roslaunch / | ||