Skip to content

Installation Instructions for Gazebo

Jie Luo edited this page Aug 12, 2021 · 38 revisions

Gazebo is the backbone of Revolve kit. The current version of Gazebo that we support is Gazebo 10&11. Here we explain the installation instructions for Ubuntu and Mac OS X.

[ Ubuntu . Fedora . Mac OS X ]

Install Gazebo on Ubuntu

  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 OSRF simulation dependancies:

    sudo apt-get install libignition-cmake-dev \
                         libignition-common-dev \
                         libignition-math4-dev \
                         libignition-msgs-dev \
                         libignition-common-dev \
                         libignition-transport4-dev \
                         libsdformat6-dev \
                         libsimbody-dev
  3. Install Gazebo on your machine:

    sudo apt-get install libgazebo11-dev gazebo11
  4. Test if the installation was successful. You can do this in two ways.

  • First, if you run gzserver in verbose mode:

    gzserver --verbose

    The result of this command should be:

    Gazebo multi-robot simulator, version 11.0
    Copyright (C) 2012-2015 Open Source Robotics Foundation.
    Released under the Apache 2 License.
    http://gazebosim.org
    
    [Msg] Waiting for master.
    [Msg] Connected to gazebo master @ http://127.0.0.1:11345
    [Msg] Publicized address: 192.168.1.72

    When an [Err] Error in REST message appears, update the server url in the ~/.ignition/fuel/config.yaml file from "https://api.ignitionfuel.org" to "https://api.ignitionrobotics.org"

  • Second, if gzserver works as expected you can run gazebo:

    gazebo

    Note for VMWare:

    export SVGA_VGPU10=0
    echo "export SVGA_VGPU10=0" >> ~/.profile

    The result of this command should be:


See next: Installation instructions for Revolve


Install Gazebo on Fedora

TODO

Install Gazebo 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:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  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, the system should prompt you to install them when you install Homebrew in step 1, otherwise install it with:

    xcode-select --install
  4. Install OSRF simulation dependancies:

    brew tap osrf/simulation
    brew install ignition-cmake0 \
                 ignition-common1 \
                 ignition-math4 \
                 ignition-msgs1 \
                 ignition-tools \
                 ignition-transport4 \
                 sdformat6 \
                 simbody
  5. Install Gazebo on your machine:

    brew install gazebo11 

    When the library libBulletSoftBody can not be found, then use:

    brew install gazebo11 --build-from-source

    and check if the right version is installed

    gazebo --version

    The result of this command should be:

    Gazebo multi-robot simulator, version 11.3.0
    Copyright (C) 2012 Open Source Robotics Foundation.
    Released under the Apache 2 License.
    http://gazebosim.org
    

    Troubleshooting DifferentialCPG issue with installing gazebo v11: you have to change line at line 446 of revolve/cpprevolve/revolve/gazebo/brains/DifferentialCPG.cpp (std::random_shuffle(one_dimension.begin(), one_dimension.end() );) to

    std::random_device rd;
    std::mt19937 g(rd());
    std::shuffle(one_dimension.begin(), one_dimension.end(), g);
  6. Test if the installation was successful. You can do this in two ways.

  • First, if you run gzserver in verbose mode:
    gzserver --verbose
    The result of this command should be:
    Gazebo multi-robot simulator, version 11.3.0
    Copyright (C) 2012 Open Source Robotics Foundation.
    Released under the Apache 2 License.
    http://gazebosim.org
    
    
    [[Msg] Waiting for master.
    [Msg] Connected to gazebo master @ http://127.0.0.1:11345
    [Msg] Publicized address: 192.168.2.219
    
    When an [Err] Error in REST message appears, update the server url in the ~/.ignition/fuel/config.yaml file from "https://api.ignitionfuel.org" to "https://api.ignitionrobotics.org"
  • Second, if gzserver works as expected you can run gazebo:
    gazebo
    The result of this command should be:

See next: Installation instructions for Revolve


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