YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
YARP Dependencies

Required Dependencies

YARP does not have any strong build dependencies, the only requirements are a C++ compiler and CMake. We assume you have already installed them in your system.

Compilation instructions for YARP are reported here: install. This page reports instructions for compiling the dependencies in case you do not want to use precompiled libraries.

The ACE Library

ACE is a free and open source library that provides an excellent portable interface to a vast array of operating systems, dealing with the details so you don't have to.

ACE is required on all the platforms except for Linux. Without ACE, YARP will be able to connect using TCP only, and will have limited functionality.

The general approach to installing ACE

  • For Ubuntu and other deb-based systems, we suggest you install the libace-dev package (on rpm-based systems, try libace-devel).
        sudo apt-get install libace-dev
  • For Windows and other systems we suggest the latest stable release (ACE-N.N.zip/ACE-N.N.tar.gz). Download ACE here.

Compile ACE using our summary instructions, below, or through the official method given here. Don't panic! The instructions cover a lot of operating systems and compilers. Just look carefully for your combination.

  • Windows/DevStudio instructions are here .
  • UNIX/gcc instructions are here.
  • macOS/gcc users, follow the UNIX instructions.

ACE will take a while to compile, but if you can do it you'll be able to deal with anything we throw at you.

Compiling ACE on UNIX

If you are on a system with a binary ACE package (Debian, Redhat, ... – it is usually called libace-dev or libace-devel), then you can just install that and you are done. Otherwise you need to download ACE-5.5.tar.gz as described above and follow these steps:

  • Let's suppose you have placed ACE-5.5.tar.gz in the directory $HOME/work/. Then, in this directory, type:
        tar xzvf - < ACE-5.5.tar.gz
  • You should now have a subdirectory called "ACE_wrappers". Type one (or if you're not sure which, type both) of:
        export ACE_ROOT=$PWD/ACE_wrappers
        setenv ACE_ROOT $PWD/ACE_wrappers
  • One of these lines will succeed and the other will fail, depending on what shell you use. That's fine. as long as when you type: <tt>echo $ACE_ROOT you get the ACE_wrappers directory.
  • You now need to configure ACE to your platform, by creating one build file and one include file. If you are on Linux, type:
        cd $ACE_ROOT/include/makeinclude/
        ln -s platform_linux.GNU platform_macros.GNU
        cd $ACE_ROOT/ace
        ln -s config-linux.h config.h
  • If you are not on Linux, or even if you are, you should take a look at the platform_*.GNU and config-*.h files and pick the one that matches you.
  • Now, to compile, type:
        cd $ACE_ROOT/ace; make
  • If all goes well, at the end you will have some files in ACE_wrappers/ace, for example:
        $ ls $ACE_ROOT/lib/
        libACE.so  libACE.so.5.4.7
    (the .so may be .dylib or other variants):
  • One thing remains to be done; programs need to be able to find the ACE library at run time. You can set this up by running one of the following:
        export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
        setenv LD_LIBRARY_PATH $ACE_ROOT/lib:$LD_LIBRARY_PATH
  • (On macOS, the variable you need to set is DYLD_LIBRARY_PATH).
  • An alternative is to copy the files in $ACE_ROOT/lib to a standard library directory, for example, /usr/lib.
  • We've given a simple procedure that works for most people. But if you run into a lot of trouble, we suggest you delete the ACE_wrappers directory, recreate it with tar again as above, and follow carefully all the detailed instructions here.

Compiling ACE on Windows

For Borland C++Builder, MinGW, Cygwin instructions build instructions are here.

For Visual Studio, here's a brief summary of the steps.

  • Get ACE-5.5.zip as described above.
  • Unpack its contents to a directory. Find the directory ACE_wrappers in the unpacked material.
  • In the ACE_wrappers\ace directory, create a file called config.h and edit it to be just this:
    #include "ace/config-win32.h"
  • Open Visual Studio. Go to open a project/workspace/solution, and browse to the directory ACE_wrappers\ace .
  • Find the project/workspace/solution that works for you: probably called ACE.dsw or ace_vc8.sln.
  • Compile! We suggest you compile both debug and release versions of the library.
  • On Visual Studio Express, you may need to add the in project properties -> linker -> input -> additional dependencies: kernel32.lib, user32.lib, advapi32.lib. See also here (FIXME broken)
  • In the end, you should have some files in the directory ACE_wrappers/lib, including ACE.dll, ACE.lib, ACEd.dll, ACEd.lib (if you compiled both release and debug versions).
  • You must make sure you include the path to ACE_wrappers\lib in your PATH environment variable whenever you run programs that uses ACE. See generic instructions for setting environment variables here.
  • It is also a good idea to set an environment variable ACE_ROOT to hold the path to ACE_wrappers. This will make it easier to find the libraries and header files.

On Windows you can unzip the ACE distribution and simply open the workspace file contained within it from within Visual Studio and then start the compilation. We recommend you compile twice, once in debug mode and release mode, so you have both versions of the library available later.

Eigen

Eigen is a C++ template header only library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.

If not installed, you will not be able to enable the YARP_math library.

Linux

The most convenient way of installing Eigen in recent Linux distribution is using the system package manager. For example in Debian/Ubuntu you can install the libeigen3-dev package by typing on a terminal:

sudo apt-get install libeigen3-dev

macOS

The most convenient way of installing Eigen in macOS is using homebrew. If you have installed homebrew on your computer, you can install eigen by typing on a terminal:

brew install eigen

Windows

The most convenient way of installing Eigen on Windows is by downloading the compressed archive of the latest version of Eigen from the Eigen website. As Eigen is an header only library, you can just unzip the archive in a directory, and point the EIGEN3_ROOT environment variable to the directory in which you uncompressed the archive. In particular EIGEN3_ROOT should point to the directory containing the signature_of_eigen3_matrix_library file.

GUI Dependencies

Qt5 (Recommended)

Qt 5.2 or later is required. YARP GUIs use the QtQuick Controls module that is available only since 5.2.

The recommended way to install Qt5 on your system is to use the binary packages supplied by your distribution (if available). If they are not available, you can download a binary release from the Qt Project website, or download the source code, and build it yourself.

If you installed Qt5 from the Qt Project website, you will also need need to set up the environment variable Qt5_DIR pointing to the location where Qt5 cmake modules are, e.g. for Qt 5.3 on Linux 64 bit:

export Qt5_DIR=/path/to/Qt/5.3/gcc_64/lib/cmake/Qt5/

Alternatively you can add the install path to the CMAKE_PREFIX_PATH environment variable, for example:

export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/path/to/Qt/5.3/gcc_64/

Linux

Debian/Ubuntu

On Debian and Ubuntu systems, you need to install the following packages:

  • qtbase5-dev
  • qtdeclarative5-dev
  • qtmultimedia5-dev
  • qml-module-qtquick2
  • qml-module-qtquick-window2
  • qml-module-qtmultimedia
  • qml-module-qtquick-dialogs
  • qml-module-qtquick-controls

You can install them by running:

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

Others

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.

Windows

Qt5 binary package for Windows is available from the Qt Project website

macOS

Qt5 binary package for Mac is available from the Qt Project website