Wednesday, 13 July 2016

Installing ROS Indigo with Gazebo 7 (or later) on Ubuntu 14.04

This tutorial will cover the easiest way to update the existing Gazebo version which comes with ROS Indigo (Gazebo 2) to a later release of Gazebo. Gazebo 2 is severely outdated and it's always better to use a newer version of the software.

To begin, let's first install ROS. If you already have ROS installed, you can skip this part and move on to the next part. If you want to do something else, check this detailed documentation for more details.

Ubuntu Installation of ROS Indigo

  1. Configure your Ubuntu repositories
    Configure your Ubuntu repositories to allow "restricted", "universe", and "multiverse". You can follow the Ubuntu guide for instructions on doing this.
  2. Setup your sources.list
    Setup your computer to accept software from packages.ros.org. ROS Indigo ONLY supports Saucy (13.10) and Trusty (14.04) for debian packages.
    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  3. Set up your keys
    sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116
  4. Installation
    First make sure that your Debian package index is up-to-date
    sudo apt-get update
    Desktop-Full Install
    sudo apt-get install ros-indigo-desktop-full
  5. Initialize rosdep
    Before you can use ROS, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.
    sudo rosdep init
    rosdep update
  6. Environment setup
    It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:
    echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
    source ~/.bashrc
  7. Getting rosinstall
    sudo apt-get install python-rosinstall

Updating to Gazebo 7

  1. Removing Gazebo 2
    sudo apt-get remove gazebo2
    This might leave some unmet dependecies. But do not worry. It will be solved automatically.
  2. Installing required packages of Gazebo 7
    sudo apt-get install ros-indigo-gazebo7-ros-pkgs ros-indigo-gazebo7-ros-control
    Even after installing this, there might be unmet dependencies. Just restart the terminal or source the ROS installation folder.
Congratulations! You have successfully changed the Gazebo version of your ROS distribution.

3 comments:

  1. I intalled the gazebo 7 with ros indigo, but it is not working properly when i try to run the ros plugin tutorial from gazebo page. Have u checked them all?

    ReplyDelete
  2. Hello, I've installed using ROS Indigo in VirtualBOX and I got an error while using this command: sudo apt-get install ros-indigo-gazebo7-ros-pkgs ros-indigo-gazebo7-ros-control

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package ros-indigo-gazebo7-ros-pkgs

    Do you have any idea to solve this?

    ReplyDelete
    Replies
    1. Hey! Try and check if this works: sudo apt-get install ros-indigo-gazebo-ros-pkgs

      Delete