CSDN博客

img hecssy

Player 2.1.1 / Gazebo 0.8 SVN rev. 6886在Fedora9下的安装

发表于2008/9/29 23:02:00  1603人阅读

分类: Player Project

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!)

$ rpm -ivhU http://rpm.livna.org/livna-release-8.rpm
$ yum -y install kmod-fglrx glx-utils
$ reboot
$ gedit /etc/X11/xorg.conf
Section "ServerFlags"
    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 PATH=/usr/local/bin:$PATH
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:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

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)

$ tar xvzf fltk-1.1.9-source.tar.gz
$ cd fltk-1.1.9
$ ./configure
$ make
$ make install

or

$ yum install fltk fltk-devel

OGRE dependency: zziplib (Z Zip Library)

$ tar xvzf zziplib-0.13.49.tar.bz2
$ cd zziplib-0.13.49
$ ./configure
$ make
$ make install

        Due to a bug, add to /usr/local/lib/pkgconfig/zziplib.pc after "prefix=/usr/local" the following line: "datarootdir=${prefix}/share"

or

$ yum install zziplib zziplib-devel

OGRE dependency: FreeImage

$ tar xvzf FreeImage3100.zip
$ cd FreeImage
$ make
$ make install

or

$ yum install freeimage freeimage-devel

OGRE dependency: nVidia Cg Toolkit

OGRE dependency: OIS (Object Oriented Input System)

$ tar xvzf ois-1.2.tar.gz
$ cd ois
$ ./bootstrap
$ ./configure
$ make
$ make install

or

$ yum install ois ois-devel

OGRE (Object-Oriented Graphics Rendering Engine)

$ tar xvzf ogre-v1-4-9.tar.bz2
$ cd ogrenew
$ ./configure
$ make
$ make install
$ /sbin/ldconfig

or

$ yum install ogre ogre-devel

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)

$ tar xvzf ode-0.10.0.tar.gz
$ cd ode-0.10.0
$ ./configure
$ make
$ make install

or

$ yum install ode ode-devel

SCONS (if not already installed in you system)

or

$ yum install scons

 

Install Player 2.1.1


Prerequisites available at Fedora 9 Package List:

Install from fedora rpm repository

$ yum install libtool-ltdl-devel

Optional prerequisites:

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

$ svn co https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/gazebo/trunk gazebo

Configure, compile and install

$ cd gazebo
$ scons
$ scons install

 

Running Gazebo 0.8

The Gazebo server can be started as follows:

$ gazebo <xmlfile>

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:

$ gazebo /usr/local/share/gazebo/worlds/pioneer2dx.world

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.

Gazebo 0.8 3D robot simulator

 

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 /path/to/your/gazebo_rev6886.cfg

Player will output a message indicating that is has connected with the simulator:

libgazebo msg : opening /tmp/gazebo-<username>-default-sim-default

Player and Gazebo 0.8

Users can now interact with the simulated robot exactly as they would a real robot. Try running playerv, for example:

$ playerv --position2d:0

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)

Wheelchair modelWheelchair model
阅读全文
0 0

相关文章推荐

img
取 消
img