Reproduce the first workshop.
After one round, predict [3, 4, 5, 7, 8, 9]. Inspect one process’s own value and five incoming envelopes. The central barrier does not perform its averaging.
14 / ROS 2 · NODES, TOPICS AND EXPLICIT ROUNDS
In workshop 1, one browser computed every agent. Here, six ROS 2 nodes in six Python processes actually exchanged messages and computed their own updates. Replay their recorded trace, inspect one node’s inbox, and compare every committed state with the original consensus rule.
Predict: one agent omits a publication. Does reliable delivery invent the missing value, do peers average a partial inbox, or does the round stop?
The same linear update as workshop 1, with a constant edge gain α = 1/12. A node uses its own scalar and its configured neighbors’ scalars.
Each agent computes locally. A separate supervisor coordinates round barriers and records evidence; this timing authority is centralized.
One node per process is this experiment’s choice, not a ROS requirement. Topics carry messages with run, round and sender identity. The complete graph and chain change neighbors, not the algorithm.
Agents wait for every expected neighbor before computing. This browser replays a saved process trace. It runs no live ROS nodes and measures no network latency.
Local inputs versus evaluator: each decision receives one node’s own value and actual neighbor envelopes for that round. The global mean, spread and browser reference comparison are observer measurements, never an extra input to the agents.
REAL PROCESS TRACE · BROWSER REPLAY
Play, Reset and the timeline only change replay position. To run new ROS processes, use the reproducible runner described below.
Drag to orbit · scroll to zoom. Blocks represent operating-system processes, not robots. Channels show neighbor subscriptions; height of the small value columns represents the scalar.
No new processes run in this browser.
ONE AGENT’S AVAILABLE INFORMATION
| From | Envelope round | Scalar value | State |
|---|
The trace uses agent for the receiver and from for the sender. IDs 0–5 correspond to A1–A6. The wire JSON uses sender; run ID, round and value are preserved.
OBSERVER VIEW / NOT SHARED AGENT KNOWLEDGE
| Agent | Process PID | Value | Neighbors |
|---|
The horizontal axis counts committed logical rounds, not seconds. Presentation phases group logged events; they are not the wall-clock order of every process callback.
Process IDs identify the recorded execution. They do not imply those programs are currently running. Import validation checks the trace contract and numerical comparison; it does not authenticate who created a file.
PREDICT · COMPARE · EXPLAIN / BUNDLED REFERENCE CASES
After one round, predict [3, 4, 5, 7, 8, 9]. Inspect one process’s own value and five incoming envelopes. The central barrier does not perform its averaging.
Information travels through intermediate agents over many rounds. Compare agreement round and messages per exchange. Playback duration is not a middleware benchmark.
A3 (wire sender ID 2) deliberately skips its publication in round 2. Its peers cannot complete their expected inboxes. The supervisor records a timeout; it does not silently accept partial updates.
ROS 2 / ROBOT OPERATING SYSTEM 2
A node is a ROS participant. A process is an operating-system program instance. A topic is a named publish–subscribe channel. The RMW layer connects ROS to a middleware implementation.
The six agents run on one host for this experiment. There are no drones, sensor inputs, radio links, clock-synchronization measurements or flight dynamics.
The runtime uses reliable, volatile, keep-last QoS with depth 256 and std_msgs/msg/String carrying JSON. This lesson does not compare QoS policies or measure end-to-end latency. A message that the application never publishes cannot be delivered by the transport.
The failure case deliberately omits a publication. In a general system, silence alone would not identify a crashed process. Restart handling, asynchronous consensus and transport comparisons belong to later experiments.
With Docker available, run npm run record:ros2 from the repository, then import local/ros2-consensus.json above. This launches actual ROS 2 processes; it is separate from browser playback. The repository guide docs/lessons/14-ros2-rounds.md explains the runtime, protocol and limitations.
Primary documentation: ROS 2 nodes, topics, and Quality of Service. The known averaging rule is introduced in workshop 1; ROS 2 is the execution and communication stack, not a new consensus algorithm.