ICub instructions: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
m (→‎iCubInterface: cartesian_solver.sh -> iCubStartup.sh)
Line 121: Line 121:
This program controls the motors and reads the inertial sensors. In practice, all demos assume that iCubInterface is already running in the background.
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 click on the '''cartesian_solver.sh''' icon, running its modules. You should start at least the first module (iCubInterface, as shown in the following picture) and optionally the other modules, depending on your demo.
To start iCubInterface, '''check that the red emergency button is unlocked''' and click on the '''iCubStartup.sh''' icon (formerly known as cartesian_solver.sh), running its modules. You should start at least the first module (iCubInterface, as shown in the following picture) and optionally the other modules, depending on your demo.


'''Spring 2012 note: put the torso upright before running iCubInterface - due to a temporary bug''' in the firmware, we need to do this otherwise some robot joints will not have enough power.
'''Spring 2012 note: put the torso upright before running iCubInterface - due to a temporary bug''' in the firmware, we need to do this otherwise some robot joints will not have enough power.

Revision as of 19:05, 9 March 2012

This article explains how to manage Chico (iCubLisboa01) 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 iCub demos/Archive and Innovation Days 2009.

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 M1330 laptop don't worry about this machine, just keep it switched on. It contains a hard disk that gets mounted by Chico's 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
Xantrex XFR 35-35 thin power supply unit, to power pc104 and some motors. Voltage: 12.9, current: 05.0 or more
Xantrex XFR 60-46 thick power supply unit, to power most motors. Voltage: 48.0 (initially it is 0 - it changes when you turn the green motor switch), current: 10.0 or more
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

Hardware side

  • 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; make sure the voltage values are correct (see iCub_demos#Setup)
  • 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

Software side

  • Run cluster_manager.sh from the chico3 desktop icon and start the needed YARP components (click here for detailed instructions). The summary is:
    • First, always launch yarpserver with the 'Run' button in the Nameserver panel
    • Then, if your application employs machines other than chico3 itself, launch the necessary yarprun listeners (usually on chico3, pc104, icubbrain1, icubbrain2)
  • If you need to use the motors, start iCubInterface on the pc104. Warning: make sure that the iCub is vertical before launching this software, otherwise the robot will first fall down (dangerous)
  • Depending on which demo you want to execute, you will need to start other drivers such as cameras or facial expressions

Shutting off the robot

Software side

  • Stop your demo software and the cameras with the respective application manager GUIs; do not stop yarpserver in the Cluster Manager 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, in the Cluster Manager GUI stop the instances of yarprun, and finally yarpserver
  • Optionally, shut down the pc104 gracefully by typing this in the yellow pc104 shell window: sudo shutdown -h now

Hardware side

  • 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

See Cluster Management in VisLab for background information about this GUI (not important for most users).

  • Click on the cluster_manager.sh icon on the desktop and select 'Run in Terminal' (or 'Run' if you want to suppress the debug information terminal)

  • You will see the following window, divided in two main components: yarpserver and yarpruns (the former is a global, single-instance nameserver; the latter are various instances of network command listeners, one per each machine involved in the demos)

  • In the yarpserver panel, click on the 'Run' button. The light above the 'Stop' button will become green.
  • In the yarprun panel, choose the following four machines in the 'Select' column (chico3, pc104, icubbrain1, icubbrain2), then click 'Run Selected' and wait a bit so that all machines can turn on their green 'On' light.
    • Note: 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 similar to this, actually with all the four machines showing a green 'On' light:

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

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 click on the iCubStartup.sh icon (formerly known as cartesian_solver.sh), running its modules. You should start at least the first module (iCubInterface, as shown in the following picture) and optionally the other modules, depending on your demo.

Spring 2012 note: put the torso upright before running iCubInterface - due to a temporary bug in the firmware, we need to do this otherwise some robot joints will not have enough power.

Wait for all boards to answer (which takes around 1 minute); after that, you are ready to move on.

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

Note that the actual expression device driver (the first module of the two listed) runs on the pc104. Sometimes, that process cannot be properly killed and restarted from the graphical interface; in the event of you needing to do that, you can either kill -9 its PID, or do a hard restart of the pc104.

Skin GUI

At this point, the driftPointGuiRight window should look like this:

and the iCubSkinGui window will display the fingertip/skin tactile sensors response:

See also: http://eris.liralab.it/viki/images/c/cd/SkinTutorial.pdf

Specific demos

Refer to iCub demos/Archive for older information such as starting demos from terminals.

Ball tracking and grasping (demoGrasp)

  • Make sure that basic YARP components are running: summarized Cluster Manager instructions are here; detailed instructions are in section #Starting YARP components
  • Start iCubInterface and the Cartesian solvers through cartesian_solver.sh. start modules and make connections.
  • Run camerasSetForTracking.sh (not cameras.sh!) from the chico3 desktop icon; start modules and make connections.
  • Run gazeControl.sh; start this module (iKinGazeCtrl) TODO: this should be launched in the cartesian_solver.sh step
  • Optionally, start the facial expression driver (EMOTIONS1 icon)
  • Finally, run the demoGrasp.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      // you may need to lower this, depending on illumination
 white balance blue 0.648 
 hue 0.482
 saturation 0.826
 gamma 0.400
 shutter 0.592
 gain 0.305

Face tracker demo

Yoga demo

Facial expression demo

Force Control demo