Robot Operating System

ROS (a.k.a Robot Operating System or Robot OS), can be seen as a kind of Robotic Framework. Because it can't be installed directly on robotic equipment (ROS needs a computer and works above its OS), it can't be considered as a pure operating system. In addition to providing a complete development and execution environment, ROS includes numerous simulation tools. However, it does not guarantee runtime properties, services or event processing in deterministic time spots (i.e. realtime processing), though it is possible to integrate ROS with realtime code (openCV is supported). ROS is released under the terms of the BSD license, and is open source software. It is free for commercial and research use.

Originally developed in 2007 by the Stanford Artificial Intelligence Laboratory (see Stair Project), ROS is now widely used by the robotic ecosystem thanks to the open source community and Willow Garage (a robotics research institute/incubator, which produce the famous PR2 or TurtleBot and is currently making the main development). Many robots are supported: WifiBot, Lego Mindstorm NXT, HERB (see http://www.ros.org/wiki/Robots for a full list).

A ROS application is organized into "nodes" which are Unix competitors processes. The nodes interact by sending events via "topics" in a publisher-subscriber model. The implementation of internal functions can be achieved in C++ or Python language. Many robotic equipments have their dedicated ROS nodes developped (Lidar, Kinect, ...).

ROS is available on a wide range of OS, but the Ubuntu version, for compatibility reasons and rapid implementation, is the best choice.

In this short page, we propose to you a short ROS start guide, with the most frequent errors you can encounter during your development.

Installation
''Note: we choose to present to you the latest ROS development environment available (in March 2013): Ubuntu 12.10 and ROS v7 (called Groovy Galapagos). We also work with Ubuntu 13.04 without facing major problems. With its last release, Willow Garage introduced a new ROS build system: catkin. Given the huge amount of packages out there build with rosbuild, and the impossibility to migrate simply from one system to the other, we will continue to use rosbuild. Most of the robotic equipment works with the couple (Ubuntu 12.10 / ROS Groovy), however check before if there is not incompatibility issues (for example: Kinect works better with Ubuntu 12.04 / ROS Fuerte). If you just want to test ROS, a virtual machine archive (.ova) is available (see others section).''

Setup sources.list
In a terminal, type the following line: where is your Ubuntu ditsribution name (e.g. "precise", "quantal", "raring", ...) This will add ROS repositories to your distribution.

Setup your keys
Now, you are able to download the latest updates from ROS.

Installation
Update the Debian packages:

Install the full Groovy configuration:

It will install ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception.

Initialize rosdep: This tool is used to install system dependencies required by ROS packages.

ROS is now installed but in order to run it, some environment variables must be assigned. This can be automatically done at the launch of the session:

Install python tools:

Finally, execute the script:

Configuration
Create a ROS workspace:

Every time you modify or add entries in your workspace, re-source ~/groovy_workspace/setup.bash:

Principles
ROS is organized in packages. They include, among other, ROS nodes. They allows developers to easily reuse pieces of software. You can create a package by hand or with the command:. Actually, a ROS package is nothing but a directory descended from ROS_PACKAGE_PATH that has a manifest.xml file in it. A package may include the following contents: : message types : service types : executable scripts (Pyhton sources for example) : CMake build file (ROS package are build with [CMake], this file describes how to do it) : minimal specification about the package: describes metadata and dependancies (see an example). To build a package, type ROS nodes are processes, that reside in the same or different machines. Usually, there are many nodes to control a robot (e.g. one for a motor, another one for a sensor, etc.) The nodes are combined together and communicate with topics or services. They get to know each other via a particular node, rosmaster. A node has a name and a type. During an execution, type  to list the currently running nodes. A topic is a bus over which nodes communicate data, thanks to the publisher/subscriber model (communication many-to-many). Communication over a topic is unidirectional and asynchronous. Type  to list the current topics. Services allows nodes to make remote procedure calls (communication one-to-one). Communication over a service is synchronous. Launch files are XML files that specify a list of nodes, topics, services, parameter values and eventually the machines for distributed applications.
 * Packages
 * Nodes
 * Topics
 * Services
 * Launch files

Useful commandline tools

 * : change directory directly to a package (indepently from your current directory)
 * : list directory contents directly
 * : lists the currently running nodes
 * : lists the current topics
 * : build a package

Graphical tools

 * : a 3D visualization tool
 * display a graph of the currently running nodes and the topics

Troubleshooting

 * Error messages:
 * "No ROS_WORKSPACE set": check if your environment variable ROS_WORKSPACE is assigned . If not, update your .bashrc file.
 * "No ROS_PACKAGE_PATH set": check if your environment variable ROS_PACKAGE_PATH is assigned . If not, update your .bashrc file.
 * "roscd: No such package/stack '': check if the package exists and is included in your ROS_PACKAGE_PATH.

Polytech' Projects which use ROS
RobAIR2013 Armind EA2012_Langages_et_Canevas_pour_la_robotique_de_service RobAIR2013-RICM5: XMPP tunneling between ROS nodes, using GStreamer Robot d'inspection géotechnique

Javascript
rosnodejs Programming robots with Javascript in ROS using Node.js

Node-RED
node-red-contrib-ros

Docker
https://hub.docker.com/_/ros/

Others
For industrial robots, a dedicated ROS version exists: ROS industrial. A useful ROS Cheat Sheet: A ROS virtual machine with ROS Groovy or ROS Fuerte pre-installed (Runs with VirtualBox, VmWare, Parallels…) Courses about ROS (read for example this presentation, and this one).