TODO: check all "TODO" and "FIXME" within this document
-
If the robot is not responding, don't turn it off already (can still press the fault button, though) let it run for a while (some minutes) maybe a loose ethernet cable is causing very slow communications and errors could show up after a long time
-
Old iCubs CPU in head : there was no hard disk. It was remotely mounted using NFs (from server). This means the code was shared with the server computer => only the server computer needed to be updated
-
yarprobotinterface is a bunch of threads of equal priority but transmission tasks need to be run with high priority. The new version (from June 2017) in icub-main/master fixes this and offers better debug information with respect to it. icub-main/master now handles real-time mode with high priority threads for smoother transmission.
-
iCubNancy has "version 1" arms. Joints can be calibrated through similar files as with green/purple iCub (iCubGenova02 and iCubGenova04), in robot-configuration. Calibration may done through a calibration matrix found in robots-configuration (for a motor encoder on the leg, a matrix may be found in /hardware/motorControl/x-mc-service.xml, where "x" is the robot part and board number. The parameter named "matrixE2J" is usually set as the identity matrix). For proper explanation on this subject, Valentina Gaggero may be consulted. However, for simple fine calibration of joint positions, it is possible to modify the parameter "calibrationDelta" in /calibrators/x-calib.xml, where "x" is the robot part. Description of the procedure is in the wiki (http://wiki.icub.org/wiki/Manual), section "Three. Calibration". After doing this, make sure that the calibration files in the icub-head have the same values as the ones in robot-configuration.
Moved source files for PC104 (from icubsrv to icub01 computer) (i.e. share code directory between PC104/icub01) Paths have changed during this operation. Clean the cmakecache when re-compiling software afterwards.
- icub server laptop installation instructions
- instructions are available on http://wiki.icub.org/wiki/ICub_server_laptop_installation_instructions
- host file in /etc/hosts -> add line
10.0.0.2 pc104 - NFS server
- explanation : icub01 hosts
- 2 directories :
/exports/code(source for yarp, icub, etc.) and/exports/local_yarp(yarp configuration files, shared between icub01 and PC104)TODO: there is a typo on the wiki for these
- exported using NFS and mounted on PC104
- install nfs on icub01
- create directories
/exportsand children and set permissions - configure nfs-kernel-server : add lines in
/etc/exportsand restart NFS
- configure PC104 to mount the remote NFS shares : edit
/etc/fstaband create mount points (directories)Caution: Actually, we should use the facilities of icubrc.d instead of fstab. FIXME
- on icub01 create a symbolic link to
/exports/code:(this way, the files are at the same path for icub01 and PC104)sudo ln -s /exports/code /path/to/mount/point - clone icub software into
/exports/code: yarp, icub-main, icub-firmware-shared, icub-firmware-build - create a symbolic link to local yarp export path :
mkdir -p /home/icub/.local/... FIXME sudo ln -s /exports/local-yarp /home/...
Note: You also want to
- install ssh keys for PC104
- setup IP forwarding/NAT/IP/DNS/clock sync (NTP) ```
- PC104 installation: this is already done with the Linux image provided by IIT.
- installation of yarp and icub software on icub server laptop and PC104 Note: for compilation of yarp, the wiki documentation on for the server laptop is not quite up to date. Several additional options (strain, embObjIntertials, embObjMAIS, etc.) need to be set to ON, others need to be OFF (e.g. inertialSensors). Marco Accame should know the details.
Marco Accame can provide assistance, Valentina Gaggero too.
github.com/robotology/community/issues/240 : how to update your robot to use 1.8.0; guide to migrate to latest iCub release (applies to CAN and ETH robots)
-
On server computer : pull repositories and compile:
-
yarp (master)
-
icub-main (master)
-
On icub-head/PC104,
-
pull
yarp,icub-main,icub-firmware-shared,icub-firmware-build,robots-configuration -
compile yarp
-
compile yarp-firmware-shared (go to build-pc104, ...)
-
compile icub-main
-
install robot-configuration files, using instructions at robotology/robots-configuration
-
update firmware with FirmwareUpdater (from icub-main/master, replaces ethLoader and CanLoader), following instructions from
icub-firmware-build/firmwareUpdater.readme.quick.txta. power on motors b. start FirmwareUpdater gui on PC104 (throughssh -X) it should findfirmwareupdate.inithat should be installed with robots-configuration c. select the ETH device and click "Discover" to find available boards. A list of boards appears d. select an EMS board; its properties appear on the side (running/idle, etc.) e. click TODO (the kind of cross) icon to select all boards of the same type f. clickForce ETH maintenanceg. select all boards in maintenance h. clickupload applicationand select theems.hexfile inicub-firmware-build(somewhere in sub-folders) i. clickDiscoveragain j. select each board and check in the properties panel if the firmware version number is correct k. select all board of same type with (the kind of cross) icon TODO l. clickForce ETH applicationit sends the boards in application state, restarting the application; it is equivalent to power cycle of the motors m. Done; quit -
Use FirmwareUpdater to debug a board which is not responding with
yarprobotinterface -
search board, to see if it finds it
-
ping board (if not found) -> if it replies -> is
yarprobotinterfacecrashed ? -
click "restart board" (available if FirmwareUpdater is started with the option "--admin") and check the console for debug info on silence time, timeout, etc.
-
Update loaders and updaters
Caution: because this process will change board ip address, each board is done one at a time
This process must only be made on ETH boards
Use FirmwareUpdater --admin
-
select ETH + discover (see above)
-
select a board and press "upload eLoader" and select file from
icub-firmware-build/ETH/EMS/bin/environment/emsLoader.hex(this step really needs to be done one at at time) -
select ETH + discover again; the board shoud appear as EMS
10.0.1.99 -
select this board and
force ETH Maintenance, select again, change IP address to its former value (for instance10.0.1.1) -
select ETH (unknown), upload application
icub-firmware-build/ETH/EMS/bin/environment/emsApplPROGupdater.hexNote: this is the "special" application allowing to upgrade the eUploader
-
select ETH devie,
restart ETH boardsand wait ~5s -
select ETH device + discover you should find eApplPROGupdater (similar name) running
-
do
Upload eUpdaterwith fileicub-firmware-build/ETH/EMS/bin/emsUpdater.hex -
QUICKLY (to stay in eUpdater) select ETH device + discover
-
select the board being upgraded (for instance
10.0.1.1) and- check in properties that the Updater is on date (e.g. 2016) see bootstrap options (FIXME: meaning ? I don't remember. Maybe it is just to check that options are present?)
- click
jump to eUpdaterto verify that it works : it will change to the eUpdater program
-
select ETH device + discover + select current device (e.g.
10.0.1.1)- select
set Def Boot eUpdater(FIXME: will make the board reboot within eUpdater ? I don't think so, but can't remember what it does either) - upload appication from
icub-firmware-build/ETH/EMS/bin/application/ems.hex - select the board again and
Force ETH application
- select
-
repeat this operation for all boards.
Note: this process could theoretically be done for several boards at a time but there is currently a bug which sometimes prevents the upgrade from being actually done
Boards with skin:
- 2 leftarm
- 4 rightarm
- 10 left leg
- 11 right leg
Use FirmwareUpdater --admin
- select ETH + discover (see above)
- click
Force ETH maintenance - select a board with skin + discover
- select all skins of the board (tactile board)
- click
upload applicationand select theskin.hexfile inicub-firmware-build(somewhere in sub-folders) - select each board and check in the properties panel if the skin version number is correct If the skins are not all the same version, turn off motors. Turn on again and wait (more than 5s).
- select ETH +
Discover Force ETH application- repeat for all boards with skin.
- MAIS were already at the latest version in June 2017, so they were not updated then.
- STRAIN also need to be updated. This should be done in a similar way as the skin. The concerned boards are 1, 3, 6, 7, 8, 9. -FOC boards don't need update (at the date of June 2017).
We manage them through FirmwareUpdater stared with --admin option. How it's done:
- startup
FirmwareUpdater --admin - ETH -> Discover
- select the desired board among
| IP | side | part | joints |
|---|---|---|---|
| 10.0.1.1 | left | arm | 0-3 |
| 10.0.1.3 | right | arm | 0-3 |
| 10.0.1.6 | left | leg | 0-3 |
| 10.0.1.7 | left | leg | 4-5 |
| 10.0.1.8 | right | leg | 0-3 |
| 10.0.1.9 | right | leg | 4-5 |
- click
Force ETH maintenance - select the board and
Discover - select the strain device
Calibrate STRAINto launch the strain calibration GUI
This opens the calibration GUI for the force-torque sensors.
What to check:
- offsets should have a value between 600 and 900
- calibration matrix should have small values (below FF00 in hex)
The button "automatic offset adjustment" does not seem to work.
Note: The changes are NOT saved until closing the window. At this moment, a prompt asks for confirmation (to save settings).
Playing with offsets will influence the current values of the channels. One can adjust the offsets in order to minimize the channel values. For example, a value above 10 000 is too much. Adjust the slider of each channel until its value is satisfyingly low.
- Close the GUI and accept to store the changes
Force ETH application- close FirmwareUpdater
- turn off motors and then back on.
We tuned these values for left leg 0-3, channels 0 and 4.
- COPY ALL .local files to git robot-configurations and commit
- will need to upate firmware for board 10.0.1.10 left leg when it arrives from IIT
Put the robot on its pole in home position (i.e. all joints to 0)
- Matlab
1. in a terminal, type
matlab2015b2. in Matlab, go tocodyco-superbuild/main/wBIToolboxControllers/utilities3. launch and runcalibrateIMU.mdl4. look at the IMU scope; the values need to be around- 0 for yellow (x)
- 0 for blue (y)
- 9.8 for red (z)
- with
yarpmotorgui, move the head joints to bring signals to desired values (said above); keep note of the joint positions (*) - open file
~/software/yarp/iCuBContrib/robots/iCubNancy01/calibrators/head-calib.xml - add the offsets to the corresponding joints in
CalibrationDelta; save and close - restart the robot and check again with step 1.; repeat the steps above as needed since the IMU values should be closer to 0 but they may not yet be perfect
- the head uses CAN (not ethernet). The above-mentioned XML file would not be loaded properly. Workaround: put the head in initial position required for the IMU (obtained at (*) as a workaround for now
This was done with:
a. workaround:
StartupPositionchanged to (*) inhead-calib.xmlb. workaround:homePoseBalancing.iniis in.../codyco-superbuild/build/install/share/codyco. It has been modified according to our measurements (*): $robot/head-position was changed for homePoseYogaPP. Now, joint 0 (original value 0) is set to a new value of -1.5 (measurements (*) of June 2017) .
Home position Yoga++; head home position also needs to be adjusted as described above.
yarpmotorgui --from homePoseBalancing.ini-> menu bar global joints commands -> custom positions -> move all parts to YogaPP- While the robot is lifted in the air, adjust F/T sensors measurements (adjust offsets) with
yarp rpc /wholeBodyDynamics/rpc
>> calib all 300 # 300 is a timeout in ms
- Lower the robot to the ground. Perform "makumba" to release eventual stress in the legs. Lightly hold the robot by the arms while running the script; it will move a bit
twoFeetStandingIdleAndCalib.sh
(this script is in the PATH environment variable, its actual path being /home/icub/software/src/codyco-superbuild/build/install/bin/twoFeetStandingIdleAndCalib.sh)
FIXME: update script name to match what it does
4. matlab -> .../codyco-superbuild/main/WBIToobloxControllers/controllers/torqueBalancing
- torqueBalancingR2015b86.mdl (Simulink file)
- README (documentation; outdated) FIXME
- initTorqueBalancing.m (contains a few more lines of doc)
- check robot name
- options to turn on/off scopes
Caution: The scopes should never be opened when the robot is running. Close all scope windows before running the controller.
app/robots/iCubNancy01/gains.m(controller gains, torque saturation value, ...)app/robots/iCubNancy01/initStateMachine.m(gains for yoga state machine, overwrites some variables fromgains.m)app/robots/iCubNancy01/initRefGen.m(more parameters)
Home position OnChair; head home position also needs to be adjusted as described above.
With WBIToolboxControllers in branch iCubNancy_standUp_June2017
Have the chair ready, and remember to put the plastic covers on the bottom of iCub.
yarpmotorgui --from homePoseBalancing.ini-> menu bar global joints commands -> custom positions -> move all parts to OnChair- Lower the robot on the chair. Add some panels between the chair and iCub, to make sure that the feet do not touch the ground.
- Adjust F/T sensors measurements (adjust offsets) with
yarp rpc /wholeBodyDynamics/rpc
>> calibStandingOnTwoLinks l_upper_leg_contact r_upper_leg_contact 100 # 100 is a timeout in ms
- Remove the panels from under iCub. Place the robot so that the two feet are flat on the ground.
- Perform "makumba" to release eventual stress in the legs. Lightly hold the robot by the arms while running the script; it will move a bit
twoFeetStandingIdleAndCalib.sh
(this script is in the PATH environment variable, its actual path being /home/icub/software/src/codyco-superbuild/build/install/bin/twoFeetStandingIdleAndCalib.sh)
FIXME: update script name to match what it does
4. matlab -> .../codyco-superbuild/main/WBIToobloxControllers/controllers/torqueBalancing
- torqueBalancingR2016.mdl (Simulink file)
- ICUB_STANDUP_README (documentation)
- initTorqueBalancing.m (contains a few more lines of doc)
- check robot name
- check SM.SM_TYPE = 'STANDUP'
- options to turn on/off scopes
Caution: The scopes should never be opened when the robot is running. Close all scope windows before running the controller.
app/robots/iCubNancy01/gains.m(controller gains, torque saturation value, ...)app/robots/iCubNancy01/initStateMachine.m(gains for yoga state machine, overwrites some variables fromgains.m)app/robots/iCubNancy01/initRefGen.m(more parameters)
FIXME Some hardware joint limits were changed in PID file (from robot-configurations). Double check this.
| robot part | joint | kp | Kbemf | ktau |
|---|---|---|---|---|
| torso | yaw | 450 | 0.0008 | 200 |
| torso | roll | 400 | 0.0015 | 200 |
| torso | pitch | 400 | 0.0015 | 200 |
| l_arm | shoulder, elbow | 0 | ||
| r_arm | shoulder, elbow | 0 | ||
| l_leg | knee | switch sign | -100 | |
| r_leg | r_ankle_pitch | -300 (was -200) |
Note: issue to open: permettre de saisir au clavier des valeurs désirées pour les articulations dans yarpMotorGui
Note: Issue to open : robot-config does not install firmwareupdate.ini (check CMMakeLists file)
Note: Ajouter une issue pour que les informations et les instructions de mise à jour ne soient pas enregistrées dans des issues github à cause de leur nature périssable.
Note:
yarpscope --remote /icub/left_arm/analog:o
Note: Issue to open? : sometimes after starting the robot, in iCubGui, the force on the right leg is not visible.
yarp readon the right leg givesNaNand there are no errors on the logger. Is this something to do with the F/T sensors calibration?
FIXME: "BUG sm.com.threshold TWICE in initStateMachine.m"