YARP  2.3.68+225-20170329.5+gitb0d3289
Yet Another Robot Platform
Installing YARP on Linux

Installation on Linux

Install from binaries

Add www.icub.org to your sources.list. Determine the Linux distribution you use.

E.g. for Ubuntu 14.04 Trusty (Note: you need to adapt these instructions according to your distribution).

sudo sh -c 'echo "deb http://www.icub.org/ubuntu trusty contrib/science" > /etc/apt/sources.list.d/icub.list'

(replace trusty with the name of the distribution).

For Debian 7.0 Wheezy (Note: you need to adapt these instructions according to your distribution).

sudo sh -c 'echo "deb http://www.icub.org/debian wheezy contrib/science" > /etc/apt/sources.list.d/icub.list'

(replace wheezy with the name of the distribution).

Update the list of packages and install YARP.

sudo apt-get update
sudo apt-get install yarp

You are now ready to check you installation, see Check your installation.

Install from sources

Install the following packages to prepare your development environment and get basic dependencies:

sudo apt-get install git cmake cmake-curses-gui libeigen3-dev libace-dev libedit-dev

For Qt5 different packages are needed for different systems.

Qt5 for Debian (jessie)

On Debian testing you need to install the following packages:

sudo apt-get install qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev \
qml-module-qtquick2 qml-module-qtquick-window2 \
qml-module-qtmultimedia qml-module-qtquick-dialogs \
qml-module-qtquick-controls libqt5svg5

Qt5 for Debian (wheezy)

On Debian wheezy, Qt5 packages are available in the backports repository.

You can enable the backports repository you have to add

deb http://backports.debian.org/debian-backports/ wheezy-backports main

to your /etc/apt/sources.list file, and then install the same packages required from Debian jessie from the backports repository:

sudo apt-get update
sudo apt-get install -t wheezy-backports qtbase5-dev \
qtdeclarative5-dev qtmultimedia5-dev qml-module-qtquick2 \
qml-module-qtquick-window2 qml-module-qtmultimedia \
qml-module-qtquick-dialogs qml-module-qtquick-controls libqt5svg5

Qt5 for Ubuntu (utopic and vivid)

Qt5 is available from the main repository. See dependencies_qt5_debian_jessie for instructions.

Qt5 on Ubuntu (trusty)

Qt5 packages are available from the main repository, but the package names are slightly different:

sudo apt-get install qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev \
qtdeclarative5-qtquick2-plugin qtdeclarative5-window-plugin \
qtdeclarative5-qtmultimedia-plugin qtdeclarative5-controls-plugin \
qtdeclarative5-dialogs-plugin libqt5svg5

Qt5 for other systems

If your distribution does not supply binary packages for Qt5, you can download a binary release from the Qt Project website, or download the source code, and build it yourself.

Alternatively you can compile all dependencies yourself following the procedure here: YARP Dependencies (notice however that this can be tedious, time consuming and error prone).

Compiling YARP

To get the source choose one of these addresses:

For example:

cd /home/user
git clone https://github.com/robotology/yarp.git

Generate makefiles using CMake:

cd yarp
mkdir build
cd build
ccmake ../

Set the following variables to true:

CREATE_GUIS, set to ON
CREATE_LIB_MATH, set to ON

(leave default values as they are unless you know better)

Remarks
CREATE_GUIS and CREATE_LIB_MATH require you have installed the libraries qt and gsl (you have, if you have followed the instructions above).

Makefiles generation is an iterative process, hit "c" until the option "Generate" becomes available. Then hit "g" and quit.

Compile:

make
sudo make install
sudo ldconfig

You are now ready to check you installation, see Check your installation.

Remarks
YARP is installed with the RPATH enabled. This allows to install YARP in another location by changing the CMAKE_INSTALL_PREFIX option (default is /usr/local). If you install YARP in a system directories, or if you use the LD_LIBRARY_PATH environment variable, you might want to disable the RPATH. In order to do this, you have to enable the CMAKE_SKIP_INSTALL_RPATH option in cmake.
If YARP is not installed in a system location, you you will have to set the YARP_DIR and YARP_DATA_DIRS environment variables to point to the installation directory, see Setup your environment.
Do not select other options unless you know what you are doing.

Setup your environment

If you have installed YARP in default location you can skip to Check your installation.

If you are using YARP without installing it or you have installed it in a custom location, or you have disabled RPATH, you have to tweak your environment (edit your .bashrc or similar) to:

  • Set environment variables YARP_DIR to the location where you installed YARP (or CMake's build directory if you did not perform the installation step) to allow cmake to find YARP easily for your own projects. Set YARP_DATA_DIRS to $YARP_DIR/share/yarp.
  • Add YARP_DIR/bin to PATH to allow your shell to find YARP programs.
  • Add YARP_DIR/lib to LD_LIBRARY_PATH to allow YARP programs to find YARP libraries, if you enabled CMAKE_SKIP_INSTALL_RPATH and did not install in a system directory.