Installing Gazebo 11
First, check your current gazebo version, if you installed ROS with the desktop full option, you likely have gazebo9 already installed.
$ gazebo --versionIf you have a version other than 11, remove it. Replace "9" with whatever version you have.
sudo apt-get remove gazebo9Check that it has been successfully uninstalled:
gazebo --versionOption A: Install Pre-Built Debian/Ubuntu binary packages
sudo apt-get install ros-melodic-gazebo11-ros-pkgs ros-melodic-gazebo11-ros-controlOption B: Build from source
Setup your computer to accept software from packages.osrfoundation.org.
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:
cat /etc/apt/sources.list.d/gazebo-stable.listAnd if everything is correct, you should see:
deb http://packages.osrfoundation.org/gazebo/ubuntu-stable bionic mainSetup keys
wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -Install Gazebo.
First update the debian database:
sudo apt-get updateHint: make sure the apt-get update process ends without any errors, the console output ends in
Donesimilar 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... DoneNext install gazebo-11 by:
sudo apt-get install libgazebo11-dev sudo apt-get install gazebo11Check your installation
gazebo --version
References
Last updated