/codyco-superbuild

Software repository for FP7 project CoDyCo - Whole-body Compliant Dynamical Contacts in Cognitive Humanoids - http://www.codyco.eu

Primary LanguageShell

CoDyCo Project Superbuild

Linux/OS X
Build Status
The CoDyCo project is a four-years long project that started in March 2013. At the end of each year a scenario will be used to validate on the iCub the theoretical advances of the project.

More info at http://codyco.eu/

Code documentation automatically generated: http://wiki.icub.org/codyco/dox/html/index.html

This is a meta repository (so-called "superbuild") that uses YCM to compile CoDyCo software. A YCM Superbuild is a CMake project whose only goal is to download and build several other projects. You can read more about the superbuild concept in YCM documentation.

codyco-superbuild will download and build the following projects:

  • codyco-commons: A collection of functions and utilities used in the other projects Project page
  • idyntree: YARP-based Floating Base Robot Dynamics Library Project Page
  • paramHelp: Library for simplifying the management of the parameters of YARP modules Project page
  • wholebodyinterface: C++ Interfaces to sensor measurements, state estimations, kinematic/dynamic model and actuators for a floating base robot Project Page
  • yarp-wholebodyinterface: Implementation of the wholeBodyInterface for YARP robots Project Page
  • WBI-Toolbox: Simulink Toolbox for rapid prototyping of Whole Body Robot Controllers Project Page
  • codyco-modules: YARP modules and controllers developed within the European Project CoDyCo project Page

Update

For updating the codyco-superbuild repository it is possible to just fetch the last changes using the usual git command:

git pull

However, for running the equivalent of git pull on all the repositories managed by the codyco-superbuild, you have to execute in your build system the appropriate target, for example:

make update-all

Installation

The gazebo-yarp-plugins, that are usually used for testing CoDyCo software simulating the iCub in Gazebo, are not installed by the codyco-superbuild. If you want to simulate the iCub in Gazebo you have to follow the instruction in gazebo-yarp-plugins README.

We provide different instructions on how to install codyco-superbuild, depending on your operating system:

  • Windows: use the superbuild with Microsoft Visual Studio
  • OS X: use the superbuild with Xcode or GNU make
  • Linux: use the superbuild with make

##Windows

###System Dependencies

####CMake To install CMake you can use the official installer available at http://www.cmake.org/cmake/resources/software.html .

####Eigen You can install Eigen from source code available from the Eigen official website. You can simply extract the Eigen source code in a directory, and then define the EIGEN3_ROOT environment variable to the path of the directory that contains the file signature_of_eigen3_matrix_library (it should be the first directory contained in the compressed file.

####Boost The easy way to install Boost on Windows is to use the Boost binaries installers. Pay attention to download a release that matches your Visual Studio version. Furthermore as iCub software does not support 64bit compilation at the moment we reccomend to compile the codyco-superbuild as 32bit software, and thus you have to downalod 32bit binaries for Boost.

After downloading and installing the Boost libraries, you then need to set the following two environment variables to point respectively to the path of the libraries and the headers, for example:

BOOST_LIBRARYDIR=C:\path\where\boost\is\libboost_1_54_0\lib32-msvc-10.0
BOOST_INCLUDEDIR=C:\path\where\boost\is\libboost_1_54_0

####YARP & iCub For installing the latest version of YARP and ICUB software, please refer to the official iCub documentation.

###Superbuild If you didn't already configured your git, you have to set your name and email to sign your commits:

git config --global user.name FirstName LastName
git config --global user.email user@email.domain 

After that you can clone the superbuild repository as any other git repository, and generate the Visual Studio solution using the CMake gui. Then you open the generated solution with Visual Studio and build the target all. Visual Studio will then download, build and install in a local directory all the CoDyCo software and its dependencies.

###Configure your environment Currently the YCM superbuild does not support building a global install target, so all binaries are installed in codyco-superbuild/build/install/bin and all libraries in codyco-superbuild/build/install/lib.

To use this binaries and libraries, you should update the necessary environment variables.

Set the environment variable CODYCO_SUPERBUILD_DIR so that it points to the directory where you clone the codyco-superbuild repository.

Append $CODYCO_SUPERBUILD_DIR/build/install/bin to your PATH

Append $CODYCO_SUPERBUILD_ROOT/build/install/share/codyco to your YARP_DATA_DIRS environment variable.

##OS X

###System Dependencies To install Eigen and CMake, it is possible to use Homebrew:

brew install eigen cmake boost tinyxml

For installing the latest version of YARP and ICUB software, please refer to the official iCub documentation.

###Superbuild If you didn't already configured your git, you have to set your name and email to sign your commits:

git config --global user.name FirstName LastName
git config --global user.email user@email.domain 

Finally it is possible to install CoDyCo software using the YCM superbuild:

git clone https://github.com/robotology-playground/codyco-superbuild.git
cd codyco-superbuild
mkdir build
cd build

To use GNU Makefile generators:

cmake ../
make

To use Xcode project generators

cmake ../ -G Xcode
xcodebuild -configuration Release

###Configure your environment Currently the YCM superbuild does not support building a global install target, so all binaries are installed in codyco-superbuild/build/install/bin and all libraries in codyco-superbuild/build/install/lib.

To use this binaries and libraries, you should update the PATH and DYLD_LIBRARY_PATH environment variables.

An easy way is to add this lines to the '.bashrc` file in your home directory:

CODYCO_SUPERBUILD_ROOT=/directory/where/you/downloaded/codyco-superbuild
export PATH=$CODYCO_SUPERBUILD_ROOT/build/install/bin:$PATH
export DYLD_LIBRARY_PATH=$CODYCO_SUPERBUILD_ROOT/build/install/lib:$DYLD_LIBRARY_PATH
export YARP_DATA_DIRS=$YARP_DATA_DIRS:$CODYCO_SUPERBUILD_ROOT/build/install/share/codyco

To use the updated .bashrc in your terminal you should run the following command:

user@host:~$ source ~/.bashrc

##Linux ###System Dependencies On Debian based systems (as Ubuntu) you can install CMake and Eigen (and other dependencies necessary for the codyco-superbuild) using apt-get:

sudo apt-get install libeigen3-dev cmake cmake-curses-gui libboost-system-dev libboost-thread-dev libtinyxml-dev libace-dev libgtkmm-2.4-dev libglademm-2.4-dev libgsl0-dev libcv-dev libhighgui-dev libcvaux-dev libode-dev

The packages provided in the official distro repositories work out of the box for Ubuntu 14.04 (trusty), Ubuntu 13.10 (saucy) and Debian 8 (jessie). For older distros the included CMake and Eigen are too old, and is necessary to find a way to install them from an alternative source:

If for some reason you are bound to use Eigen 3.0.5 (for example for XDE compatibility) you can just set to off the CODYCO_USES_EIGEN_320 CMake variable. In this way you will compile just the software that is compatible with Eigen 3.0.5 .

For installing the latest version of YARP and ICUB software, please refer to the official iCub documentation. Please note that at the moment the codyco-superbuild only supports YARP and ICUB installed from sources.

###Superbuild If you didn't already configured your git, you have to set your name and email to sign your commits:

git config --global user.name FirstName LastName
git config --global user.email user@email.domain 

Finally it is possible to install CoDyCo software using the YCM superbuild:

git clone https://github.com/robotology-playground/codyco-superbuild.git
cd codyco-superbuild
mkdir build
cd build
ccmake ../
make

###Configure your environment Currently the YCM superbuild does not support building a global install target, so all binaries are installed in codyco-superbuild/build/install/bin and all libraries in codyco-superbuild/build/install/lib.

To use this binaries and libraries, you should update the PATH and LD_CONFIG_PATH environment variables.

An easy way is to add this lines to the '.bashrc` file in your home directory:

CODYCO_SUPERBUILD_ROOT=/directory/where/you/downloaded/codyco-superbuild
export PATH=$PATH:$CODYCO_SUPERBUILD_ROOT/build/install/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CODYCO_SUPERBUILD_ROOT/build/install/lib
export YARP_DATA_DIRS=$YARP_DATA_DIRS:$CODYCO_SUPERBUILD_ROOT/build/install/share/codyco

To use the updated .bashrc in your terminal you should run the following command:

user@host:~$ source ~/.bashrc

If may also be necessary to updates the cache of the dynamic linker:

user@host:~$ sudo ldconfig