ICub Simulator Installation

From Wiki for iCub and Friends
Revision as of 16:43, 23 July 2010 by Vvv10 (talk | contribs) (Windows)
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://eris.liralab.it/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://eris.liralab.it/wiki/Manual).

ODE

Install and compile the ODE library. For all platforms, download the ODE source directly from ODE and compile. It is recommended not to use the Debian/Ubuntu packages as large amount of numerical problems will appear (reported by many). 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. Please refer to the ODE instructions on how to build the library.

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.

Linux

  • Generate make files

Type:

 ./configure --enable-double-precision
 Optional parameters:
 --enable-shared --disable-drawstuff --disable-demos

Source code versions can be downloaded here.

  • Compile ode
 make
  • Install openGL:
 sudo apt-get install libglut3 and sudo apt-get install libglut3-dev

Windows

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

Important don't forget to set the ODE_DIR variable to your environment otherwise CMake will fail to locate the ode library.

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 archive 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_DIR/main/src/simulators/iCubSimulator.

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 LINUX: go to the source directory, run cmake and make. WINDOWS: cmake and build in release (recommended) or debug

To run the simulator run iCub_SIM from the source directory, picking up the default configuration files. 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.