This tutorial will go through the process of installing some of Gazebo's dependencies from source. The dependencies listed here are all maintained by the Gazebo team and often new features in Gazebo are tied to new features in these libraries.
These libraries are:
All the libraries listed here are evolutions of libraries which were at some point built within the Gazebo project itself. In an effort to make these available for other projects and to make Gazebo more modular, they have been extracted from Gazebo. Since March 2019, the Gazebo team has also been releasing a new simulator entirely based on Ignition libraries.
Gazebo uses the Simulation Description Format (SDF) protocol to describe every aspect of simulation. The SDF protocol is based on XML, you can take a look at its specification here. The protocol consists of a series of (*.sdf) files.
Current protocol versions available are 1.4, 1.5, 1.6 and 1.7.
Gazebo uses the SDFormat C++ library to parse the SDF protocol.
Both the SDF protocol and the SDFormat C++ parser are hosted in the same repository and will be installed at the same time when performing an installation from source.
Please note that SDFormat library versions follow semantic versioning where major versions correspond to changes in ABI. Its versioning scheme has nothing to do with the SDF protocol supported.
Gazebo has had a dependency on the SDFormat library (which automatically handles the SDF protocol supported) since early versions:
Gazebo has a dependency on Ignition Math from version 6.
Gazebo has a dependency on Ignition Transport from version 7.
Gazebo has a dependency on Ignition Messages from version 8.
Be sure of removing any distribution package of the dependencies listed in this document to get started from a clean system. For example, in .deb distributions like Debian or Ubuntu this can easily done by running:
sudo apt-get remove '.*sdformat.*' '.*ignition-.*'
Many of the ignition packages are using the ignition cmake library.
Install required dependencies:
sudo apt-get install build-essential cmake pkg-config
Clone the repository into a directory and go into it:
git clone https://github.com/ignitionrobotics/ign-cmake /tmp/ign-cmake
cd /tmp/ign-cmake
Checkout the corresponding branch for a target Gazebo version:
(e.g. ign-cmake0
for Gazebo 10)
git checkout ign-cmake0
Create a build directory and go there. Configure the build:
mkdir build
cd build
cmake ../
Note: You can use a custom install path to make it easier to switch between source and debian installs:
cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../
Build and install:
make -j4
sudo make install
SDFormat, Ignition Messages and Gazebo depend on the Ignition Math library.
Install required dependencies:
sudo apt-get install build-essential \
cmake \
git \
python
Clone the repository into a directory and go into it:
git clone https://github.com/ignitionrobotics/ign-math /tmp/ign-math
cd /tmp/ign-math
Checkout the corresponding branch for a target Gazebo version:
(e.g. ign-math4
for Gazebo 10)
git checkout ign-math4
Create a build directory and go there:
mkdir build
cd build
Configure build (choose either method a
or b
below):
a. Release mode (strictly speaking, RelWithDebInfo
): This will generate
optimized code, but will not have debug symbols. Use this mode if you
don't need to use GDB.
cmake ../
Note: You can use a custom install path to make it easier to switch between source and debian installs:
cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../
b. Debug mode: This will generate code with debug symbols. It will run slower, but you'll be able to use GDB.
cmake -DCMAKE_BUILD_TYPE=Debug ../
Build and install:
make -j4
sudo make install
Gazebo and Ignition Fuel Tools depend on the Ignition Common library.
Install required dependencies (note that ignition-cmake and ignition-math are out):
sudo apt-get install build-essential \
cmake \
libfreeimage-dev \
libtinyxml2-dev \
uuid-dev \
libgts-dev \
libavdevice-dev \
libavformat-dev \
libavcodec-dev \
libswscale-dev \
libavutil-dev \
libprotoc-dev \
libprotobuf-dev
Clone the repository into a directory and go into it:
git clone https://github.com/ignitionrobotics/ign-common /tmp/ign-common
cd /tmp/ign-common
Checkout the corresponding branch for a target Gazebo version:
(e.g. ign-common1
for Gazebo 10)
git checkout ign-common1
Create a build directory and go there:
mkdir build
cd build
Configure build (choose either method a
or b
below):
a. Release mode (strictly speaking, RelWithDebInfo
): This will generate
optimized code, but will not have debug symbols. Use this mode if you
don't need to use GDB.
cmake ../
Note: You can use a custom install path to make it easier to switch between source and debian installs:
cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../
b. Debug mode: This will generate code with debug symbols. It will run slower, but you'll be able to use GDB.
cmake -DCMAKE_BUILD_TYPE=Debug ../
Build and install:
make -j4
sudo make install
Gazebo depends on the SDFormat package.
Install required dependencies (note that ign-math was left out):
sudo apt-get install build-essential \
cmake \
git \
python \
libboost-system-dev \
libtinyxml-dev \
libxml2-utils \
ruby-dev \
ruby
Clone the repository into a directory and go into it:
git clone https://github.com/osrf/sdformat /tmp/sdformat
cd /tmp/sdformat
Checkout the corresponding branch for a target Gazebo version:
(e.g. sdf6
for Gazebo 10)
git checkout sdf6
Create a build directory and go there:
mkdir build
cd build
Configure build (choose either method a
or b
below):
a. Release mode (strictly speaking, RelWithDebInfo
): This will generate
optimized code, but will not have debug symbols. Use this mode if you
don't need to use GDB.
cmake ../
Note: You can use a custom install path to make it easier to switch between source and debian installs:
cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../
b. Debug mode: This will generate code with debug symbols. It will run slower, but you'll be able to use GDB.
cmake -DCMAKE_BUILD_TYPE=Debug ../
Build and install:
make -j4
sudo make install
Gazebo and Ignition Transport depend on the Ignition Messages package.
Install required dependencies:
sudo apt-get install build-essential \
cmake \
git \
libprotoc-dev \
libprotobuf-dev \
protobuf-compiler
Clone the repository into a directory and go into it:
git clone https://github.com/ignitionrobotics/ign-msgs /tmp/ign-msgs
cd /tmp/ign-msgs
Checkout the corresponding branch for a target Gazebo version:
(e.g. ign-msgs1
for Gazebo 10)
git checkout ign-msgs1
Create a build directory and go there:
mkdir build
cd build
Configure build (choose either method a
or b
below):
a. Release mode (strictly speaking, RelWithDebInfo
): This will generate
optimized code, but will not have debug symbols. Use this mode if you
don't need to use GDB.
cmake ../
Note: You can use a custom install path to make it easier to switch between source and debian installs:
cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../
b. Debug mode: This will generate code with debug symbols. It will run slower, but you'll be able to use GDB.
cmake -DCMAKE_BUILD_TYPE=Debug ../
Build and install:
make -j4
sudo make install
Gazebo depends optionally in the Ignition Fuel Tools
Install required dependencies (note that ignition-cmake and ignition-common are out):
sudo apt-get install build-essential \
cmake \
libzip-dev \
libjsoncpp-dev \
libcurl4-openssl-dev \
libyaml-dev
Clone the repository into a directory and go into it:
git clone https://github.com/ignitionrobotics/ign-fuel-tools /tmp/ign-fuel-tools
cd /tmp/ign-fuel-tools
Checkout the corresponding branch for a target Gazebo version:
(e.g. ign-fuel-tools1
for Gazebo 10)
git checkout ign-fuel-tools1
Create a build directory and go there:
mkdir build
cd build
Configure build (choose either method a
or b
below):
a. Release mode (strictly speaking, RelWithDebInfo
): This will generate
optimized code, but will not have debug symbols. Use this mode if you
don't need to use GDB.
cmake ../
Note: You can use a custom install path to make it easier to switch between source and debian installs:
cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../
b. Debug mode: This will generate code with debug symbols. It will run slower, but you'll be able to use GDB.
cmake -DCMAKE_BUILD_TYPE=Debug ../
Build and install:
make -j4
sudo make install
Gazebo depends on the Ignition Transport package.
Please follow the instructions on the Ignition Transport documents.
When installing dependencies, make sure you only install the
libignition-msgs-dev
package if you haven't installed Ignition Messages from
source.