After a quick presentation of ROS, in this article we are going to prepare the environment in order to install it.
We are going to use Linux Ubuntu as it represents the main operating system supported.
The installation does not include particularly difficult steps, if anything it can take you longer than expected depending on your internet connection and system hardware.
In order to be able to work freely, I recommend using a virtual machine. This will allow you to use ROS at any time and on any PC.
At the end of the article you will have a virtual machine on which we will go in the next articles to install and launch ROS.
If you already have a virtual machine (VM) or a PC with Ubuntu 18.04 installed, you can safely jump to the last paragraph dedicated to ROS pre-setup configuration.
Let’s choose the Version!
Before installing Ubuntu it is important to pause for a moment and discuss which ROS distribution to use.
Every year, around May, the developer community publishes a new version. You can find the complete list at this address. The versions are differentiated with names that follow the alphabetical order. The current version at the time of writing is called Melodic while the previous one was called Lunar.
Currently the recommended version is Melodic which is also one of the 2 LTS distro, the distribution that provides long-term support (until 2023). ROS publishes an LTS every 2 years. As you can see from the website, the other LTS distribution is Kinetic which will be discontinued in April 2021.
All other versions are basically supported for 2 years. These versions are of interest only in case you need to have the latest version available.
Since we have to learn to use ROS, the Melodic version, which is also the latest one at the time of writing, represents the perfect compromise. To install it correctly we will have to download Ubuntu 18.04.
Everything you see will still be fully compatible with the Kinetic version as long as you install Ubuntu 16.04.
Let’s install the VM tool!
As previously mentioned, we are going to install Ubuntu in a VM on a Windows environment. In my opinion, this is the best compromise as there is no need for a dedicated HW and you will be free to do all the tests you want without worrying too much about the consequences.
In this article we will use VMWare Player, but you can also safely choose other virtualization environments such as VirtualBox.
Once you reach the download page, download the version you are interested in and install it on your computer.
If you need it, here you can find a video that shows, step by step, how to download and setup VMWare Player.
At this point we have two possibilities:
- Install Ubuntu by downloading the iso from the official website, which we will cover in the next paragraph.
- Download the ready-to-use VM from osboxes.This platform collects an almost complete series of Linux distro already pre-installed for the main virtualization software. At this address you can find the Ubuntu 18.04 version ready to download.
Let’s install Ubuntu!
Once the VMWare setup operation is finished, we must move on to download the Ubuntu version chosen from this page. Select the version 18.04 LTS as in the picture and continue with the download.
Once finished, you will have an .iso file in your Downloads folder.
At this point we can run VMWare Player, you will find this window:
Click on Player > File > New Virtual Machine:
From the window that appears, select the item Installer disc image file and use the Browse … button to select the ISO file you just have downloaded.
By clicking on Next, we give a name to the VM and choose a username and password.
After specifying the destination folder of the VM, click on Next and dedicate at least 20 GB of physical space.
The next screen will show a summary of what has been done so far.
Click on Finish to start the installation of the VM, this will open a VMWare window where you can follow the Ubuntu setup process.
If you are lucky, the automatic Ubuntu setup should start immediately and continue until the installation is complete.If instead you find yourself the welcome screen of the installation wizard, refer to this video which also covers the part just seen together.
Let’s configure our VM!
Once the installation is finished, before proceeding further, turn off the virtual machine and edit the hardware settings by clicking on Edit virtual machine settings:
From the window that opens select the following settings:
- Memory: depends on the availability of your HW. I’d say at least 4 GB is needed.
- Processors: this depends on your HW too. In my case I have selected 4 cores. You can leave the Virtualization engine checkboxes unchecked.
This way, we have allocated enough hardware resources to start our VM.
Once this step is also completed, we start Ubuntu and once logged into our account, let’s open a terminal and type the following commands to update the operating system to the latest version available:
In case the second command returns the error you see in the figure below, refer to this page to solve it:
Ok, now we have a complete system ready to be used for installing ROS.
In the next article we will see how to install it and how to generate our first workspace!
Leave A Comment