Menu

MacSources

Tomassino Ferrauto Gianluca Stefano Nolfi
Prev: Linux - Installing from Sources Up: Installation Next: Running the Exemplificative Experiments

Table of contents

Mac - Installing from Sources

Assumptions

In the following guide, we suppose that there is a base directory containing everything we need. You can create it wherever you prefer (e.g. inside your home directory) and we will refer to this directory as BASE_DIR. Inside BASE_DIR create the following subdirectories:

  • source — it will contain the source code
  • build — it will contain Makefiles for compiling and debugging
  • opt — it will contain the software installed by the Makefiles in the build directory

Step 1: Install all necessary programs and libraries

Install the following programs:

  • C++ compiler - FARSA is known to compile with the compiler shipped with XCode, provided that command line tools are installed
  • 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

We advice to use the MacPorts package manager to install the dependencies. If you decide to use it, here are the commands that are needed to install dependencies

Installing via MacPorts may take some hours due to compilation of big libraries like Qt4, Gtk2, Gtkmm, etc

  • Install CMake with the following command:

    sudo port install cmake
    
  • Install Qt (4.x version) with the following command:

    sudo port install qt4-mac
    
  • Install GSL with the following command:

    sudo port install gsl
    

Step 2: Compile and Install FARSA

  • Add the following environment variables:

    FARSA_DIR = BASE_DIR/opt/farsa
    PATH = $FARSA_DIR/bin:$PATH
    
  • Download and extract the FARSA source code package farsa-x.y.z .zip or .tar.gz file (sourceforge.net) inside the BASE_DIR/source directory

  • Create the directory where we will build FARSA: BASE_DIR/build/farsa
  • Generate the Makefiles for building FARSA using CMake with following settings:

    Source directory = BASE_DIR/source/farsa-x.y.z
    Build directory = BASE_DIR/build/farsa
    CMAKE_INSTALL_PREFIX = BASE_DIR/opt/farsa
    USE_GLS = ON
    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 from the BASE_DIR/build/farsa with the following commands:

    cd BASE_DIR/build/farsa
    make
    make install
    
    • If you setted CMake to generate project file for XCode, then you do not have to run the make command above, but instead open the generated project file with XCode and start the compilation and installation of FARSA

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).

In order to compile the FARSA iCub plugin, you first need to install YARP and iCub. The installation of both packages can be performed via MacPorts:

  • Download Portfile instruction packages from the sourceforce repository

    svn checkout svn://svn.code.sf.net/p/farsa/code/farsaMacports BASE_DIR/source/farsaMacports
    
  • Edit the sources configuration file of MacPorts:

    sudo nano /opt/local/lib/etc/macports/sources.conf
    

    and add the following line at the end:

    file:///BASE_DIR/source/farsaMacports
    
  • Run the following command to install YARP and iCub

    sudo port install robotcub
    
  • Execute the following command to setup the environment paths for YARP and iCub

    robotcubSetupEnv
    

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 BASE_DIR/opt/bin


Related

Manual: Home
Manual: Installation
Manual: LinuxSources
Manual: RunningExperiments

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB