ROS 2 Middleware Architecture & Operational Principles
This section presents the modular, decentralized layer structure of ROS 2 built upon the Data Distribution Service (DDS) industry standard. Unlike ROS 1, which relied on a single centralized rosmaster, ROS 2 enables real-time peer-to-peer data transport with dynamic discovery, deterministic node state management, and strict domain isolation across distributed networks.
Distributed Middleware Layer Abstraction Stack
Click any layer to inspect its software responsibilities and bindings.
User Application Layer
Enforces application-domain logic, high-level task planning, state estimation algorithms, and user execution code in C++ or Python.
Dynamic Discovery & Domain Isolation
ROS 2 uses the Simple Discovery Protocol (SDP) over UDP multicast. Nodes automatically discover peer publishers and subscribers on the same local network subnet without needing a central server.
Formula: Multicast Port = 7400 + (250 × ROS_DOMAIN_ID)
ROS_DOMAIN_ID=0, nodes will cross-talk, corrupting transform trees and topic scans. Always assign each workstation a unique Domain ID!
Managed Lifecycle Node State Machine
Simulate transitions across ROS 2 managed nodes to prevent non-deterministic startup sequences in critical navigation servers.
Node is instantiated. Parameters are loaded, but no ROS topic publishers, service servers, or memory buffers are allocated.