WHY ROS?

Core Components

While we cannot provide an exhaustive list of what is in the ROS ecosystem, we can identify some of the core parts of ROS and talk about their functionality, technical specifications, and quality in order to give you a better idea of what ROS can contribute to your project.

Communications Infrastructure

At the lowest level, ROS offers a message passing interface that provides inter-process communication and is commonly referred to as a middleware.

Message Passing

A communication system is often one of the first needs to arise when implementing a new robot application. ROS's built-in and well-tested messaging system saves you time by managing the details of communication between distributed nodes via the anonymous publish/subscribe mechanism. Another benefit of using a message passing system is that it forces you to implement clear interfaces between the nodes in your system, thereby improving encapsulation and promoting code reuse. The structure of these message interfaces is defined in the message IDL (Interface Description Language).

Recording and Playback of Messages

Because the publish/subscribe system is anonymous and asynchronous, the data can be easily captured and replayed without any changes to code. Say you have Task A that reads data from a sensor, and you are developing Task B that processes the data produced by Task A. ROS makes it easy to capture the data published by Task A to a file, and then republish that data from the file at a later time. The message-passing abstraction allows Task B to be agnostic with respect to the source of the data, which could be Task A or the log file. This is a powerful design pattern that can significantly reduce your development effort and promote flexibility and modularity in your system.

Remote Procedure Calls

The asynchronous nature of publish/subscribe messaging works for many communication needs in robotics, but sometimes you want synchronous request/response interactions between processes. The ROS middleware provides this capability using services. Like topics, the data being sent between processes in a service call are defined with the same simple message IDL.

Distributed Parameter System

The ROS middleware also provides a way for tasks to share configuration information through a global key-value store. This system allows you to easily modify your task settings, and even allows tasks to change the configuration of other tasks.

Robot-Specific Features

In addition to the core middleware components, ROS provides common robot-specific libraries and tools that will get your robot up and running quickly. Here are just a few of the robot-specific capabilities that ROS provides:

Standard Robot Messages

Years of community discussion and development have led to a set of standard message formats that cover most of the common use cases in robotics. There are message definitions for geometric concepts like poses, transforms, and vectors; for sensors like cameras, IMUs and lasers; and for navigation data like odometry, paths, and maps; among many others. By using these standard messages in your application, your code will interoperate seamlessly with the rest of the ROS ecosystem, from development tools to libraries of capabilities.

Robot Geometry Library

A common challenge in many robotics projects is keeping track of where different parts of the robot are with respect to each other. For example, if you want to combine data from a camera with data from a laser, you need to know where each sensor is, in some common frame of reference. This issue is especially important for humanoid robots with many moving parts. We address this problem in ROS with the tf (transform) library, which will keep track of where everything is in your robot system.

Designed with efficiency in mind, the tf library has been used to manage coordinate transform data for robots with more than one hundred degrees of freedom and update rates of hundreds of Hertz. The tf library allows you to define both static transforms, such as a camera that is fixed to a mobile base, and dynamic transforms, such as a joint in a robot arm. You can transform sensor data between any pair of coordinate frames in the system. The tf library handles the fact that the producers and consumers of this information may be distributed across the network, and the fact that the information is updated at varying rates.

Robot Description Language

Another common robotics problem that ROS solves for you is how to describe your robot in a machine-readable way. ROS provides a set of tools for describing and modeling your robot so that it can be understood by the rest of your ROS system, including tf, robot_state_publisher, and rviz. The format for describing your robot in ROS is URDF (Unified Robot Description Format), which consists of an XML document in which you describe the physical properties of your robot, from the lengths of limbs and sizes of wheels to the locations of sensors and the visual appearance of each part of the robot.

Preemptable Remote Procedure Calls

While topics (anonymous publish/subscribe) and services (remote procedure calls) cover most of the communication use cases in robotics, sometimes you need to initiate a goal-seeking behavior, monitor its progress, be able to preempt it along the way, and receive notification when it is complete. ROS provides actions for this purpose. Actions are like services except they can report progress before returning the final response, and they can be preempted by the caller. So, for example, you can instruct your robot to navigate to some location, monitor its progress as it attempts to get there, stop or redirect it along the way, and be told when it has succeeded (or failed). An action is a powerful concept that is used throughout the ROS ecosystem.

Diagnostics

ROS provides a standard way to produce, collect, and aggregate diagnostics about your robot so that, at a glance, you can quickly see the state of your robot and determine how to address issues as they arise.

Whether you are an engineer looking to do some rapid research and development, a robotics researcher wanting to get your research done in a timely fashion, or a hobbyist looking to learn more about robotics, these out-of-the-box capabilities will help you do more, with less effort.

Tools

One of the strongest features of ROS is the powerful development toolset. These tools support introspecting, debugging, plotting, and visualizing the state of the system being developed. The underlying publish/subscribe mechanism allows you to spontaneously introspect the data flowing through the system, making it easy to comprehend and debug issues as they occur. The ROS tools take advantage of this introspection capability through an extensive collection of graphical and command line utilities that simplify development and debugging.

Command-Line Tools

Do you spend all of your time remotely logged into a robot? ROS can be used 100% without a GUI. All core functionality and introspection tools are accessible via one of our more than 45 command line tools. There are commands for launching groups of nodes; introspecting topics, services, and actions; recording and playing back data; and a host of other situations. If you prefer to use graphical tools, rviz and rqt provide similar (and extended) functionality.

rviz

Perhaps the most well-known tool in ROS, rviz provides general purpose, three-dimensional visualization of many sensor data types and any URDF-described robot.

rviz can visualize many of the common message types provided in ROS, such as laser scans, three-dimensional point clouds, and camera images. It also uses information from the tf library to show all of the sensor data in a common coordinate frame of your choice, together with a three-dimensional rendering of your robot. Visualizing all of your data in the same application not only looks impressive, but also allows you to quickly see what your robot sees, and identify problems such as sensor misalignments or robot model inaccuracies.

rqt

ROS provides rqt, a Qt-based framework for developing graphical interfaces for your robot. You can create custom interfaces by composing and configuring the extensive library of built-in rqt plugins into tabbed, split-screen, and other layouts. You can also introduce new interface components by writing your own rqt plugins .

The rqt_graph plugin provides introspection and visualization of a live ROS system, showing nodes and the connections between them, and allowing you to easily debug and understand your running system and how it is structured.

With the rqt_plot plugin, you can monitor encoders, voltages, or anything that can be represented as a number that varies over time. The rqt_plot plugin allows you to choose the plotting backend (e.g., matplotlib, Qwt, pyqtgraph) that best fits your needs.

For monitoring and using topics, you have the rqt_topic and rqt_publisher plugins. The former lets you monitor and introspect any number of topics being published within the system. The latter allows you to publish your own messages to any topic, facilitating ad hoc experimentation with your system.

For data logging and playback, ROS uses the bag format. Bag files can be created and accessed graphically via the rqt_bag plugin. This plugin can record data to bags, play back selected topics from a bag, and visualize the contents of a bag, including display of images and plotting of numerical values over time.