Menu

LinuxSources

Tomassino Ferrauto Gianluca Stefano Nolfi
Prev: Windows - Installing from Sources Up: Installation Next: Mac - Installing from Sources

Table of contents

Linux - Installing from Sources

Assumptions

In the following guide, we will assume that FARSA source files are in the SOURCES_DIR directory, that the building process will make use of makefiles and will happen in the BUILD_DIR directory and that FARSA will be installed in the INSTALL_DIR directory. You can put those directories wherever you want, but we suggest you to follow these guidelines:

  • keep the SOURCES_DIR and BUILD_DIR separated. This will make it easy to start compilation from scratch in case something goes wrong by simply deleting the content of BUILD_DIR;
  • if you set INSTALL_DIR to /usr/local (or even /usr) you will not need to set any environment variable when executing FARSA or developing plugins. If, however, you don't want to use system paths (or you simply can't), you can use any other location. Make sure you set all the environment variables listed below, though.

Step 1: Install all necessary programs and libraries

Install the following programs:

  • C++ compiler - FARSA is known to compile with GCC, other compilers have not been tested (though they should work as long as they are standard-compliant)
  • CMake - Use version 2.8 or above. During installation we will use it to generate Makefiles
  • Qt - FARSA has been tested with both version 4.x and 5.x
  • GSL - this is a library with optimized math routines. It is optional but strongly recommended

All the programs and libraries above should be available with any recent Linux distribution. The easiest way to install them is generally through your distribution package manager.

Step 2: Compile and Install FARSA

  • Add the following environment variables (they are not necessary if you install FARSA in system paths, such as /usr or /usr/local):

    :::INI
    FARSA_DIR=INSTALL_DIR
    PATH=$FARSA_DIR/bin:$PATH
    LD_LIBRARY_PATH=$FARSA_DIR/lib:$LD_LIBRARY_PATH

  • Download and extract the FARSA source code package farsa-x.y.z .zip or .tar.gz file (sourceforge.net) inside the SOURCES_DIR directory. Alternatively you can chekout code directly from the svn repository.

  • Create the BUILD_DIR directory, where FARSA will be built.
  • Generate the Makefiles for building FARSA using CMake with the following settings (i.e. run CMake, using SOURCES_DIR as that directory with source files and BUILD_DIR as the directory with binary files, press the CONFIGURE button, set the parameters specified below, and finally press the CONFIGURE and then the GENERATE buttons):

    :::INI
    CMAKE_INSTALL_PREFIX = INSTALL_DIR
    USE_GSL = ON # Only if you installed GSL, otherwise set to OFF
    EXPERIMENTAL_NEWTON_FROMSOURCE = ON
    FARSA_USE_QT5 = OFF # If you have QT 4.x installed, set to ON if you have QT 5.x installed

  • Compile and install FARSA with the following commands (in a terminal):

    :::bash
    cd BUILD_DIR
    make
    make install

Note: if compilation fails with errors regarding SSE (like "SSE instruction set not enabled"), try adding the "-march=native" option to the CMAKE_CXX_FLAGS and CMAKE_C_FLAGS cmake variables. These variables are marked as advanced, and are not displayed by default. You can enable the visualization of those variables pressing "t" (if using ccmake) or by checking the "Advanced" checkbox (if using cmake-gui).

Step 3 (optional): Compile and Install the iCub plugin

Support for the iCub robot in FARSA is now in a plugin, which needs to be compiled and installed. The plugin can be found in the farsa-plugins package (available here) or directly in the svn repository.

In order to compile the FARSA iCub plugin, you first need to install YARP and iCub. The instructions for both are provided at this page. The FARSA iCub plugin should work with versions of YARP following 2.3.62 and of iCub following 1.1.

Once the dependencies have been installed, you can compile and install the iCub plugin as any other plugin. The procedure is explained in this page. Remember to install the iCub plugin so that it can be used by other plugins depending on it.

Run and Test Total99

If everything went well, you should now be able to start the total99 executable simply by double-clicking on the executable present into INSTALL_DIR/bin.


Related

Manual: Home
Manual: Installation
Manual: MacSources
Manual: WindowsSources

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB