Setting up ROS Kinetic and Gazebo 8 or 9

Robot Operating System (ROS) is a widely accepted meta operating system to develop and control a wide variety of the robots. In addition ROS supports Gazebo, a robotic physics-based simulator essential to prototype, debug and develop the control, planning and AI algorithms.

Ubuntu 16.04 (Xenial) is used for this tutorial. ROS Kinetic installs Gazebo 7 by default so it is recommended to remove the previous installation. Proceed to the installation section if installing for the first time.

$ sudo apt-get remove ros-kinetic-desktop-full
$ sudo apt-get remove ros-kinetic-gazebo*
$ sudo apt-get upgrade

Installation

Install the core of the ROS and rest of the packages can be added manually

$ sudo apt-get install ros-kinetic-ros-base

Run $ roscore to confirm ROS installation. Install Gazebo 8 or 9 using commands:

$ sudo apt-get install ros-kinetic-gazebo8-ros-pkgs ros-kinetic-gazebo8-ros-control ros-kinetic-gazebo8* (for Gazebo 8)
$ sudo apt-get install ros-kinetic-gazebo9-ros-pkgs ros-kinetic-gazebo9-ros-control ros-kinetic-gazebo9* (for Gazebo 9)

Run $ gazebo to confirm Gazebo installation.

Adding other ROS packages and dependencies

$ sudo apt-get install ros-kinetic-catkin
$ sudo apt-get install rviz
$ sudo apt-get install ros-kinetic-controller-manager ros-kinetic-joint-state-controller ros-kinetic-joint-trajectory-controller ros-kinetic-rqt ros-kinetic-rqt-controller-manager ros-kinetic-rqt-joint-trajectory-controller ros-kinetic-ros-control ros-kinetic-rqt-gui
$ sudo apt-get install ros-kinetic-rqt-plot ros-kinetic-rqt-graph ros-kinetic-rqt-rviz ros-kinetic-rqt-tf-tree
$ sudo apt-get install ros-kinetic-gazebo8-ros ros-kinetic-kdl-conversions ros-kinetic-kdl-parser ros-kinetic-forward-command-controller ros-kinetic-tf-conversions ros-kinetic-xacro ros-kinetic-joint-state-publisher ros-kinetic-robot-state-publisher
$ sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers

Congratulations! now the system is configured with ROS Kinetic and Gazebo 8 or 9.

References