Environment
From Wiki for RobotCub and Friends
Important: since July 2010 the organization of the repository has changed.
This page contains instructions for compiling the new build. Old instructions are available here: Environment(Old).
Depending on the operating system you are using, instructions in Section 6.1 "Prepare you system" have required you to set some environment variables. These depend on your system and your choices so we don't review them here. Just make sure you followed the instructions correctly.
YARP and iCub software require another couple of environment variables. This applies to all systems.
YARP_ROOT= point to where YARP was unpacked (used by various applications)
YARP_DIR= typically points to YARP_ROOT/build or something like that (used by CMake)
YARP_CONF= where the yarpserver configuration file can be stored
ICUB_ROOT= point to where iCub code was unpacked
ICUB_DIR= points to the directory where you build or install the binaries, it can be any directory you
like, but a common choice is $ICUB_ROOT/main/build (this will be clearer later when you actually
compile your code)
If you have a robot you should also define:
ICUB_ROBOTNAME= name of your robot (the directory in $ICUB_ROOT/app that stores your robot
configuration files, without /conf)
In Linux and Mac OS X you do this using the "export" command. In the case of Linux it is a good idea to place them in your .bashrc file (or equivalent). In Windows environment variables are in the System Properties tab in the Control Panel.
Append ICUB_DIR/bin and YARP_DIR/bin to your PATH
- Hint for Linux and Mac OS X:
export PATH=$PATH:$YARP_DIR/bin:$ICUB_DIR/bin
- Hint for Windows: check the current value of PATH in the control panel and extend it.
Important notes
- Windows users: be sure to use
C:/(or whatever drive letter you need) and notC:\, e.g.ICUB_ROOT=C:/iCuband notICUB_ROOT=C:\iCub. The\version works most of the time but not always. The same applies for YARP.
- YARP_ROOT and YARP_DIR have different meaning, although they can point to the same place. YARP_ROOT points to the location of the sources, YARP_DIR points to where you build your binaries. Traditionally users point them to the same place (cmake calls this in source build) but it is a good idea to separate them. Similar considerations apply to ICUB_ROOT and ICUB_DIR.
- In the old build ICUB_ROOT and ICUB_DIR were required to point to the same location, this has changed now (and it is one of the improvements of the new build system). They can (and should) point to different directories.

