This tutorial covers the installation of Gazebo packages using the the
osrfoundation.org repository, designed for those who want to follow the
faster development path but still a stable one.
curl -sSL http://get.gazebosim.org | sh
Setup your computer to accept software from packages.osrfoundation.org.
Note: there is a list of available mirrors for this repository which could improve the download speed.
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
You can check to see if the file was written correctly. For example, in Ubuntu Bionic (18.04), you can type:
And if everything is correct, you should see:
deb http://packages.osrfoundation.org/gazebo/ubuntu-stable bionic main
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
First update the debian database:
sudo apt-get update
Hint: make sure the apt-get update process ends without any errors, the console output ends in
Done similar to below:
$ sudo apt-get update ... Hit http://ppa.launchpad.net bionic/main Translation-en Ign http://us.archive.ubuntu.com bionic/main Translation-en_US Ign http://us.archive.ubuntu.com bionic/multiverse Translation-en_US Ign http://us.archive.ubuntu.com bionic/restricted Translation-en_US Ign http://us.archive.ubuntu.com bionic/universe Translation-en_US Reading package lists... Done
Next install gazebo-11 by:
sudo apt-get install gazebo11 # For developers that work on top of Gazebo, one extra package sudo apt-get install libgazebo11-dev
If you see the error below:
$ sudo apt-get install gazebo11 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package gazebo11
It's possible the version of Gazebo you are looking for is not supported on the version of OS you are using. For example, installing gazebo11 on Ubuntu Xenial (16.04) will produce the error above. Hint: Take a look at "Project Status" section at http://gazebosim.org/#status, next to each version is the supported ubuntu versions and ROS versions.
Check your installation
Gazebo ships different Ubuntu debian packages following the official packaging guidelines:
Use Gazebo as an application: for the users that just run Gazebo simulator with the provided plugins and models and do not plan on developing on top of gazebo its own custom software. To use Gazebo 11 please install the package called gazebo11.
Use Gazebo to develop software using Gazebo libraries: for users that develop plugins or any other kind of software that needs Gazebo headers and libraries. In this case, together with gazebo11 package, please install libgazebo11-dev.