ROS

The Robot Operating System (ROS) is a flexible framework for writing robot software. It is a collection of tools, libraries, and conventions that aim to simplify the task of creating complex and robust robot behavior across a wide variety of robotic platforms.

Running a ROS system usually involves multiple nodes (i.e. computers, real or virtual), interconnected through a master controller.

There are at least 3 different ways to run ROS: using Docker, using Linux, and using WSL on Windows.

ROS on Docker

To massively simplify the use of these tools, we package complete ROS systems into bundles of Docker containers. Each of these bundles runs in a virtualized network within your computer.

Besides easing deployment, containers have the added benefit of ensuring repeatability.

Once you made sure Docker is running, you can run ROS nodes as containers. Gramazio Kohler Research publishes ROS images on Docker Hub but there are many more to be found online.

You can start a minimally functional ROS system, containing a ROS master and the ROS Bridge with the following command:

docker run -p 9090:9090 -t gramaziokohler/ros-base roslaunch rosbridge_server rosbridge_websocket.launch

Complete ROS systems

It is usually not enough to run single ROS nodes. ROS systems are networks of multiple interconnected nodes. Docker provides a way to compose virtualized networks using the docker-compose command. These commands take one simple configuration file as input, and handle all tasks required to run and connect all the nodes.

As an example, download this file, open the command prompt, go to the folder where the file was downloaded, and run the following command:

docker-compose up -d

You now have a ROS system with two nodes running: a ROS master and the ROS Bridge which adds a web socket channel to communicate with ROS.

Creating new ROS bundles using containers is usually only a matter of combining them into a new docker-compose.yml file.

List of complete ROS systems

Table of ROS systems provided via docker compose

Name

Core

Bridge

Planner

Robot drivers

RViz

Web UI 1

Download

Base setup

Link

Panda Demo

MoveIt!

Link

ABB IRB1600 Demo

MoveIt!

abb_driver

Link

Kuka IIWA7 Demo

MoveIt!

Link

Kuka IIWA14 Demo

MoveIt!

Link

UR3 Planner

MoveIt!

ur_modern_driver

Link

UR5 Planner

MoveIt!

ur_modern_driver

Link

UR10 Planner

MoveIt!

ur_modern_driver

Link

UR3 Demo

MoveIt!

ur_modern_driver

Link

UR5 Demo

MoveIt!

ur_modern_driver

Link

UR10 Demo

MoveIt!

ur_modern_driver

Link

UR3 e-series Demo

MoveIt!

ur_modern_driver

Link

UR5 e-series Demo

MoveIt!

ur_modern_driver

Link

UR10 e-series Demo

MoveIt!

ur_modern_driver

Link

For access to the web UI, start your browser and go to:

http://localhost:8080/vnc.html?resize=scale&autoconnect=true

ROS on Linux

The usual but most involved way to install ROS is on a Linux machine, either virtual or real. The machine should have an IP address reachable from your computer.

Follow the ROS installation instructions for all the details, or alternatively, use the following commands as a brief outline of the steps required to install ROS on Ubuntu 16.04:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full ros-kinetic-rosbridge-server ros-kinetic-tf2-web-republisher python-rosinstall python-rosinstall-generator python-wstool

sudo rosdep init && rosdep update
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

Once ROS is installed, you can start a minimally functional ROS system, containing a ROS master and the ROS Bridge with the following command:

roslaunch rosbridge_server rosbridge_websocket.launch

ROS on WSL

For Windows 10 users, an alternative is to install the Windows Subsystem for Linux (WSL). WSL allows to run Linux within Windows without the need for an additional virtual machine.

To install WSL, open PowerShell as administrator and run:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Open the Microsoft Store and install Ubuntu 16.04 Linux distribution. Once the installation is completed, run bash and follow the instructions above to install ROS on Linux.

After installation, it is possible to access the graphic user interface. Check the following page for more details.

See also

For additional details, see Microsoft WSL documentation.