DEV Community

Cover image for Robot Operating System: Installation Instructions for Ubuntu

Posted on

Robot Operating System: Installation Instructions for Ubuntu

The Robot Operating System ROS is provided as several Debian packages. Installation instructions specifically target the Ubuntu distribution. If you want to get ROS running, its best to do so on an Ubuntu system. But what to do if you cannot use Ubuntu or have another operating system like OsX?

This article is an essential description of how to get the Robot Operating System running. If you use Ubuntu, install it natively. If not, I recommend to install VM with a virtualization software of your choice. Just follow the steps outlined in the next sections, and you will have a fully working ROS system.

This article originally appeared at my blog

Setup Ubuntu in a VM

The official ROS installation manual lists installation steps for Linux (Debian, Ubuntu, Arch Linux), Windows 10 and Mac OsX. But as I mentioned in the introduction, from my experience the compatibility of ROS packages is best in Ubuntu Linux.

Therefore, if you do not have a spare PC, I recommend to get VMWare Fusion player with a free license, and then install Ubuntu as a VM:

  1. Get a free key for VMware Fusion Player
  2. On the same page, download VMware Fusion player for your operating System
  3. Install VMware Fusion Player
  4. Get the Ubuntu 20.04 ISO
  5. Install Ubuntu as a VMware virtual machine

VmWare Fusion Player feature a comfortable auto installation mode in which you don't need any manual interactions. After a short amount of time, the VM is ready and you can continue to install ROS.

Setup ROS

On your Ubuntu machine, follow these steps to install ROS Noetic:

  1. Add the ROS package repository to your sources.list, and import the required keys.
sudo sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

sudo apt-key adv --keyserver 'hkp://' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Enter fullscreen mode Exit fullscreen mode
  1. For maximum compatibility of your system with the tutorials and other systems, make a Desktop Full Install of ROS
sudo apt update && sudo apt install ros-noetic-desktop-full
Enter fullscreen mode Exit fullscreen mode
  1. Install additional packages:
sudo apt install liburdfdom-tools ros-noetic-robot-state-publisher
Enter fullscreen mode Exit fullscreen mode

Starting ROS

When all packages are installed, it's time to test the installation.

  1. Run the following command to export additional path variables in your shell, so that you can execute all the ROS binaries
source /opt/ros/noetic/setup.bash
Enter fullscreen mode Exit fullscreen mode
  1. Start a demo of the simulation tool gazebo
roslaunch walker_gazebo walker.launch
Enter fullscreen mode Exit fullscreen mode
  1. If you see the GUI application starting - like in the following picture - your installation is complete.

  1. Now permanently add the new new env vars to your shell with
echo '`source /opt/ros/noetic/setup.bash`' > ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

Congrats! ROS is installed, and you can proceed with one of the many tutorials.


This short article showed the essential steps to install the Robot Operating System. After trying an Installation on OsX, I can only recommend to use an Ubuntu System – either on a spare PC, or on a Virtual Machine – to achieve maximum capability and in order to use all ROS packages.

Top comments (1)

gopher65 profile image
Divya A

I created an easy runbook for installation instructions on osx. I used Savvy to do it, the best part is I don't have to copy paste these commands locally, I can just run

savvy run

But, I agree Ubuntu is definitely better for ROS :)