UserPreferences

PlayerStageGazeboInstallation


1. Prerequisites

 $ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
Player/Stage/Gazebo installation instructions in a Fedora C2 machine:
=====================================================================

This notes represent the installation procedure of PSG in a Fedora C2 machine.
------------

PSG webpage: http://sourceforge.net/projects/playerstage
------------

NOTES:

*PSG installation should be done with only this version of the packages. Otherwise the latest version should be ok.
------------

Required programs:

Player: player-src-1.5.tar.gz : PSG webpage
Stage: stage-src-1.3.4.tar.gz : PSG webpage
Gazebo: gazebo-src-0.4.0.tar.gz : PSG webpage
OpenSceneGraph: OSG_OP_OT-0.9.6-2.tar.gz : http://openscenegraph.sourceforge.net
Geospatial Data Abstraction Library (GDAL) : gdal-1.2.0.tar.gz : http://www.remotesensing.org/gdal
*OpenDynamicsEngine (ODE) : ode-0.039.tgz : http://opende.sourceforge.net
Robotic Toolkit Library : librtk-src-2.3.0.tar.gz : PSG webpage
GNU Scientific Library : gsl-1.4.tar.gz : http://www.gnu.org/software/gsl
OpenGL Utility Toolkit : glut-3.7.tar.gz : http://opengl.org/resources/libraries/glut.html
------------

Gazebo installation
===================
(taken from gazebo README file written by A. Howard and N. Koenig; and modified accordingly)

OSG and ODE are mandatory. GDAL is required only for specific features
such as the MapExtruder and Terrain models, but is highly recommended.

If GLUT or parts of it missing from your system then GLUT is also mandatory. Look at /usr/include/GL if there is glut.h and in /usr/lib/ for libglut.so.3.7 (you may need the symbolink links libglut.so and libglut.so.3 pointing to this).

If a local install is performed, be sure to set your LD_LIBRARY_PATH and
CPATH environment variables accordingly.

 bash:
   $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/foo/local/lib
   $ export CPATH=$CPATH:/home/foo/local/include

OpenSceneGraph (OSG) Installation
---------------------------------
Install OpenThreads:
 $ cd OpenThreads
 $ make
 $ make [INST_LOCATION = path] install
   ex: make INST_LOCATION=/home/foo/local

Install Producer:
 $ cd Producer
 $ make OPENTHREADS_INC_DIR=/home/foo/local/include/OpenThreads OPENTHREADS_LIB_DIR=/home/foo/local/lib
 $ make [INST_LOCATION = path] install
   ex: make INST_LOCATION=/home/foo/local

Install OpenSceneGraph:
 $ cd OpenSceneGraph
 $ make OPENTHREADS_INC_DIR=/home/foo/local/include/OpenThreads OPENTHREADS_LIB_DIR=/home/foo/local/lib PRODUCER_INC_DIR=/home/foo/local/include/Producer PRODUCER_LIB_DIR=/home/captain/local/lib
 $ make [INST_LOCATION = path] install
   ex: make INST_LOCATION=/home/foo/local

OpenDynamicsEngine (ODE) Installation
-------------------------------------
NOTE: Only v.0.39 works with gazebo 0.4

Install OPCODE:
 $ cd OPCODE
 $ make
 $ mkdir <include path/opcode
   ex: mkdir /home/foo/local/include/opcode
 $ cp -r Ice *.h <include path>/opcode
   ex: cp -r Ice *.h /home/foo/local/include/opcode
 $ cp libopcode.a <library path>/lib

Install ODE:
 $ sed 's/#OPCODE/OPCODE/; s/DOUBLE/SINGLE/' config/user-settings > config/user-settings.new
 $ mv config/user-settings.new config/user-settings
 $ make configure          # create configuration file include/ode/config.h
 $ make ode-lib            # build the core ODE library
 $ make drawstuff-lib      # build the OpenGL-based graphics library
 $ make ode-test           # build some ODE tests (they need drawstuff)
 $ make drawstuff-test     # build a test app for the drawstuff library
 $ make OPCODE_DIRECTORY=/home/captain/local/lib
 $ cp -r include/ode <include path>/ode
   ex: $ cp -r include/ode /home/nate/local/include/ode
 $ cp lib/libode.a <library path>

Geospatial Data Abstraction Library (GDAL) Installation
-------------------------------------------------------
 $ ./configure --prefix=/home/foo/local --without-python
 $ make
 $ make install

OpenGL Utility Toolkit local installation
-----------------------------------------
(taken from glut <glut dir>/linux/README file written by P.F. Martone, updated by M. Kilgard; and modified accordingly)

Some files included in this archive:

   Glut.cf -- file required by imake-- use this to replace the
     stock version that came with GLUT.

   Makefile -- Makefile required to build ELF library,  belongs in
     the $GLUT_HOME/lib/glut/. directory.

The steps to make this work are:

    1) Change into $GLUT_HOME/. and make a backup copy of the
   Glut.cf file. Then, take the copy from this archive and move it
   into $GLUT_HOME.

    2) Run the script to build all the makefiles:

     ./mkmkfiles.imake

    3) Change into $GLUT_HOME/lib/glut/. and make a backup copy of
   the Makefile.  Now, take the Makefile out of the archive and
   replace the old one.

    4) WHILE STILL IN THE $GLUT_HOME/lib/glut/. DIRECTOR, RUN:

     make
     This should build the shared library 'libglut.so.3.7'.

   IF YOU HAVE PROBLEMS WITH HEADER FILE DEPENDENCIES, try
   doing:

     make depend
     make

   This should rebuild the Makefile dependencies.

   If this does not work, remove all the lines in "Makefile" below
   the line saying "DO NOT DELETE" (yes, disregard what the line
   says).  Then try "make depend; make"

    5) copy the files to your include and lib directories
   $ cp <glut home>/lib/glut/libglut.so.3.7 /home/foo/local/lib
   $ cp -r <glut home>/include/* /home/foo/local/include

    6) Go to the directory were libglut.so.3.7 was copied and make two symbolic links:

   $ cd /home/foo/local/lib
   $ ln -s libglut.so.3.7 libglut.so.3
   $ ln -s libglut.so.3.7 libglut.so

For further information refer to the <glut home>/linux/README file.


-------------------------
GAZEBO Local Installation
-------------------------
Export your library path:
 $ export LIBRARY_PATH=/home/foo/local/lib

Install gazebo:
 $ ./configure --prefix=/home/foo/local/gazebo
 $ make
 $ make install


Robotic Toolkit Library (librtk) installation
---------------------------------------------
 $ ./configure --prefix=/home/foo/local/librtk
 $ make
 $ make install


-------------------------
PLAYER Local Installation
-------------------------
Export gazebo and librtk paths:
 $ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/foo/local/gazebo/lib/pkgconfig:/home/foo/local/librtk/lib/pkgconfig

Install player:
 $ ./configure --prefix=/home/foo/local/player --enable-gazebo
 $ make
 $ make install


------------------------
STAGE Local Installation
------------------------
Install stage:
 $ ./configure --prefix=/home/foo/local/stage --with-player=/home/foo/local/player
 $ make
 $ make install