Mailing lists


Old news
Old stuff

Installation (OS X)

Gazebo relies on a number of third-party libraries that make installation a little bit tricky. If things go wrong, please check the install_os_problems section and the archives of the Gazebo mailing list. Please read the instructions below carefully before posting to the mailing lists.

These are the OS X installation instructions, Linux users should go here.

Preparing your system

The OS X installation is a little tricker than the Linux installation, partly because of the large number of dependencies that need to be installed, and partly because of the quirky file system layout. As a first step, you must prepare your system:

  • Install Apple's developer tools and X11 developer packages; these come standard with the OS X installation disks.

  • Use Fink to install additional packages, such as:
    • libxml2
    • glut

  • The GUI component of Gazebo requires two packages:

To save some time, there is a shell script that will apt-get pre-compiled versions on the required packages (thanks to Lars Cremean). Look on the packages page:

Fink installs everything in a rather unusual location (/sw) and you must your paths approppriately; if you are using the bash shell, add the following lines to your .bashrc script:

export CPATH=/usr/X11R6/include:/sw/include:$CPATH
export LIBRARY_PATH=/usr/X11R6/lib:/sw/lib:$LIBRARY_PATH
export PYTHONPATH=/sw/lib/python2.3/site-packages:$PYTHONPATH

The last line sets the path for Python extensions (the version number should match the version of Python you have installed; type "python -V" if in doubt).

You should also set the following compiler flag:

export CPPFLAGS=-no-cpp-precomp 

This prevents some common bugs with Apple's "smart" pre-compiler.

Selecting an installation method

irst-time users should read the section on minimal installations to get a basic version of Gazebo up and running. More advanced users may wish to consult one of the following:

Minimal installation

The minimal Gazebo build requires the OpenDynamicsEngine (ODE), which is very probably not installed on your system (or not installed correctly).

  • Install ODE 0.5:
    $ tar xvzf ode-0.5.tgz
    $ cd ode-0.5
    $ make configure
    $ make ode-lib
    $ sudo cp -r include/ode /sw/include/
    $ sudo cp lib/libode.a /sw/lib/
    $ sudo ranlib /sw/lib/libode.a
    If in doubt, you should also read the INSTALL file that comes with the ODE distribution (but don't necessarily believe everything it tells you).

  • Install Gazebo:
    $ tar xvzf gazebo-<version>.tar.gz
    $ cd gazebo-<version>
    $ ./configure --prefix=/sw
    Note the final output of the configure script: it will tell you what will be built, and where it will be installed. Once you are satisfied, build and install the package:
    $ make
    $ sudo make install

Gazebo is now ready to run; try:

$ gazebo /sw/share/gazebo/worlds/example1.world

This will start the server in console mode (no GUI). Assuming you have all the GUI dependencies installed, you can run in graphical mode using:

$ wxgazebo /usr/local/share/gazebo/worlds/example1.world

Full installation (with OPCODE support)

Some models (e.g., terrains and roads) require the OPCODE collision detection library (now part of the ODE distribution). The following steps are required to build ODE with OPCODE support.

  • Install (or re-install) ODE with OPCODE enabled; this requires some editing of the ODE configuration files:
    $ tar xvzf ode-0.5.tgz
    $ cd ode-0.5
    Open the file config/user-settings, and change the default OPCODE_DIRECTORY:
    where [srcdir] is the fully qualified path to the ODE source distribution. I.e., if the original ODE tarball is in /home/[username]/tmp, this should read /home/[username]/tmp/ode-0.5/OPCODE/. Note that the comments for this section of the settings file are bogus; ignore them. Finish installing ODE:
    $ make configure
    $ make ode-lib
    $ sudo cp -r include/ode /sw/include/
    $ sudo cp lib/libode.a /sw/lib/
    $ sudo ranlib /sw/lib/libode.a

  • Install (or re-install) Gazebo
    $ tar xvzf gazebo-src-<version>.tar.gz
    $ cd gazebo-src-<version>
    $ ./configure --prefix=/sw
    Pay close attention output of the configure script and make sure the Terrain and Road models will be built. Once you are satisfied, finish the installation:
    $ make
    $ sudo make install
    $ exit

To test the terrain model, try:

$ gazebo /sw/share/gazebo/worlds/terrain.world

Local installation (does not require root access)

Some developers prefer to install Gazebo in our home directory (e.g., /home/[username]/local) rather than in a system directory. This is useful if you are working on shared machines and/or lack root access. Naturally, local installs can make it a bit tricky for Gazebo (and other packages) to find the right headers, libs and so on. Here, then, is the recommended way to do it:

  • Pick a spot for "local" installs; for me it is "/home/[username]/local". The install scripts will create relevant subdirs under this, such as:

  • Set up the necessary compiler paths in your .bashrc (or whatever) script; e.g.:
    export PATH=~/local/bin:$PATH
    export CPATH=~/local/include:$CPATH
    export LIBRARY_PATH=~/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.

  • Set up some additional paths in your .bashrc (or whatever):
    export PKG_CONFIG_PATH=~/local/lib/pkgconfig:$PKG_CONFIG_PATH
    export PYTHONPATH=~/local/lib/python2.3/site-packages:$PYTHONPATH
    The first line sets the pkg-config path (for applications using pkg-config, which will be everything in the Player/Stage/Gazebo project pretty soon); the second line is for Python extensions (the version number should match the version of Python you have installed; type "python -V" if in doubt).

  • (Optional) Install ODE locally:
    $ tar xvzf ode-0.5.tgz
    $ cd ode-0.5
    $ make configure
    $ make ode-lib
    $ cp -r include/ode /home/[username]/local/include/
    $ cp lib/libode.a /home/[username]/local/lib/
    $ ranlib /home/[username]/local/lib/libode.a

  • Build Gazebo using the "--prefix" argument:
    $ ./configure --prefix=/home/[username]/local
    Note the final output of the configure script: it should tell you that Gazebo will be installed in your home directory.

  • Build and install the package :
    $ make
    $ make install

Everything should now work seamlessly, and your locally installed packages will be used in preference to any system-wide defaults.



Last updated $Date: 2004/12/21 01:49:15 $
Generated on Sun May 22 18:39:09 2005 for Gazebo by doxygen 1.4.2