ICub software
This article deals with the installation of YARP and iCub software.
Please always refer to the official iCub manual first (http://wiki.icub.org/wiki/ICub_Software_Installation). It features up-to-date instructions on how to install the software, both from Ubuntu packages or from sources.
Below, we list some unofficial additional notes provided by VisLab members.
Preliminary software
Windows
Linux
sudo apt-get install make cmake-curses-gui git-core subversion
For more details on Linux packages, see VisLab machines configuration.
Environment variables
The following environment variables must be set.
YARP_ROOT
: location of the yarp source codeYARP_DIR
: yarp build directory, usuallyYARP_ROOT/build
ICUB_ROOT
: location of the icub-main source codeICUB_DIR
: icub-main build directory, usuallyICUB_ROOT/build
Windows environment variables
Typical choices are:
YARP_ROOT
= C:/yarpYARP_DIR
= C:/yarp/buildICUB_ROOT
= C:/icub-mainICUB_DIR
= C:/icub-main/build
Linux environment variables
Refer to VisLab machines configuration#Environment variables for typical variables and instructions on where to set them.
YARP
Browsing the yarp repository online
https://github.com/robotology/yarp
Getting the yarp repository in Windows
Inside TortoiseGit/TortoiseSVN, use the file manager to browse to the location where you would like to download the code. Right click on an empty region of the window and select "checkout" from the contextual menu.
Type the above Github address in the "URL of repository" field. No password or username will be required.
Note: if you use Cygwin, refer to Linux instructions instead.
Installing yarp in Windows
Note: all environment variables should have '/' and NOT '\' (except in the PATH
enviroment variable)! The directories do not need to be the same as the ones presented here, just be sure to alter the environment variables correctly.
- Download ACE and GSL from http://eris.liralab.it/iCub/downloads/packages/windows/msvc8/ ; unzip them to a directory of your choice and remember it.
- If you want GUIs, download GTKMM from http://live.gnome.org/gtkmm/MSWindows and use the installer.
- Create the environment variables
ACE_ROOT
,GTK_BASEPATH
,GTKMM_BASEPATH
,GSL_DIR
as follows:ACE_ROOT
is ACE dir (e.g., C:/ace_wrappers).GTK_BASEPATH
andGTKMM_BASEPATH
is GTKMM dir (C:/gtkmm).GSL_DIR
is GSL dir (C:/gsl-1.8).
- Add this to the
PATH
environment variable:%ACE_ROOT%/lib
(important: make sure you put it at the beginning of thePATH
environment variable, to avoid conflicts with other existing ACE versions on the system) - Make sure that
YARP_ROOT
andYARP_DIR
are correctly set. - Add this to the
PATH
enviroment variable:%YARP_DIR%/bin/Release
(and/orDebug
). Note: these directories will be created later - Use CMake to build the YARP SLN files. Point the source code to the yarp dir, and build to the yarp/build dir (which will be created now).
- In CMake, check the flags CREATE_DEVICE_LIBRARY_MODULES, CREATE_LIB_MATH and, optionally, CREATE_GUIS (don't uncheck anything!).
- Click: Configure, Configure, Generate.
- Go to
YARP_DIR
and open YARP.sln with Visual Studio - Go to Build->Batch Build
- Check ALL_BUILD (Release and/or Debug) and Build!
Getting the yarp repository in Linux
To clone the repository, you can use one of these addresses:
- (git read-only) git://github.com/robotology/yarp.git
- (ssh read+write) git@github.com:robotology/yarp.git
- (https read+write) https://github.com/robotology/yarp.git
More instructions are located at https://github.com/robotology/yarp.
To use this repository through SVN, you will have to do a new checkout (checkouts prior to March 2013 are not compatible):
svn co https://github.com/robotology/yarp/trunk yarp
Compiling the yarp repository in Linux
To compile the yarp repository, go to YARP_DIR
(the first time you must create it) and generate the project files with the CMake program with the command
ccmake $YARP_ROOT
and you obtain a Makefile.
Having generated your project file, only the actual compilation remains to be done:
make
Updating the yarp repository in Linux
cd $YARP_ROOT git pull (or svn update)
Recommended CMake flags for yarp
CMAKE_BUILD_TYPE Release CREATE_LIB_MATH ON
Downloading YARP as a single file
Refer to http://wiki.icub.org/yarpdoc/index.html -> Downloads. Pre-compiled binaries are also available.
iCub
Browsing the iCub repository online
icub-main:
https://github.com/robotology/icub-main/
icub-contrib:
http://sf.net/p/robotcub/code/HEAD/tree/trunk/iCub/ (pretty interface, ability to show diffs)
or
https://svn.code.sf.net/p/robotcub/code/trunk/iCub/ (simple and raw interface, faster to load)
Getting the iCub repository in Windows
Inside TortoiseGit/TortoiseSVN, use the file manager to browse to the location where you would like to download the code. Right click on an empty region of the window and select "SVN checkout" from the contextual menu.
Type the following string in the entry "URL of repository":
svn://svn.code.sf.net/p/robotcub/code/trunk/iCub
No password or username will be required.
Note: if you use Cygwin, refer to Linux instructions instead.
Installing iCub in Windows
- Make sure that
ICUB_ROOT
andICUB_DIR
are correctly set. - Install OpenCV 1.0, available at http://sourceforge.net/projects/opencvlibrary/files/ . Make sure that the variable
OPENCV_DIR
was created and add%OPENCV_DIR%/bin
to thePATH
environment variable. - If you intend to use the iKin kinematics modules (normally you don't - this is only needed on servers), then download IPOPT, unzip it and create the environment variable
IPOPT_DIR
, e.g. C:\Ipopt-3.7.0-win32-msvc8-yarp - Use CMake to build the iCub SLN files. Point the source code to the icub/main dir, and build to the icub/main/build dir (which will be created now).
- In CMake, check YARP_AUTO_LINK (not sure why?) and the modules you might want working (don't unheck anything!).
- Click: Configure, Configure, Generate.
- Go to
ICUB_DIR
, open iCub.sln - Go to Build->Batch Build
- Check ALL_BUILD (Release and/or Debug) and Build! (sometimes frameGrabberGui2 will not compile correctly)
Getting the iCub repository in Linux
Paste the following command in a console terminal, typically from the $code
directory:
svn co https://svn.code.sf.net/p/robotcub/code/trunk/iCub
Notice that this may take some time. Alternatively you can download individual parts of the repository (i.e. main and contrib or firmware).
This will create a new directory called iCub that contains the software. Your environment variable ICUB_ROOT
should be set to that directory (e.g., $code/iCub
).
Compiling the iCub repository in Linux
iCub-main
To compile the iCub repository, go to ICUB_DIR
(the first time you must create it) and generate the project files with the CMake program, typing with the command
ccmake $ICUB_ROOT/main
and you obtain a Makefile.
Having generated your project file, the actual compilation remains to be done:
make
With YARP > 2.3.23 and iCub > 1.1.13 software versions, your installation is finished at this point. Provided that YARP_ROBOT_NAME=iCubLisboa01
is set, robot-specific files will be automatically copied by CMake.
With older versions, you needed to define the environment variable ICUB_ROBOTNAME=iCubLisboa01
and type
make install_applications
iCub-contrib
We follow the official instructions at the bottom of http://wiki.icub.org/wiki/Linux:Installation_from_sources, with a few differences in order to avoid installing these applications with sudo in system directories (/usr/local/lib
, /usr/local/share
).
Put these into .bash_env
:
export ICUBcontrib_DIR=$ICUB_ROOT/contrib/build export PATH=$PATH:$YARP_DIR/bin:$ICUB_DIR/bin:$ICUBcontrib_DIR/bin export YARP_DATA_DIRS=$YARP_DIR/share/yarp:$ICUB_DIR/share/iCub:$ICUBcontrib_DIR/share/ICUBcontrib
Now:
mkdir $ICUB_ROOT/contrib/build mkdir $ICUB_ROOT/contrib/src/ICUBcontrib/build cd $ICUB_ROOT/contrib/src/ICUBcontrib/build ccmake .. // CMAKE_INSTALL_PREFIX must point to full $ICUBcontrib_DIR path // configure, generate, exit make install
At this point, you can install single iCub-contrib applications with make install
in their own build subdirectory (don't use sudo!). Binaries will be installed in $ICUBcontrib_DIR/bin.
Updating the iCub repository in Linux
cd $ICUB_ROOT svn update
Recommended CMake flags for iCub
CMAKE_BUILD_TYPE Release
Downloading iCub snapshot files
Snapshots of the iCub repository are available at http://eris.liralab.it/iCub/downloads/src/ (warning: not updated anymore)
Note that there are two types of files:
- iCub-src-x.y.z.tar.gz: the whole iCub repository, version x.y.z
- iCub-dep-x.y.z.txt: a list of the libraries, software packages and environment variables that are required to compile the code in snapshot x.y.z, including YARP version number.
iCub Simulator
This component is optional. Refer to the official iCub manual, section 9 (Software), subsection 6 (Simulators), available at http://eris.liralab.it/wiki/Manual#Nine._Software.2C_iCub
Installing iCub_SIM in Windows
- Download SDL (Simple DirectMedia Layer) from http://www.libsdl.org/ (Development Libraries), unzip it somewhere and note down the directory
- Download ODE from http://eris.liralab.it/iCub/downloads/packages/windows/msvc8/, unzip it somewhere as well
- Create the environment variables
SDLDIR
,ODE_DIR
:ODE_DIR
is ODE dir (e.g., C:/ode-0.11.1).SDLDIR
is SDL dir (C:/SDL-1.2.14).
- Add
%SDLDIR%/lib
to thePATH
variable. - Re-run CMake with the ODE, OPENCV and SDL variables checked.
- Compile project iCub_SIM
Installing iCub_SIM in Mac OS X
See these pages:
- iCub simulator on Mac OS X Lion: the definitive (?) tutorial by Fabio Ruini, University of Plymouth
- iCub simulator, complete MacOSX installation quide by Martin Peniak, University of Plymouth
Committing changes to the repositories
If you are a developer and you need to add/modify files within the repository, talk to one of the main developers and use Github/SourceForge.
Make sure that your SVN client is configured correctly with regard to auto-props, which is a mechanism that takes care of line endings and MIME filetypes according to wildcards (for example, setting some flags for *.txt files and other flags for *.sh). Go here for a better explanation, and check the 'Subversion client flags' subpage (part of the official manual, linked below) for auto-props adopted by RobotCub developers
To commit an application "APPNAME" (consisting of several modules and connections) in the main
part of the repository:
- check with the repository administrators if it's safe to put it in
main
rather thancontrib
- commit a
.xml.template
file inmain/app/APPNAME/scripts
that contains generic node names like "pwrNode1", "console" etc. - commit a VisLab-specific
.xml
file inmain/app/robots/iCubLisboa01/scripts
that contains our node names like "icubbrain1", "chico3" etc.