iCub software installation

This page will walk you through the installation of iCub's software. You can find most of the information on the web; here we provide the pointers to the things you need to do to make it fast and easy. If you are having problems, ask Serena Ivaldi.

  1. Prepare your machine,
  2. Install Gazebo,
  3. Install Yarp and iCub software,
  4. Install Codyco.

Before starting, we list the useful links:

We hereby assume you're using Ubuntu 12.04. In case you want to upgrade to Ubuntu 14.04:

  1. Upgrade Ubuntu.

We advice to install all source code in your home folder, and change the installation prefix during cmake compilation. For example, for the user "icub" you may set the following installation prefix:
This way you will have:
/home/icub/software/src : folder where you put icub, yarp, ...
/home/icub/software/bin : binaries
/home/icub/software/lib : libraries
.. and so on. This requires to update the LD_LIBRARY_PATH and PATH environment variables, which you can easily do when you install the software.

Prepare your machine

You should prepare your machine first by installing the useful packages/libraries:

 sudo apt-get install doxygen cmake g++ mercurial pkg-config build-essential  

For yarp you only need ACE:

 sudo apt-get install libace-dev

For iCub software you need some additional libraries (opencv, gfortran, ode, gtk, ..):

 sudo apt-get install cmake-curses-gui
 sudo apt-get install libncurses5-dev libgtkmm-2.4-dev libglademm-2.4-dev  libgsl0-dev  libode-dev libsdl1.2-dev 
 sudo apt-get install libcv-dev libopencv-dev libhighgui-dev libcvaux-dev libopencv-gpu-dev libopencv-highgui-dev libopencv-core-dev
 sudo apt-get install gfortran
 [for Ubuntu 12] sudo apt-get install libqt3-mt-dev   
 [for Ubuntu 14] sudo apt-get install libqt4-dev libqt4-gui libqt4-qt3support

the last package is necessary to install IPOPT:

For Gazebo and CoDyCo software you will need to install some libraries

 sudo apt-get install libprotoc-dev libprotobuf-dev protobuf-compiler libqt4-dev libtar-dev libcurl4-openssl-dev 
 sudo apt-get install libcegui-mk2-dev libopenal-dev libtbb-dev libswscale-dev libavformat-dev libavcodec-dev 
 sudo apt-get install libgts-dev libltdl3-dev playerc++ libxml2-dev libfreeimage-dev freeglut3-dev
 sudo apt-get install libogre-1.8-dev
 sudo apt-get install libtinyxml-dev
 sudo apt-get install libboost-dev libboost-system-dev libboost-all-dev
 sudo apt-get install libeigen3-dev


  • Ogre: Check If libogre-1.8-dev does not work: sudo apt-get install libogre-dev
  • Eigen3: Check Eigen must be at least version 3.2. To check your version do: dpkg -s libeigen3-dev. If it is not, do the following: download eigen3 from the bitbucket repository. Then try to install it on your usual folder - the cmake option will install it for example in /home/icub/software/include/eigen3. Then copy the subfolders Eigen and unsupported into /usr/include/eigen3: sudo cp -f eigen3 /usr/include (beware you cannot mv if the home is on a nfs system).

The bashrc file should be modified to include a number of environmental variables. We suggest to create a file called bashrc_icub and put it in /home/icub/software. If you followed our advice about where to put the sources, then you can copy-paste the following lines in the bashrc_icub file:

 echo "Exporting iCub environment variables from specific file.."
 export ICUB_INSTALL_PREFIX=/home/icub/software
 export YARP_DIR=$YARP_ROOT/build
 export YARP_CONF=/home/icub/.yarp
 export YARP_ROBOT_NAME=iCubDarmstadt01
 export ICUB_ROOT=$ICUB_INSTALL_PREFIX/src/icub-main
 export ICUB_DIR=$ICUB_ROOT/build
 export IPOPT_DIR=$ICUB_INSTALL_PREFIX/src/Ipopt/build
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/icub/software/lib/pkgconfig/
 echo "Welcome $YARP_ROBOT_NAME!"

This file should be included in the .bashrc file, inside your home folder. To do this, add these lines at the top of the .bashrc file:

 # iCub software
  if [ -f /home/icub/software/bashrc_icub ]; then
      . /home/icub/software/bashrc_icub

Make sur these lines are added before this line: [ -z "$PS1" ] && return

Install Gazebo simulator

Gazebo was selected as the official CoDyCo simulator, and is now the official iCub simulator. You can find the tutorials and more information on

You can choose the standard download via apt-get, check their wiki pages for installation. Remember to install also the development library.

You can also install the simulator from sources, as you get to use different physical engines: ODE, Bullet, SimBody and DARTS.

  • First, make sure you can download packages from restricted and multiverse in apt-get settings (update bar - click on "preferences") - the reason is that apparently bullet library is not updated to the last version in the german repository of Ubuntu
  • Go to | Install Gazebo from sources and follow the instructions ...
  • ... install the physics engines
  • ... install the optional dependencies
  • ... install SDFormat
  • ... install Gazebo (finally!)

Install Yarp and iCub software

To control the iCub, you need yarp and iCub's main software (icub-main).

There are other software repositories related to iCub that may be useful (not mandatory, but good to know):

To install the yarp plugins for using Gazebo as simulator, do:

Install CoDyCo software through the superbuild:

  • Download CoDyCo superbuild and follow instructions
  • DO NOT DO make install => leave it local and add the /bin and /lib to the env variables. You should have something like that:
  • if you are missing some libraries the superbuild should download them for you
  • beware it is experimental: many things rapidly change, so don't play with the flags!

=> Before the codyco-superbuild, there was a long list of modules to download, such as: You can then proceed with the installation of:

Upgrade Ubuntu 12.04 to 14.04

  • Check you can do the upgrade
 sudo apt-get install update-manager-core
  • First update your machine
 sudo apt-get update
 sudo apt-get upgrade
 sudo do-release-upgrade --check-dist-upgrade-only --devel-release
  • Check that the do-release-upgrade offers you to upgrade to 14.04 (Trusty Tahr). If not, change the settings of your update-manager to specify the use of LTS packages. In alternative, modify /etc/update-manager/release-upgrades and set Prompt=lts
  • Update to 14.04
 sudo do-release-upgrade -d


zum Seitenanfang