|
| 1 | +# [ROS: an open-source Robot Operating System (2009)](https://scholar.google.com/scholar?cluster=143767492575573826) |
| 2 | +Writing code that runs on a robot is a *very* challenging task. Hardware varies |
| 3 | +from robot to robot, and the software required to perform certain tasks (e.g. |
| 4 | +picking up objects) can require an enormous amount of code (e.g. low-level |
| 5 | +drivers, object detection, motion planning, etc.). ROS, the Robot Operating |
| 6 | +System, is a framework for writing and managing distributed systems that run on |
| 7 | +robots. Note that ROS is not an operating system as the name suggests. |
| 8 | + |
| 9 | +## Nomenclature |
| 10 | +A **node** is a process (or software module) that performs computation. Nodes |
| 11 | +communicate by sending **messages** (like protocol buffers) to one another. |
| 12 | +Nodes can publish messages to a **topic** or subscribe to a topic to receive |
| 13 | +messages. ROS also provides **services** (i.e. RPCs) which are defined by a |
| 14 | +service name, a request message type, and a response message type. |
| 15 | + |
| 16 | +## What is ROS? |
| 17 | +In short, ROS provides the following core functionality. |
| 18 | + |
| 19 | +- ROS provides a messaging format similar to protocol buffers. Programmers |
| 20 | + define messages using a ROS IDL and a compiler generates code in various |
| 21 | + languages (e.g. C++, Octave, LISP). Processes running on robots then send |
| 22 | + messages to one another using XML RPC. |
| 23 | +- ROS provides command line tools to debug or alter the execution of |
| 24 | + distributed systems. For example, one command line tool can be used to log a |
| 25 | + message stream to disk without having to change any source code. These logged |
| 26 | + messages can then be replayed to develop and test other modules. Other |
| 27 | + command line tools are described below. |
| 28 | +- ROS organizes code into **packages**. A package is just a directory of code |
| 29 | + (or data or anything really) with some associated metadata. Packages are |
| 30 | + organized into **repositories** which are trees of directories with packages |
| 31 | + at the leaves. ROS provides a package manager to query repositories, download |
| 32 | + packages, and build code. |
| 33 | + |
| 34 | +## Design Goals |
| 35 | +ROS has the following design goals which motivate its design. |
| 36 | + |
| 37 | +- **Peer-to-peer.** Because ROS systems are running on interconnected robots, |
| 38 | + it makes sense for systems to be written in a peer-to-peer fashion. For |
| 39 | + example, imagine two clusters of networked robots communicate over a slow |
| 40 | + wireless link. Running a master on either of the clusters will slow down the |
| 41 | + system. |
| 42 | +- **Multilingual.** ROS wants to support multiple programming languages which |
| 43 | + motivated its protobuf-like message format. |
| 44 | +- **Tools-based.** Instead of being a monolithic code base, ROS includes a |
| 45 | + disaggregated set of command line tools. |
| 46 | +- **Thin.** Many robot algorithms developed by researchers *could* be re-used |
| 47 | + but often isn't because it becomes tightly coupled with the researcher's |
| 48 | + specific environment. ROS encourages algorithms to developed agnostic to ROS |
| 49 | + so they can be easily re-used. |
| 50 | +- **Free and Open-Source** By being free and open-source, ROS is easier to |
| 51 | + debug and encourages collaboration between lots of researchers. |
| 52 | + |
| 53 | +## Use Cases |
| 54 | +- **Debugging a single node.** Because ROS systems are loosely coupled modules |
| 55 | + communicating via RPC, one module can be debugged against other already |
| 56 | + debugged modules. |
| 57 | +- **Logging and playback.** As mentioned above, message streams can be |
| 58 | + transparently logged to disk for future replay. |
| 59 | +- **Packaged subsystems.** Programmers can describe the structure of a |
| 60 | + distributed system, and ROS can launch the system on across multiple hosts. |
| 61 | +- **Collaborative development.** ROS' packages and repositories encourage |
| 62 | + collaboration. |
| 63 | +- **Visualization and monitoring.** Message streams can be intercepted and |
| 64 | + visualized over time. Subscribe streams can also be filtered by expressions |
| 65 | + before being visualized. |
| 66 | +- **Composition of functionality.** Namespaces can be used to launch the same |
| 67 | + system multiple times. |
0 commit comments