How To Install ros-indigo-desktop-full on Linux Ubuntu

One month ago, I wrote a post with all the reasons that should make you use ROS to design and build robots. In this tutorial, I will show you the end-to-end process to have a fresh ROS environment on a Linux Ubuntu machine.

I know you can read this guide and get all the information to install ROS Indigo on a Linux machine without any problem. But this guide may be incomplete for someone who wants to install ROS on a virtual machine and setting up the creation of an ROS workspace.

Probably the best books to learn ROS

The tutorial has four parts:

  1. In the first part, I’ll show you how to install and setup Linux Ubuntu under Oracle VM VirtualBox. This part is very useful if you’re using a Windows PC or Mac OS. If you already use a Linux Ubuntu machine, then you can jump directly to the second part of the tutorial.
  2. In the second part of the tutorial, I’ll show you how to install ros-indigo-desktop-full on Linux Ubuntu.
  3. In the third part, you’ll see how to install external packages needed to start working with ROS.
  4. In the last part, I’ll show you how to check your ROS environment.

1. How to Install a virtual machine and setup Linux Ubuntu

The first step to having a fresh installed Linux Ubuntu on a Windows or Mac OS machine is to install a virtual machine. There are various software for virtual machines and some of these are free. I choose to work with an Oracle VM VirtualBox because is free and meets the requirements of the system. You have comprehensive documentation to work with it and a lot of possibilities to configure.

Below are the steps to install the VM and run Linux Ubuntu 14.04 on it.

Install Oracle VM VirtualBox and open the application

Create a new virtual machine and select Linux as the type of VM

Select the RAM memory size. For my VM, I choose 2GB.

Create the virtual hard disk

For hard disk file select VDI

Select “Dinamically allocated” radio button and press the “Next” button

For file location and size I reserved a space of 15GB

The virtual space for Linux should look like this

Select the ISO image of Ubuntu 14.04 and then follow the instructions. The ISO image can be downloaded for free. Here is the link.

2. How to Install ros-indigo-desktop-full on Linux Ubuntu

In the first part, I show you how to install a virtual machine and setup Linux Ubuntu on it. In this part, I will start to explore the main core of this tutorial – ROS Indigo.

ROS has many distributions named using adjectives such as Hydro, Fuerte, Electric, etc. Our subject is called Indigo and is one of the most used distributions released by the Open Source Robotics Foundation. Indigo was released as long-term services and is supposed to have the lifetime until April 2019. Also, it is the ROS distribution recommended for the situation where the user needs stability. And because I talked about stability, is recommended to use ROS Indigo with Linux Ubuntu 14.04.

Below are all the steps to install ROS Indigo on Ubuntu 14.04.

2.1 Configure Ubuntu repository

This step doesn’t have something in common with ROS, but we have to do it to allow different official software repositories: main, restricted, universe and multiverse.

Step 1: Click on the Ubuntu Software Center
Step 2: Select Software Source…
Step 3: Select all the checkboxes as in the below image

Configure Ubuntu repository

2.2 Set up the computer to accept software from packages.ros.org

We have to setup the source.list file on the Linux machine. This action allows the computer to accept software from the authorized ROS site packages.ros.org.

Step: Open a new Terminal and type the following command:

2.3 Set up your keyserver that allow ROS to install software

Step: In the Terminal, type the following command:

2.4 Updates the file that Ubuntu uses to get software

Step: In the Terminal, type the following command that updates the file that Ubuntu uses to get the software. This step will make you avoid problems with versions of software.

2.5 Finally, install ROS Indigo

Step: In the Terminal, type the following command to download and install ROS Indigo files. This step will take several minutes.

3. Install external packages

In the previous part, you should be finished the ROS Indigo installation. But, before you start writing the first ROS code, you need to initialize rosdep, set up the ROS environment variables and make your work easier with rosinstall.

3.1 Initialize rosdep that enables you install system dependencies

Step 1: In the Terminal, type the following command:

Step 2: And then is recommended to run the command:

3.2 Set up the ROS environment variables

Your system should know about ROS files when you will execute ROS command-line commands. To automatically add to your session the ROS environment variables, type the following command:

Step: in the Terminal, run the following script:

3.3 Install rosinstall

This is a tool in ROS that allows you to download ROS packages.
Step: Type the following command in the Terminal:

4. Create a catkin workspace and check your ROS environment

catkin is the build system of ROS and combines CMake macros and Python scripts to provide particular functionality on top of CMake’s normal workflow. In the catkin workspace folder you can create and modify the ROS code.

Step 1: To create the catkin folder, type the following commands:

If you type “ls” in the catkin_ws folder, you should see the folders “build”, “devel” and “src.”

Step 2: You need to add this workspace on top of your ROS environment. Type the following commands:

Step 3: Check the ROS environment variables

You should see something like:

Check the ROS environment variables

Step 4: Check the ROS path environment variables

In Terminal, you should see something like this:

The ROS path environment variables

Step 5: And finally, check ROS with the following command:

After a lot of steps and checks, finally you should have a fresh ROS environment on a Linux machine where you can design and test robots.

2 comments » Write a comment

Leave a Reply

Required fields are marked *.