Cyberithub

How to Install Gazebo on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

In this article, I will take you through the steps to install gazebo on Ubuntu 20.04 LTS (Focal Fossa). Gazebo is a powerful, free and open-source 3D dynamic simulator which provides the ability to simulate populations of robots in complex indoor and outdoor environments accurately and efficiently. It is so popular that it is used by millions of users across the globe due to its wide variety of features and benefits it offers. Gazebo is currently most suitable to be used on Ubuntu based systems. So here we will see the steps to install gazebo 9 on Ubuntu 20.04 LTS system.

 

Uses

  • It is used for testing robotics algorithms.
  • It is used for designing robots.
  • It is used to perform regression testing with realistic scenarios.

 

Key Features

  • It has multiple Physics engine.
  • It has rich library of robotics model and environments.
  • It has a wide variety of sensors.
  • It has convenient programmatic and graphical interfaces.
  • It supports the use of multiple servers to improve performance.

How to Install Gazebo on Ubuntu 20.04 LTS (Focal Fossa)

How to Install Gazebo on Ubuntu 20.04 LTS (Focal Fossa)

Also Read: How to Install Eigen3 on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

Step 1: Prerequisites

a) You should have a running Ubuntu 20.04 LTS Server.

b) You should have sudo or root access to run privileged commands.

Advertisements

c) You should have apt or apt-get utility available in your Server.

 

Step 2: Update Your Server

Before going through the steps to install gazebo simulation suite, it is recommended to first update and sync all the installed packages with the latest available versions from default Ubuntu repo using sudo apt update && sudo apt upgrade command as shown below.

Advertisements
cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
[sudo] password for cyberithub:
Hit:1 https://downloads.plex.tv/repo/deb public InRelease
Hit:2 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,896 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [762 kB]
Get:9 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,269 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [530 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [311 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [40.8 kB]
.........................................................

 

Step 3: Install Gazebo 9

In the next step, you can install Gazebo 9 from default Ubuntu repo by using sudo apt install gazebo9 command as shown below. This will download and install the package along with all its dependencies.

cyberithub@ubuntu:~$ sudo apt install gazebo9
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
fonts-lato freeglut3 gazebo9-common gazebo9-plugin-base gdal-data i965-va-driver intel-media-va-driver libaacs0 libaec0 libaom0 libarmadillo9 libarpack2
libass9 libavcodec58 libavdevice58 libavfilter7 libavformat58 libavutil56 libbdplus0 libblas3 libbluray2 libboost-program-options1.71.0
libboost-regex1.71.0 libbs2b0 libbullet2.88 libccd2 libcdt5 libcfitsio8 libcgraph6 libcharls2 libchromaprint1 libcodec2-0.9 libconsole-bridge0.4 libdap25
libdapclient6v5 libdc1394-22 libdouble-conversion3 libepsilon1 libfftw3-double3 libflite1 libfreeimage3 libfreexl1 libfyba0 libgazebo9 libgdal26
libgeos-3.8.0 libgeos-c1v5 libgeotiff5 libgfortran5 libgme0 libgsm1 libgts-0.7-5 libgts-bin libgvc6 libhdf4-0-alt libhdf5-103 libigdgmm11
libignition-math4 libignition-msgs libignition-transport4 libilmbase24 libjs-jquery libjxr0 libkmlbase1 libkmldom1 libkmlengine1 liblapack3 liblilv-0-0
libminizip1 libmysofa1 libnetcdf15 libnorm1 libodbc1 libogdi4.1 libogre-1.9.0v5 libopenal-data libopenal1 libopenexr24 libopenmpt0 libpathplan4
libpcre2-16-0 libpgm-5.2-0 libpostproc55 libpq5 libproj15 libqhull7 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5 libqt5svg5
libqt5widgets5 libqtpropertybrowser4 libqwt-qt5-6 librubberband2 libruby2.7 libsdformat6 libsdl2-2.0-0 libserd-0-0 libshine3 libsimbody3.6 libsnappy1v5
libsndio7.0 libsord-0-0 libspatialite7 libspnav0 libsratom-0-0 libssh-gcrypt-4 libsuperlu5 libswresample3 libswscale5 libsz2 libtar0 libtbb2
libtinyxml2-6a libtinyxml2.6.2v5 liburdfdom-model liburiparser1 libva-drm2 libva-x11-2 libva2 libvdpau1 libvidstab1.1 libx264-155 libx265-179
libxcb-xinerama0 libxcb-xinput0 libxerces-c3.2 libxvidcore4 libzmq5 libzvbi-common libzvbi0 libzzip-0-13 mesa-va-drivers mesa-vdpau-drivers
ocl-icd-libopencl1 odbcinst odbcinst1debian2 proj-bin proj-data qt5-gtk-platformtheme qttranslations5-l10n rake ruby ruby-minitest ruby-net-telnet
ruby-power-assert ruby-test-unit ruby-xmlrpc ruby2.7 rubygems-integration sdformat-sdf va-driver-all vdpau-driver-all
Suggested packages:
gazebo9-doc i965-va-driver-shaders libbluray-bdj libfftw3-bin libfftw3-dev geotiff-bin gdal-bin libgeotiff-epsg libhdf4-doc libhdf4-alt-dev hdf4-tools
libmyodbc odbc-postgresql tdsodbc unixodbc-bin ogdi-bin libportaudio2 qt5-image-formats-plugins qtwayland5 serdi sndiod sordi spacenavd opencl-icd ri
ruby-dev bundler libvdpau-va-gl1 nvidia-vdpau-driver nvidia-legacy-340xx-vdpau-driver nvidia-legacy-304xx-vdpau-driver
.................................................

 

Step 4: Verify Installation

After successful installation, you can list the installed files by using dpkg -L gazebo9 command as shown below.

Advertisements
cyberithub@ubuntu:~$ dpkg -L gazebo9
/.
/usr
/usr/bin
/usr/bin/gazebo-9.12.0
/usr/bin/gz-9.12.0
/usr/bin/gzclient-9.12.0
/usr/bin/gzprop
/usr/bin/gzserver-9.12.0
/usr/share
/usr/share/applications
/usr/share/applications/gazebo.desktop
/usr/share/doc
/usr/share/doc/gazebo9
/usr/share/doc/gazebo9/copyright
/usr/share/gazebo
/usr/share/gazebo/setup.sh
/usr/share/gazebo-9
/usr/share/gazebo-9/setup.sh
/usr/share/icons
/usr/share/icons/hicolor
............................................

 

Step 5: Launch Gazebo

To launch Gazebo, go to Desktop and open Activities. Then search gazebo in the search box. Once it shows up, tap on it to open as shown below.

How to Install Gazebo on Ubuntu 20.04 LTS (Focal Fossa) 2

Once it is opened, it should look like below. You can now start using the Suite.

How to Install Gazebo on Ubuntu 20.04 LTS (Focal Fossa) 3

 

Step 6: Uninstall Gazebo

Once you are done using Gazebo suite, then you can choose to uninstall it from your server by using sudo apt remove gazebo9 command as shown below.

NOTE:

Please be careful on running below command as sometimes you might end up removing some packages which are used by some other active running applications. This might results into non-recoverable losses.
cyberithub@ubuntu:~$ sudo apt remove gazebo9
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
fonts-lato freeglut3 gazebo9-common gazebo9-plugin-base gdal-data i965-va-driver intel-media-va-driver libaacs0 libaec0 libaom0 libarmadillo9 libarpack2
libass9 libavcodec58 libavdevice58 libavfilter7 libavformat58 libavutil56 libbdplus0 libblas3 libbluray2 libboost-program-options1.71.0
libboost-regex1.71.0 libbs2b0 libbullet2.88 libccd2 libcdt5 libcfitsio8 libcgraph6 libcharls2 libchromaprint1 libcodec2-0.9 libconsole-bridge0.4 libdap25
libdapclient6v5 libdc1394-22 libdouble-conversion3 libepsilon1 libfftw3-double3 libflite1 libfreeimage3 libfreexl1 libfyba0 libgazebo9 libgdal26
libgeos-3.8.0 libgeos-c1v5 libgeotiff5 libgfortran5 libgme0 libgsm1 libgts-0.7-5 libgts-bin libgvc6 libhdf4-0-alt libhdf5-103 libigdgmm11
libignition-math4 libignition-msgs libignition-transport4 libilmbase24 libjs-jquery libjxr0 libkmlbase1 libkmldom1 libkmlengine1 liblapack3 liblilv-0-0
libminizip1 libmysofa1 libnetcdf15 libnorm1 libodbc1 libogdi4.1 libogre-1.9.0v5 libopenal-data libopenal1 libopenexr24 libopenmpt0 libpathplan4
libpcre2-16-0 libpgm-5.2-0 libpostproc55 libpq5 libproj15 libqhull7 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5 libqt5svg5
libqt5widgets5 libqtpropertybrowser4 libqwt-qt5-6 librubberband2 libruby2.7 libsdformat6 libsdl2-2.0-0 libserd-0-0 libshine3 libsimbody3.6 libsnappy1v5
libsndio7.0 libsord-0-0 libspatialite7 libspnav0 libsratom-0-0 libssh-gcrypt-4 libsuperlu5 libswresample3 libswscale5 libsz2 libtar0 libtbb2
libtinyxml2-6a libtinyxml2.6.2v5 liburdfdom-model liburiparser1 libva-drm2 libva-x11-2 libva2 libvdpau1 libvidstab1.1 libx264-155 libx265-179
libxcb-xinerama0 libxcb-xinput0 libxerces-c3.2 libxvidcore4 libzmq5 libzvbi-common libzvbi0 libzzip-0-13 mesa-va-drivers mesa-vdpau-drivers odbcinst
odbcinst1debian2 proj-bin proj-data qt5-gtk-platformtheme qttranslations5-l10n rake ruby ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit
ruby-xmlrpc ruby2.7 rubygems-integration sdformat-sdf va-driver-all vdpau-driver-all
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
gazebo9
0 upgraded, 0 newly installed, 1 to remove and 31 not upgraded.
After this operation, 7,040 kB disk space will be freed.
Do you want to continue? [Y/n] y
.................................................

Leave a Comment