This article was last modified on 27 June 2017.
It shouldn’t be a surprise that the robotics industry is getting more and more complex. Luckily, there’s no need to worry since an army of engineers works to build an entire fleet of software and hardware to solve the problems that may appear. The integration of an enormous amount of sensors and actuators could be a real problem. The complexity is transferred also to the area of algorithms and to the hardware platforms dedicated to integrating the robotics components.
The Robot Operating System (ROS) is engineered to solve the problems from the software side. It contains a series of libraries that support a wide range of sensors and actuators. You’re allowed to write a ROS node for your sensor. In addition, it has a good integration with other robot middleware software like OpenCV, Point Cloud Library, etc.
ROS can run on single board computers such as Raspberry Pi, or integrated with microcontroller boards such as the Arduino. In this article, the focus is to explore the best tutorials to start working with ROS on both Raspberry Pi and Arduino.
ROS and Arduino
Arduino is a quite attractive embedded platform among hobbyists for several reasons, including here the low price, an easy way to interface different sensors and actuators, a large community that share information and resources, and of course it can be interfaced with ROS using the rosserial package.
With no extra effort, you can control an advanced robot without writing a single hardware drive, only by setting up a network of custom ROS center nodes. You can use the ROS with Arduino for a wide range of applications such as monitoring, measuring the values from a sensor, control R/C servos, and many other applications with support from ROS side.
Tools to use ROS with Arduino
It is very easy to use the ROS with Arduino. Between the Arduino and ROS is the Arduino IDE tool designed for a quickly and easily programming hardware. The communication between ROS and Arduino is done through the rosserial_arduino package, which provide a ROS communication protocol able to work with Arduino’s serial ports.
The rosserial_arduino package is a dedicated tool engineered to work directly with ROS messages, get the ROS system time, or publish TF transformer.
Tutorials to setup ROS for Arduino
The open-source Robot Operating System is a well documented framework that help you to explore all the features and functionalities on a long list of operating systems. You have available all the information to setup the ROS in minutes on Linux and start using the ROS with Arduino.
Here are the tutorials to setup the ROS for Arduino:
- Setup the Arduino IDE and rosserial on Raspberry Pi 3 (Linux) for Arduino – this tutorial shows you how to setup the Arduino IDE to use rosserial that allows the communication between ROS and the serial port of the Arduino board;
- From this tutorial you can learn how to setup a virtual machine with Ubuntu and ROS on Windows machine;
- This tutorial show you in details how to setup ROS and Arduino IDE on Mac OS X;
Examples of ROS and Arduino
The “Hello World” example
Every new project starts with a “Hello World” example. The best way to enter into the world of ROS and Arduino is also to build the “Hello World” application. Here is the tutorial that shows you how to run the first application for ROS and Arduino using the rosserial.
In the following, I explore several other tutorials about how to use the ROS framework and Arduino board.
- From the beginning, you can start using this series of ROS tutorials for beginners that uses rosserial_arduino package for a long list of applications;
- Arduino Double Sonar With ROS – this example shows you how to use the Arduino together with ROS and build a simple double sonar application with PING))) sensors;
- Sending Data from Arduino to ROS – a comprehensive tutorial from where you can start digging to find how the Arduino board to send data to the ROS;
- Android + Arduino + ROS – with this video presentation, you enter into the area of advanced applications where a ROS compatible robot based on Arduino board can be controlled via an Android device;
- ROS Kinetic on Raspberry Pi 3 (Ubuntu Mate) – from this tutorial you can learn how to setup the ROS on Raspberry Pi 3 running Ubuntu Mate;
- Installing on Raspberry PI/Raspbian from source – this tutorial shows you tips and tricks to install the ROS on Raspberry Pi in a chroot on a machine of your choice;
- Setting up Hydro on RaspberryPi – ROS Hydro is one of the newest ROS version released somewhere in 2013. From this tutorial you can learn how to setup the ROS Hydro version on Raspberry Pi;
- Installing on Debian from SVN – this guide shows you how to install the ROS Fuerte version on Debian from SVN;
- ROS Kinetic: Publisher and Subscriber in Python – this is something like “Hello World” in ROS. In this tutorial, I show you how to write a publisher and subscriber in Python. Both nodes run on a Raspberry Pi 3;
- rosserial_embeddedlinux – on this page you can find several examples to start building your first application called “Hello Ros” and up to advanced technique that can be applied for ROS;
- ROS Tutorials – another series of tutorials and examples from where you can learn how to use the ROS at maximum power(with Raspberry Pi, of course!);
- RaspberryPI Ros – this tutorial covers the complete process to connect TakkTile sensors to the Raspberry PI directly using the I2C bus;
- (link not available)AR.Drone 2 with ROS and OpenCV: Get started quick with Ubuntu or Mint – this is a really comprehensive article from where you can find how to install ROS, how to use it with OpenCV, and how making a drone fly using a joystick;
- Raspberry Pi + Wifi Dongle + Usb Webcam = remote control web bot – this is an example how to build a tracked robot able to be controlled over a wireless connection and uses a webcam to capture images;
- ROS by Example: Head Tracking in 3D (Part 2) – with this example you enter into the area of advanced projects where the ROS framework is used to track 3D points by smoothly panning and tilting the camera;
ROS on Raspberry Pi
The ROS operating system is designed to run on a network of machines and has support for simultaneous execution of a program or multiple computational threads.
Official information claims Ubuntu as official operating system supported by ROS. But in an experimental way, several other operating systems support ROS without any problems. The Debian and Arch Linux are two of the better choice operating systems that can run on the RPi.
In the following, I explore a list with tutorials so you can learn how to setup ROS on Raspberry Pi running different operating systems.
Examples with ROS and Raspberry Pi
You can start building applications with ROS and Raspberry Pi using the ROS wiki, tutorials and the community support.
You can build with ROS and RPi a lot of robotic projects such as intelligent quadcopters, telepresence robots, security robots, and more. In the following, I explore several examples from where you can learn how to build projects using ROS and Raspberry Pi.