From ecbe754dfd41ea0b7f4c88ec6f913769761a564d Mon Sep 17 00:00:00 2001 From: Ugo Pattacini Date: Tue, 17 Dec 2024 17:44:47 +0100 Subject: [PATCH] Use CMake preset (#380) --- docs/sw_installation/icub_head_manual.md | 121 ++++------------------- 1 file changed, 17 insertions(+), 104 deletions(-) diff --git a/docs/sw_installation/icub_head_manual.md b/docs/sw_installation/icub_head_manual.md index b8a99ea32..37889e204 100644 --- a/docs/sw_installation/icub_head_manual.md +++ b/docs/sw_installation/icub_head_manual.md @@ -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: @@ -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: ~~~ @@ -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 @@ -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): @@ -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_pcan: iCub 1.0 and 1.1.0 -ENABLE_icubmod_ecan: iCub 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: @@ -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: ~~~ @@ -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