First of all
You must have a suitable Linux distribution running into your computer in order to install Player Robotics Interface and Gazebo 3D Robotics Simulator. The following are the steps you might follow to install Player and Stage on a Fedora 9 machine. It will work on similar distributions with similar configuration. Follow the first 2 steps in Personal Fedora 9 Installation Guide to install Fedora 9 correctly (in addition, great tips for F9), and add Development Support during installation in order to be able to compile and install Player/Stage and their prerequisites.
Gazebo relies on a number of third-party libraries that make installation a little bit tricky. If things go wrong, please check the Problem-solving section and the archives of the Gazebo mailing list. Please read the instructions below carefully before reporting posting to the mailing list.
(Comment: if using Fedora 8, you need install the ogre from binary package to correct the display bug)
Preparing your system
The the GUI component of Gazebo is designed to allow users to integrate their favorite GUI libraries with Gazebo. FLTK is the default GUI and requires third-party packages (OpenGL and OGRE) for 3D rendering that may not be installed on your system; if you plan to use the GUI, install these packages before proceeding:
Firstly, install the following OpenGL rpm packages if they are not present in your system (to chech them use $ rpm -qa <package-name>
). Use Yum for the installation ($ yum install <package-name>
).
- mesa-libGL: open-source implementation of the OpenGL specification
- mesa-libGL-devel: mesa-libGL development package
- mesa-libGLU: open-source implementation of the OpenGL Utility (GLU) library
- mesa-libGLU-devel: mesa-libGLU development package
- freeglut: completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library
- freeglut-devel: freeglut development package
Secondly, Gazebo render engine requires hardware 3D acceleration. In order to be able to run the GUI, you will need a suitable graphic card (ATI or nVIDIA) with hardware 3D acceleration. Please follow these instructions to setup the proper driver for your card:
ATI (NOT tested in Gazebo 0.8!)
$ yum -y install kmod-fglrx glx-utils
$ reboot
$ gedit /etc/X11/xorg.conf
Option "AIGLX" "off"
EndSection Section "Extensions"
Option "Composite" "Disable"
EndSection
Section "DRI"
Mode 0666
EndSection
nVIDIA: Personal Fedora 9 Installation Guide: Install Nvidia's driver
The following paths are not searched by default, leading to problems when compiling and linking some source packages. We therefore recommend that you configure your system with some additional paths (added to your etc/.bashrc script, for example):
export CPATH=/usr/local/include:$CPATH
export LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH
The first line sets the executable path; the second sets the path for C and C++ header files; the third line sets the library search path. You will also need to set two more paths:
This line sets the pkg-config path (a neat utility for managing source dependencies).
Then, install the following:
Install the GUI: FLTK (Fast Light Toolkit)
or
OGRE dependency: zziplib (Z Zip Library)
Due to a bug, add to /usr/local/lib/pkgconfig/zziplib.pc after "prefix=/usr/local" the following line: "datarootdir=${prefix}/share"
or
OGRE dependency: FreeImage
or
OGRE dependency: nVidia Cg Toolkit
OGRE dependency: OIS (Object Oriented Input System)
or
OGRE (Object-Oriented Graphics Rendering Engine)
or
To simulate rigid body physics, Gazebo utilizes ODE. Gazebo requires that ODE support trimeshes. A default install of ODE should enable trimesh suppport, if in doubt check the help files found in the ODE sources.
ODE (Open Dynamics Engine)
SCONS (if not already installed in you system)
or
Install Player 2.1.1
Prerequisites available at Fedora 9 Package List:
- libtool-ltdl-devel-1.5.24-6.fc9.i386.rpm - The GNU Portable Library Tool development package
Install from fedora rpm repository
Optional prerequisites:
- gsl-1.10.tar.gz - GNU Scientific Library for acml driver ($ yum install gsl gsl-devel)
- opencv-1.0.0.tar.gz - Real time computer vision ($ yum install opencv opencv-devel)
- libraw1394-1.3.0-7.fc9.i386.rpm - Library providing low-level IEEE-1394 access for camera1394 driver ($ yum install libraw1394)
- libraw1394-devel-1.3.0-7.fc9.i386.rpm - Development libs for libraw1394 ($ yum install libraw1394-devel)
- libavc1394-0.5.3-2.fc9.i386.rpm - Audio/Video Control library for IEEE-1394 devices for camera1394 driver ($ yum install libavc1394)
- libavc1394-devel-0.5.3-2.fc9.i386.rpm - Development libs for libavc1394 ($ yum install libavc1394-devel)
- libdc1394-2.0.2-1.fc9.i386.rpm
- libdc1394-devel-2.0.2-1.fc9.i386.rpm
- libjpeg-6b-41.fc9.i386* - A library for manipulating JPEG image format files for cameracompress driver
- libjpeg-devel-6b-41.fc9.i386* - Development tools for libjpeg
- <linux/joystick.h>* - The Linux joystick support for linuxjoystick driver
Python bindings for Player/Stage (optional):
$ mkdir -p /usr/local/lib/python2.5/
$ cd /usr/local/lib/python2.5/
$ ln -s /usr/lib/python2.5/site-packages
Add to /etc/bashrc :
export PYTHONPATH=/usr/local/lib/python2.5/site-packages:$PYTHONPATH
Install Player
Installing:
$ tar xvzf player-2.1.1.tar.gz
$ cd player-2.1.1
$ ./configure
$ make
$ make install
Running:
$ player /usr/local/share/player/config/pioneer.cfg
Install Gazebo 0.8 from SVN head (08.19.08) rev. 6886
Download from SVN head
Configure, compile and install
$ scons
$ scons install
Running Gazebo 0.8
The Gazebo server can be started as follows:
where xmlfile
is an XML configuration file containing the description of the world and everything in it. Sample world files can be found in the worlds
directory of the source distribution, or in the installed version under /usr/local/share/gazebo/worlds/
(default install). For example:
will create a simple world with a single robot. Gazebo will display a window with a view of the simulated world; the camera viewpoint can be changed by dragging the mouse in the window.
Player & Gazebo together
The Player device server treats Gazebo in exactly the same way that it treats real robot hardware: as a device that is a source of data and a sink for commands. Users must therefore run Player seperately, and point it at an running instance of Gazebo. Player has a number of specific drivers, such as gz_position and gz_laser that can be used to interact with Gazebo models.
For example, after starting Gazebo as per the above example, run Player like this (first download gazebo_rev6886.cfg):
Player will output a message indicating that is has connected with the simulator:
Users can now interact with the simulated robot exactly as they would a real robot. Try running playerv
, for example:
This will pop up the standard Player viewer utility. You should see an outline of the robot and the laser scan. Use the mouse to pan and zoom. You can drive the robot around by selecting the "command" option from the menu, then dragging the little cross hairs to where you want the robot to go. You should see the the robot in the Gazebo window moving at the same time.
See Player for examples of typical Player/Gazebo configurations, and consult the Player manual for information on specific Player drivers.
Model examples
The official tutorial on writting new models is here. However it is not up to date with the current (08.14.08) development snapshot from SVN.
Wheelchair model
The following is the very first release of a wheelchair model for Gazebo 0.8. It has been released for public test without any warranty. Comments are welcome to webmaster@irobotics.org. It uses Pioneer2DX meshes for visualization and it has not any sensor yet. The main difference between any other mobile robot model and this wheelchair model is the definition of two front caster wheels (not omnidirectional ones). This tries to approach to real wheelchair locomotion behavior.
Download: wheelchair-0.1.tar.gz (unstable)