Skip to content

Commit

Permalink
Use CMake preset (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
pattacini authored Dec 17, 2024
1 parent 6415e5f commit ecbe754
Showing 1 changed file with 17 additions and 104 deletions.
121 changes: 17 additions & 104 deletions docs/sw_installation/icub_head_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,11 @@
The `icub-head` (also known as `pc104` on older iCubs) is a Linux system, so the
installation procedure follows the one described in [the installation for Linux systems](linux_from_sources_manual.md).

The main difference is that in addition you need to enable certain flags in CMake that enable compilation of specific
software modules.

We recap the list of software 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
- dragonfly2: firewire cameras
- portaudio: microphones
- skinWrapper

CAN based robots:

- sharedcan
- canmotioncontrol: communication with the can bus
- canBusAnalogSensor
- canBusDoubleFTSensor
- canBusInertialMTB
- canBusSkin
- canBusVirtualAnalogSensor

CAN subdevices to enable depending 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)

ETH based robots: **In addition** to can devices also enable the
following ones

- embObjStrain
- embObjMais
- embObjInertials
- embObjMotionControl
- embObjSkin
- embObjVirtualAnalogSensor

Calibrators:

- parametricCalibrator (CAN version)
- parametricCalibratorEth (ETH version, EMS boards)

Cartesian controllers:

- cartesiancontrollerclient
- cartesiancontrollerserver

## Prepare your system
This page only covers the software installation on the icub-head. To prepare the operating system for the icub-head system,
This page only covers the software installation on the `icub-head`. To prepare the operating system for the `icub-head` system,
please refer to Section on [iCub Operating Systems](../icub_operating_systems/index.md).

### Getting YARP, iCub sources and Robots configurations
### Getting YARP, iCub sources, and Robots configurations

Depending on your configuration, you may already have the required source code git repositories cloned in these directories:

Expand All @@ -75,7 +20,7 @@ Depending on your configuration, you may already have the required source code g
/usr/local/src/robot/robots-configuration
~~~

If for some reasons you do not have these directories you have to
If for some reason you do not have these directories you have to
download the repositories from git:

~~~
Expand All @@ -93,7 +38,7 @@ shall match the YARP dependencies as per the [Software Versioning
Table](../sw_versioning_table/index.md).

Do not change the location of the repositories because the icub
environment on the icub-head is already configured by assuming the above
environment on the `icub-head` is already configured by assuming the above
directories.

## Compile YCM
Expand Down Expand Up @@ -122,13 +67,13 @@ rm CMakeCache.txt
ccmake $YARP_SOURCE_DIR
~~~

Do not forget to enable optimization, this will improve performances a
Do not forget to enable optimization, this will improve performance a
lot. In CMake for both YARP and icub-main set:

~~~
CMAKE_BUILD_TYPE: Release
CREATE_LIB_MATH, set to ON
CREATE_DEVICE_LIBRARY_MODULES:ON`
CREATE_DEVICE_LIBRARY_MODULES:ON
~~~

Configure (hit c):
Expand Down Expand Up @@ -203,65 +148,33 @@ Clean cache and generate makefiles:
~~~
cd $ICUB_DIR
rm CMakeCache.txt
ccmake $ICUB_SOURCE_DIR
ccmake $ICUB_SOURCE_DIR --preset robot
~~~

The following options are as usual:
~~~
CMAKE_BUILD_TYPE:Release`
CMAKE_BUILD_TYPE:Release
~~~

Hit c to configure. A long list of devices (in the form of
`ENABLE_icubmod_*`) will appear.
Hit c to configure. A long list of devices (in the form of `ENABLE_icubmod_*`) will appear.
Aside from those already enabled, you have to switch on also the following:

You need to enable (all versions of iCub):
All iCub versions:
~~~
ENABLE_icubmod_dragonfly2
ENABLE_icubmod_skinWrapper
ENABLE_icubmod_xsensmtx
~~~

CAN robots:
~~~
ENABLE_icubmod_sharedcan
ENABLE_icubmod_canmotioncontrol
ENABLE_icubmod_canBusAnalogSensor
ENABLE_icubmod_canBusDoubleFTSensor
ENABLE_icubmod_canBusSkin
ENABLE_icubmod_canBusInertialMTB
ENABLE_icubmod_canBusVirtualAnalogSensor
ENABLE_icubmod_cfw2can
ENABLE_icubmod_parametricCalibrator
~~~

ETH robots: enable **also** the following
~~~
ENABLE_icubmod_embObjAnalogSensor
ENABLE_icubmod_embObjMotionControl
ENABLE_icubmod_embObjSkin
ENABLE_icubmod_embObjVirtualAnalogSensor
ENABLE_icubmod_parametricCalibratorEth
~~~

Cartesian controller:

~~~
ENABLE_icubmod_cartesiancontrollerclient
ENABLE_icubmod_cartesiancontrollerserver
~~~

Versions from **iCub 1.1.1** enable also:

Versions equal to **iCub 1.1.1**:
~~~
ENABLE_icubmod_cfw2can
ENABLE_icubmod_skinprototype
~~~

Previous versions (iCub 1.0 and 1.1.0):

Older versions (**iCub 1.0** and **1.1.0**):
~~~
ENABLE_icubmod_pcaniCub 1.0 and 1.1.0
ENABLE_icubmod_ecaniCub 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:
Expand All @@ -287,7 +200,7 @@ To verify the procedure type:
yarpdev --list
~~~

among the others the list should contains also the selected devices
among the others, the list should contain also the selected devices
like:

~~~
Expand Down Expand Up @@ -315,7 +228,7 @@ make install

Further documentation is available in [`icub-contrib-common` documentation](https://github.com/robotology/icub-contrib-common).

Then, proceed installing your robot configuration files:
Then, proceed to install your robot configuration files:

~~~
cd $ROBOT_CODE/robots-configuration
Expand Down

0 comments on commit ecbe754

Please sign in to comment.