Block 1 · 12:00–12:50 · ROS 2 Foundations, Architecture, and Communication
ROS 2, Robot Integration, Simulation,
and Deployment
8.1 Robotics Before ROS
Before ROS, robot teams commonly built their own message formats, device drivers, process launchers, logging, visualization, coordinate-frame handling, and network transport. Research software was often tied to one laboratory or robot. Reusing a laser scanner, planner, or mapping algorithm could require major adaptation.
ROS was not the first robotics middleware. Player/Stage, YARP, Orocos, Microsoft Robotics Developer Studio, vendor frameworks, real-time control systems, and custom message buses addressed parts of the same problem. Industrial robots commonly used proprietary controllers, PLCs, fieldbuses, and offline programming tools. These systems could be reliable, but cross-vendor experimentation and software sharing were difficult.
Traditional firmware remains appropriate today for a bounded device with a small number of sensors and actuators, strict memory or timing limits, and no need for a robotics software ecosystem. A 500-line motor controller does not become better merely because it is separated into ten ROS nodes.
8.2 A Short History of ROS
ROS grew from robotics research work associated with Stanford and Willow Garage in the late 2000s. ROS 1 established a practical ecosystem of packages, message passing, tools, transforms, visualization, bag recording, and build conventions. It became extremely influential in laboratories, education, startups, and commercial prototypes.
ROS 1 used a central master for name registration and discovery and used custom TCPROS/UDPROS transports. Its original assumptions were not designed around production security, embedded real-time behavior, unreliable wide-area networks, or long-lived multi-vendor industrial products.
Work on ROS 2 began to address those limitations without discarding the successful conceptual model. ROS 2 adopted Data Distribution Service (DDS) concepts through a middleware abstraction, added explicit Quality of Service, improved multi-platform support, security integration, node lifecycle concepts, and stronger support for embedded and real-time work. Open Robotics and the wider community maintain the ecosystem. ROS 1 Noetic reached its official end of support on 31 May 2025; new course projects should normally use a supported ROS 2 distribution.
Names, installation targets, and support dates change [57]. Select a ROS 2 distribution by its official support window, target operating system, CPU architecture, and required package availability rather than selecting the newest name automatically.
8.3 ROS 1 and ROS 2 Compared
| Concern | ROS 1 | ROS 2 |
|---|---|---|
| Discovery | Central ROS master supports registration | Discovery through the selected RMW; commonly distributed DDS discovery |
| Transport | Primarily TCPROS and UDPROS | DDS or supported non-DDS middleware through the RMW interface |
| QoS | Limited application-facing control | Reliability, durability, history, depth, deadline, lifespan, and liveliness policies |
| Security | Not designed with a complete standard security model | Middleware-specific security; DDS Security with supported DDS implementations |
| Concern | ROS 1 | ROS 2 |
|---|---|---|
| Real-time intent | Difficult due to architecture and APIs | Designed to enable better real-time paths, but not automatic |
| Platforms | Primarily Linux-focused | Linux, Windows, macOS, and embedded-related paths depending on distribution |
| Managed lifecycle | Application-specific patterns | Standard lifecycle-node state model available |
| Components | Nodelets and process-level nodes | Composable nodes and executors |
| Parameters | Centralized conventions around master/parameter server | Parameters owned by individual nodes |
| Build | catkin | ament build system and colcon workspace tool |
| ROS 1 bridge | Not applicable | Can exchange supported ROS 1/ROS 2 interfaces during migration |
| Current direction | Legacy maintenance/migration context | Active ecosystem for new development |
ROS 2 is not simply ROS 1 with a new command syntax. Discovery, QoS, parameter ownership, launch, time, lifecycle, and middleware behavior require new reasoning. A migration that mechanically translates APIs may preserve the original architectural weaknesses.
8.4 Why Use ROS 2?
ROS 2 is attractive when a system benefits from:
- reusable drivers, perception, navigation, manipulation, and visualization packages;
- typed communication between independently developed components;
- coordinate-frame management through tf2;
- robot description using URDF/Xacro;
- recording and replay with ros2 bag;
- inspection using command-line tools, RViz, rqt, tracing, and diagnostics;
- simulation integration and hardware abstraction;
- multi-language development, especially C++ and Python; and
- distributed computation across onboard computers and development workstations.
ROS 2 may be unnecessary or harmful when the product is a small fixed-function controller, has extremely limited resources, has a simple certified architecture, cannot tolerate discovery traffic, needs a very small attack surface, or would gain no meaningful package/tool reuse. Integration cost, dependency lifecycle, middleware tuning, and validation can exceed the value.
| Situation | Likely choice | Reason |
|---|---|---|
| Single sensor and relay service | MCU firmware or small Linux service | ROS graph adds little value |
| Situation | Likely choice | Reason |
|---|---|---|
| Research mobile robot | ROS 2 | Drivers, transforms, bags, visualization, navigation ecosystem |
| Fast motor-current loop | MCU/drive controller | Deterministic local control and safety boundary |
| Camera/LiDAR perception | ROS 2 on Linux/accelerator | High-rate typed data and mature tooling |
| Certified emergency stop | Safety relay/PLC/controller | Independent certified safety function required |
| Fleet/cloud telemetry | MQTT/HTTP plus selected ROS bridge | ROS discovery is not a fleet/cloud protocol |
| Industrial robot cell | Vendor controller/PLC plus controlled ROS 2 integration | Preserve certified control and plant interlocks |
