Skip to content

Installation Requirements for Gazebo

Milan Jelisavcic edited this page Nov 13, 2018 · 32 revisions

Gazebo is a general-purpose robotic simulator, capable of simulating populations of robots in outdoor and indoor environments. Revolve is using a custom-altered Gazebo 6.5 version and it requires installing or building from the source several dependencies.

[ Ubuntu . Mac OS X ]

Install prerequisites on Ubuntu

Note: These prerequisites are base on Ubuntu Xenial 16.04.5 LTS. If you have a different version, fix accordingly.

  1. Make sure you have removed the Ubuntu pre-compiled binaries before installing from source:

    sudo apt-get remove '.*gazebo.*' \
                        '.*sdformat.*' \
                        '.*ignition-math.*' \
                        '.*ignition-msgs.*' \
                        '.*ignition-transport.*'
  2. Install the basic dependencies:

    sudo apt-get update
    sudo apt-get install build-essential \
                         cmake           \
                         cppcheck        \
                         xsltproc        \
                         python          \
                         mercurial
  3. Install the required dependencies for Gazebo:

    sudo apt-get install libogre-1.9-dev              \
                         libbullet-dev                \
                         python-dev                   \
                         python-protobuf              \
                         libprotoc-dev                \
                         libprotobuf-dev              \
                         libfreeimage-dev             \
                         protobuf-compiler            \
                         libboost-thread-dev          \
                         libboost-signals-dev         \
                         libboost-system-dev          \
                         libboost-filesystem-dev      \
                         libboost-program-options-dev \
                         libboost-regex-dev           \
                         libboost-iostreams-dev       \
                         freeglut3-dev                \
                         libqt4-dev                   \
                         libcurl4-openssl-dev         \
                         libtar-dev                   \
                         libtbb-dev                   \
                         libgts-dev                   \
                         ruby                         \
                         uuid-dev                     \
                         libswscale-dev               \
                         libavformat-dev              \
                         libavcodec-dev               \
                         libgraphviz-dev              \
                         libhdf5-dev                  \
                         libopenal-dev                \
                         pkg-config
  4. Install Ignition Math v2 from the OSRF repository:

    hg clone https://bitbucket.org/ignitionrobotics/ign-math /tmp/ign-math
    cd /tmp/ign-math
    hg up ign-math2
    mkdir build && cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=/usr
    make -j4
    sudo make install
  5. Install SDFormat v3.1.1 dependancy:

    cd /tmp
    wget http://osrf-distributions.s3.amazonaws.com/sdformat/releases/sdformat-3.1.1.tar.bz2
    tar -xaf /tmp/sdformat-3.1.1.tar.bz2
    cd /tmp/sdformat-3.1.1
    mkdir -p build && cd build
    cmake .. -DCMAKE_BUILD_TYPE="Release" \
             -DCMAKE_INSTALL_PREFIX=/usr
    make -j4
    sudo make install

See next: Installation instructions for Gazebo (Linux)


Install prerequisites on Mac OS X

In a clean Mac OS X installation you can install pre-compiled versions of all dependencies:

  1. If not already available, install Homebrew:

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install XQuartz, which provides X11 support and is required by Gazebo and OGRE.

  3. For 10.8 and earlier, install Xcode command-line tools by downloading them from Apple. For 10.9 and later, they should prompt you to install them when you install Homebrew in step 1.

    xcode-select --install
  4. Install most of the dependencies using brew:

    brew install boost \
                 bullet \
                 cmake \
                 doxygen \
                 ffmpeg \
                 freeimage \
                 gdal \
                 git \
                 gsl \
                 gts \
                 hg \
                 libtar \
                 protobuf protobuf-c \
                 python \
                 tbb \
                 tinyxml \
                 yaml-cpp
  5. Link gettext library to /usr/include since some of the dependencies may not link properly:

    brew link --force gettext

    NOTE: If not linked, this type of error occurs during a build-time:

    ld: library not found for -lintl clang: error: linker command failed with exit code 1 (use -v to see invocation)

  6. Install Qt:

    brew tap cartr/qt4
    brew tap-pin cartr/qt4
    brew install cartr/qt4/qt --without-webkit
  7. Install OSRF simulation dependancies:

    brew tap osrf/simulation
    brew install ignition-math2 \
                 ogre \
                 sdformat3 \
                 simbody
  8. Install Python virtual environment:

    pip install virtualenv
  9. Make sure all packages are up-to-date:

    brew update
    brew upgrade

See next: Installation instructions for Gazebo (Mac OS X)


_________________
/ Premature      \
| optimization   |
| is the root of |
| all evil.      |
|                |
\ -- D.E. Knuth  /
-----------------
    \   ^__^
     \  (oo)\_______
        (__)\       )\/\
            ||----w |
            ||     ||
Clone this wiki locally