ICub Simulator Installation

From Wiki for iCub and Friends
Jump to: navigation, search

iCub Simulation

Requirements

Parts of the RobotCub software and the iCub simulator depend on external libraries. Here we keep track of the list of libraries needed and documentation for installing them.

The typical RobotCub software dependencies, see Chapter 6 of the iCub manual (http://wiki.icub.org/wiki/Manual) for instructions on how to install these dependencies.

The iCub Simulator needs extra libraries:

  • ODE (Open Dynamic Engine)
  • SDL (Simple DirectMedia Layer)

Installation

We assume you have prepared your system as in the Chapter 6 of the manual (http://wiki.icub.org/wiki/Manual).

Important: the iCub installation binaries provide all the dependencies and the simulator so you no longer need to follow the steps below. To install the simulator you can follow the iCub installation instructions in the manual.

ODE

Instructions for different systems are reported below.

Common notes:

The simulator now supports version >= 0.10built as single or double precision. Double precision is recommended and important if planning to import 3D models into the simulator.

Single precision is much faster and uses less memory but you might encounter more numerical errors. The double precision was suggested as you would have more accuracy and stability, the downside is that it works a bit slower.

--enable-libccd option is necessary if you want cylinder-cylinder collisions support. This is handy for example for bimanual tasks - all iCub fingers are cylinders.

Linux

sudo apt-get install libglut3 libglut3-dev

Linux: Installing ODE

Windows: binaries

  • We provide binaries for Microsoft Visual Studio 2008 and 2009 at:
 http://wiki.icub.org/iCub/downloads/packages/windows/common

Just unpack the zip file.

Set the environment variable ODE_DIR to point to the directory where you unpacked the package.

Windows: compilation

Follow these instructions if you do not want to use precompiled binaries (as described above), but prefer to compile ode on your system.

  • Get the sources from the ODE website.
Generate project files for your compiler: 
 cd %ODE_DIR%/build
 premake --target vs2005

To get a list of targets run premake --help

  • Open the project file in %ODE_DIR%/build and compile. In windows the library should be compiled in all modes, release, debug single and double prevision. If you wish to use double precision (Look at the ODE_DIR/build and use premake to compile as required. This is true for ode 0.11 for later versions please read their updated instructions). ODE installation instructions are in the INSTALL.txt file (ODE source root).

Set the environemtn variable ODE_DIR to point to the directory where you unpacked the sources.

Note: in ode 0.11.1 , the premake command is:

 premake4 vs2005

SDL

The new simulator requires the SDL (Simple DirectMedia Layer) drawing libraries.

Linux

In Linux Debian/Ubuntu just install libsdl1.2-dev. No environment variables will be needed.

 sudo apt-get install libsdl1.2-dev

Windows

  • Get the sdl archive from:
 http://wiki.icub.org/iCub/downloads/packages/windows
 or directly the SDL-devel-1.2.13-VC8.zip from http://www.libsdl.org/download-1.2.php. 
  • Unzip this archive where you like.

Set the environment variable SDLDIR to point to the directory created by the unzip procedure (e.g. SDL-1.2.13). CMake needs this environment variable to locate the library.

Add SDLDIR/lib to the system path.

Note If you get an error such as "the application has failed to start because SDL.dll was not found" it means that you did not update correctly the system path (last point in the previous list).

Simulator

The latest version of the iCub simulator can be found in $ICUB_ROOT/main/src/simulators/iCubSimulation.

To know how to use the simulator refer to the README file included with the source code. (Also available in this manual as Simulator README).

To compile the simulator

If the required libraries are correctly installed, icub simulator will be compiled correctly when compiling iCub software. Make sure you execute the install_applications target.

To run the simulator run iCub_SIM, it will then pick up the default configuration files if make install_applications is used. Alternatively specify the configuration file on the command line.

Drawstuff dependencies

The dependency on these routines has now been removed. For old notes see here.