Compilation on the pc104 old
These instructions only apply to YARP <= 2.3.24 and iCub <= 1.1.13 software versions
Compilation on the pc104 follows the same procedure we saw in Section 6 of the manual. The main difference is that in addition you need to enable certain flags in CMake that enable compilation of external modules. Some of these modules are generic and open source and are available in YARP; others are available in iCub because they are specific to the robot and in certain case require proprietary code (the API shipped with the hardware).
We recap the list of modules before going to the installation instructions.
List of modules
The list of modules depends on the version of the robot you have.
These are modules that are common to all robots:
- serial and serialport: face expressions
- xsensmtx: inertial sensor
- canmotioncontrol: communication with the can bus
- dragonfly2: cameras
- portaudio: microphones
the calibrators:
- icubarmcalibrator
- icubheadcalibrator
- icublegscalibrator
- icubhandcalibrator
- icubarmcalibratorj8
and Cartesian controllers:
- cartesiancontrollerclient
- cartesiancontrollerserver
These are modules that depend on the version of the robot:
- pcan: plx can interface (iCub 1.0 and 1.1.0)
- ecan: esd can interface (iCub 1.1.0)
- cfw2can: cfw2 can interface (iCub 1.1.1 and later versions)
- skinprototype: if skin parts (palm, forearm, arm) are present on the robot (iCub versions 1.2 and later)
Prepare your system
The Debian Linux that comes installed on the pc104 is already configured. Before you go ahead make sure the Debian Live on the pc104 is configured to use SVN (use image version > 1.3).
Section 9.1 gives more details on the pc104 Debian and instructions on how to update it.
Environment variables
After booting the pc104 you should be able to login using ssh and the icub user.
Verify that the following environment variables are present:
YARP_ROOT YARP_DIR ICUB_ROOT ICUB_DIR
Important: double check that the environment variable ICUB_ROBOTNAME exists and matches the name of your robot (e.g. iCubAberystwyth01).
If something is missing check the pc104 installation instructions.
Getting YARP and iCub sources
You should be aware that in default installations the Linux on the pc104 mounts a directory from the laptop/server. This is visible from /usr/local/src/robot and should normally contain the software repositories in the following directories:
/usr/local/src/robot/iCub /usr/local/src/robot/yarp2
If for some reasons you don't have these directories you have to download the repositories from svn:
cd /usr/local/src/robot svn co https://yarp0.svn.sourceforge.net/svnroot/yarp0/trunk/yarp2
svn co https://robotcub.svn.sourceforge.net/svnroot/robotcub/trunk/iCub
Don't change the location of the repositories because the icub environment on the pc104 is already configured by assuming the above directories (e.g. ICUB_ROOT, ICUB_DIR, YARP_ROOT etc..).
Compile YARP
Create the $YARP_DIR directory:
mkdir $YARP_DIR
cd $YARP_DIR
Clean the cache and generate makefiles:
rm CMakeCache.txt ccmake $YARP_ROOT
Do not forget to enable optimization, this will improve performances a lot. In cmake for both YARP and iCub set:
CMAKE_BUILD_TYPE: Release
CREATE_LIB_MATH, set to ON CREATE_DEVICE_LIBRARY_MODULES:ON
Configure (hit c):
Now enable:
ENABLE_yarpmod_serial ENABLE_yarpmod_serialport ENABLE_yarpmod_portaudio
Configure and generate makefiles.
Compile YARP:
make
Do not run make install, the current instructions assume that the binaries are not installed in system directories.
To verify the procedure type:
yarpdev --list
among the others the list should contains also the new devices:
Device "serial", C++ class ServerInertial, is a network wrapper, Device "serialport", C++ class SerialDeviceDriver, wrapped by "serial" Device "portaudio", C++ class ...
Compile iCub
Create $ICUB_DIR if it does not exist:
mkdir $ICUB_DIR
Clean cache and generate makefiles:
cd $ICUB_DIR rm CMakeCache.txt ccmake $ICUB_ROOT/main
The following options are as usual:
CMAKE_BUILD_TYPE:Release
Hit c to configure. A long list of devices (in the form of ENABLE_icubmod_*) will appear.
You need to enable (all versions of iCub):
ENABLE_icubmod_canmotioncontrol ENABLE_icubmod_dragonfly2 ENABLE_icubmod_logpolarclient ENABLE_icubmod_logpolargrabber ENABLE_icubmod_xsensmtx ENABLE_icubmod_icubarmcalibrator ENABLE_icubmod_icubheadcalibrator ENABLE_icubmod_icublegscalibrator ENABLE_icubmod_icubarmcalibratorj8 ENABLE_icubmod_icubhandcalibrator
ENABLE_icubmod_cartesiancontrollerclient ENABLE_icubmod_cartesiancontrollerserver
Versions from iCub 1.1.1 enable also:
ENABLE_icubmod_cfw2can ENABLE_icubmod_skinprototype
Versions iCub 1.x.2 enable also:
ENABLE_icubmod_icubheadcalibratorV2
Previous versions (iCub 1.0 and 1.1.0):
ENABLE_icubmod_pcan: iCub 1.0 and 1.1.0 ENABLE_icubmod_ecan: iCub 1.1.0
CMake will generate make files. Possible errors:
- pcan/ecan fails to detect API(s): check that you have unpacked plxCanApi/esdCanApi in /usr/local/src/robot/drivers. cmake uses the environment variables PLXCANAPI_DIR/ESDCANAPI_DIR to locate these libraries. If you the pc104 has a Debian Live image >= 1.4 these should be already set, otherwise you have to do it manually.
compile:
make
install applications:
make install_applications
Do not run make install, the current instructions assume that the binaries are not installed in system directories.
To verify the procedure type:
icubmoddev --list
among the others the list should contains also the new devices:
Device "dragonfly2", C++ class DragonflyDeviceDriver2, wrapped by "grabber" Device "pcan", C++ class PlxCan, has no network wrapper ...