ICub instructions: Difference between revisions
m (→Facial expression demo: anchor link) |
m (→Cameras) |
||
Line 112: | Line 112: | ||
=== Cameras === | === Cameras === | ||
Double-click the '''cameras.sh icon''' on chico3 desktop and select 'Run'. | Double-click the '''cameras.sh icon''' on chico3 desktop and select 'Run'. Then, run modules and connect. | ||
=== iCubInterface === | === iCubInterface === |
Revision as of 16:21, 1 March 2010
This article explains how to manage Chico for demos and experiments alike. We will describe the hardware setup that accompanies our iCub, how to turn things on and off, and how to run demos.
An older version of this article can be found at Innovation Days 2009 and iCub demos/Archive.
Setup
The inventory consists of:
machine | notes | IP address, username |
---|---|---|
Chico the robot (duh) | has a pc104 CPU in its head | 10.10.1.50, icub |
icubsrv Dell XPS laptop | don't worry about this machine, just keep it switched on. It contains a hard disk that gets mounted by Chico's read-only CPU at boot time | 10.10.1.51, icub |
chico3 Tsunami 17" laptop | we will use this machine for YARP and all demo management | 10.10.1.53, icub |
Below Chico's table, from top to bottom we have:
what | notes | IP address (server name), username |
---|---|---|
Xantrex XFR 35-35 | thin power supply unit, to power pc104 and some motors. Voltage: 12.9, current: 02.6 | - |
Xantrex XFR 60-46 | thick power supply unit, to power most motors. Voltage: 44.5 (initially it is 0 - it changes when you turn the green motor switch), current: 01.1 | - |
APC UPS | uninterruptible power supply | - |
Note: the iCubBrain chassis, which contains two servers used for computation (icubbrain1 - 10.10.1.41, icubbrain2 - 10.10.1.42) is normally in the ISR server room on the 6th floor as of Dec. 2009. However, it sits on top of the power supply units when we bring the iCub to external demos.
Switching on the robot
- Check that the UPS is on
- Turn on icubsrv (Dell XPS laptop)
- Turn on chico3 (Tsunami 17" laptop), the display machine that we will use to actually control the demos
- Turn on the Xantrex power supply units
- Check that the two iCubBrain servers are on (if the demo is held at ISR then they are already on: ignore this step)
- Check that the red emergency button is unlocked
- Turn on the green switches behind Chico
- Safety hint: first turn on the pc104 CPU switch, wait for the CPU to be on, and only then switch the motors on
- Second safety hint, after turning on motors: wait for the four purple lights on each board to turn off and become two blue lights – at this point you can continue to the next steps
- Start the needed YARP components with the Cluster Manager GUI: one instance of
yarpserver
plus all necessary instances ofyarprun
(one per each machine that will do computation; for an explanation of this tool, see Cluster Management in VisLab) - If you need to use the motors, start iCubInterface on the pc104
- Depending on which demo you want to execute, you will probably need to start iCubInterface and the cameras
- Depending on your demo, you might need to power up icubbrain1 (left half of server chassis) and/or icubbrain2 (right half)
Shutting off the robot
- Stop your demo software and the cameras with the respective application manager GUIs; do not stop
yarpserver
yet - Go to the (yellow) pc104 iCubInterface shell window and stop the program hitting ctrl+c, just once. Chico will thus move its limbs and head to a "parking" position. (If things don't quit gracefully, hit ctrl+c more times and be ready to hold Chico's chest since the head may fall to the front.)
- Now, with the Cluster Manager GUI stop the instances of
yarprun
, and thenyarpserver
(see Cluster Management in VisLab for details) - Optionally, shut down the pc104 gracefully by typing this in the yellow pc104 shell window:
sudo shutdown -h now
- Turn off the two green switches. Pay attention when turning off the 'Motors' switch: if iCubInterface was not stopped properly in the previous steps, then be ready to hold the robot when turning that switch
- Turn off the Xantrex power supply units
- Turn off chico3 (Tsunami 17" laptop)
- If necessary, turn off icubsrv (Dell XPS laptop), other machines (such as portable servers during a demo outside ISR) and the UPS
Stopping the robot with the red emergency button
The emergency button, as the name suggests, is to be used for emergencies only. For example:
- When the robot is about to break something
- When some components make nasty noises that suggest they are going to break
Use this button with great care, as it cuts power to all motors and controllers abruptly! In particular, be ready to hold Chico from his chest, because the upper part of his body might fall upon losing power.
To start using the robot again, it is convenient to quit and restart all the software components and interfaces; refer to #Switching on the robot for that. Don't forget to unlock the red emergency button after an emergency, otherwise the program #iCubInterface will start but not move any joint.
Starting YARP components
Launch the graphical Cluster Manager application on the chico3 laptop, by double-clicking the cluster_manager.sh icon on the desktop and selecting 'Run'.
yarpserver
Within the Cluster Manager GUI, click 'Run' to launch yarpserver
on chico3. The light above the 'Stop' button will become green.
yarprun
Now we are ready to start yarprun
on all the machines we need (necessary for several YARP modules distributed on different machines to communicate with one another). In the 'Select' column, make sure that only the following machines are selected with a red light:
- chico3
- pc104
- icubbrain1 (64bit)
- icubbrain2 (32bit)
Click 'Run Selected' and wait a bit so that all machines can turn on their green 'On' light. The pc104 can be slow and, sometimes, unpredictable (if it doesn't find the yarpserver
, you will need to write the following line into yarp conf: 10.10.1.53 40000
).
Do all the selected machines have their 'On/Off' switch green by now? If so, proceed to the next step. If not, click on 'Check All' and see if we have a green light from the pc104 at this point. You should see something like this:
Other components
Many demos and programs assume that components such as cameras, the iCubInterface driver or the facial expression driver have been launched. Here is how to run these blocks.
Cameras
Double-click the cameras.sh icon on chico3 desktop and select 'Run'. Then, run modules and connect.
iCubInterface
This program controls the motors and reads the inertial sensors. In practice, all demos assume that iCubInterface is already running in the background.
To start iCubInterface, check that the red emergency button is unlocked and type one of these commands on a pc104 console (depending if any limb is broken):
command | notes |
---|---|
iCubInterface --from iCubInterfaceSimple.ini
|
without Cartesian interface - usually, we launch the program this way |
iCubInterface --from iCubInterfaceSimpleLeftArmDisabled.ini
|
without Cartesian interface, left arm disabled |
iCubInterface --from iCubInterfaceSimpleRightArmDisabled.ini
|
without Cartesian interface, right arm disabled |
iCubInterface
|
with Cartesian interface. Equivalent to --from iCubInterface.ini and --from iCubInterfaceCartesian.ini
|
iCubInterface --from iCubInterfaceCartesianLeftArmDisabled.ini
|
with Cartesian interface, left arm disabled |
iCubInterface --from iCubInterfaceCartesianRightArmDisabled.ini
|
with Cartesian interface, right arm disabled |
Wait for all boards to answer (which takes around 1 minute); after that, you are ready to move on. Keep the pc104 shell window open or minimize it; you will use it again when you quit iCubInterface. For instructions about quitting, refer to section #Shutting off the robot.
There is a GUI application to interact with iCubInterface and command robot joints. Just invoke it from the display machine with:
robotMotorGui
Facial expression driver
Open a pc104 console and type:
cd $ICUB_ROOT/app/faceExpressions/scripts ./emotions.sh $ICUB_ROOT/app/iCubLisboa01/conf
Specific demos
Refer to Innovation Days 2009 for older information.
Ball tracking and reaching demo
- Start iCubInterface on the pc104.
- Run the camerasSetForTracking.sh icon (not cameras.sh!) from the chico3 desktop icon; start modules and make connections.
- Finally, run the demoReach_LeftHand.sh icon and use the Application Manager interface to start the modules and make the connections.
Note that this demo launches the left eye camera with special parameter values:
brightness 0 sharpness 0.5 white balance red 0.474 white balance blue 0.648 hue 0.482 saturation 0.826 gamma 0.400 shutter 0.592 gain 0.305
Yoga demo
- Run iCubInterface on the pc104
- On any machine, type:
iCubDemoY3 --config /app/demoy3/fullBody.txt
Facial expression demo
- Make sure the facial expression driver is running
- Run one of these two commands on any machine:
$ICUB_DIR/app/faceExpressions/scripts/cycle.sh
or
yarp rpc /icub/face/emotions/in set all hap // full face happy set all sad // full face sad set all ang // full face angry set all neu // full face neutral set mou sur // mouth surprised set eli evi // eyelids evil set leb shy // left eyebrow shy set reb cun // right eyebrow cunning set all ta1 // mouth talking position 1 (mouth closed) set all ta2 // mouth talking position 2 (mouth open)