Skip to content

Installation Requirements for Gazebo

Milan Jelisavcic edited this page Sep 3, 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.

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.*'
  1. Install the basic dependencies:
sudo apt-get update
sudo apt-get install build-essential \
                     cmake           \
                     cppcheck        \
                     xsltproc        \
                     python          \
                     mercurial
  1. 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                   \
                     uuid-dev                     \
                     libswscale-dev               \
                     libavformat-dev              \
                     libavcodec-dev               \
                     libgraphviz-dev              \
                     libhdf5-dev                  \
                     libopenal-dev                \
                     pkg-config
  1. Install Ignition Math v2 from the OSRF repository:
hg clone https://bitbucket.org/ignitionrobotics/ign-math /tmp/ign-math
cd /tmp/ign-math
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j4
sudo make install
  1. 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)"
  1. Install XQuartz, which provides X11 support and is required by Gazebo and OGRE.

  2. 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
  1. 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
  1. Install Qt:
brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install cartr/qt4/qt --without-webkit
  1. Install OSRF simulation dependancies:
brew tap osrf/simulation
brew install ignition-math2 \
             ogre \
             sdformat3 \
             simbody
  1. Install Python virtual environment:
pip install virtualenv
  1. Make sure all packages are up-to-date:
brew update
brew upgrade

NOTE: If this type of error occurred during build-time:

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

gettext is not linked in /usr/include, so the following command will solve the problem:

brew link --force gettext

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