ADR-0023 — The layer model: a robot fills the platform's layers with its own plugins¶
Status: Accepted by the operator: the profile and plugins on 2026-11-19 (RFC-0020), the navigator for any robot and the local-control layer on 2026-11-23 and 2026-11-26, the layers on 2026-11-30 (RFC-0025 §3.12, revision L1). The advisor's second review of revision L1 is pending. Date: 2026-11-30 Scope: architecture: the platform's core shape; every robot, every navigator.
Context¶
The goal (the operator, 2026-11-19) is "a robot platform where we can load any robot", and "not to
apply in practice things that we really learned on one robot only; instead each robot brings its
impact on planning, like little plugins". The navigator was written for the duck: mapd, the 8x8
depth sensor, the head and robotd were assumed outright. The next robots are a wheeled TurtleBot3
Burger running ROS 2 and a tracked NXT. A learned local controller now exists for the duck, and
the operator wants it compared with the rules on the same robot, everything else the same.
Decision¶
- A robot brings a profile (data) and plugins (code). The shared parts (planning, exploring, the safety rules, goals, the views) hold no robot's numbers; a lesson learned on one robot is a number in its profile or code in its plugin.
- Six layers, the same for every robot: sensing (feeds the others), localisation and mapping, planning and behaviour, local control, safety (cross-cutting), locomotion.
- Three words, one meaning each. A layer is one of the six. A plugin fills a layer for one
robot, named and versioned (
tof8x8@1,mapd@1,rules@1,learned@<sha8>). A provider supplies a plugin:ours(code in this repository) orrobot(the robot's own stack, through its connector). The profile's block islayers; "slot" and "module" are not used. - Planning and behaviour has no per-robot plugin of ours. Goals, exploration and recovery are one layer; its provider is the navigator's core or the robot's own stack. Recognising objects is a capability, not a layer.
- One navigator for every robot: a core that knows no robot, and each robot's plugins behind interfaces written without one robot's shape.
- A system is a robot and its layers' plugins, named in the run's build identity. Two systems
that differ in one layer are the comparison the platform is built for (the duck with
rules@1against the duck with a learned local controller). Every tick says which layer decided, derived from the records a run already has. - Both robot joins are this shape with different providers
(ADR-0020): the interface join is
oursabove locomotion except where the profile saysrobot; the contract join isrobotfor localisation, planning, local control and the stack's own safety. - No interim state. The rename from
pluginstolayersis done everywhere in one step, and every stored profile is migrated, not read in two shapes. Note (2026-12-03): this holds for every change of a file format's shape, not only this rename (ADR-0034).
Consequences¶
- A second robot is a profile and plugins, not a fork of the navigator; the duck's behaviour must stay unchanged through the split (its verdicts are the proof).
- The Burger's mapper (SLAM Toolbox) is a plugin with provider
robot, declared in its profile. - Mission Control shows each robot's layers, providers, versions and health; the Observatory shows per run which layer had the last word.
- Learned plugins are bound to their robot and layer (ADR-0028).
- The safety layer is declared per entry (ADR-0024).
Alternatives considered¶
- A duck navigator per robot, or ROS 2 as the foundation: rejected in ADR-0020.
- "Slot" or "module" for the plugin's place: rejected; "module" already means a code module.
- Goals, exploration and recovery as separate layers; recognising objects as a layer: rejected (the operator, 2026-11-30, answers 1 and 2).
- Reading profiles in two shapes during a migration: rejected; no early debt.
Built¶
Partly. The profile, five plugin interfaces including local_controller, rules@1 and
learned@<sha8>, and ctrl@/walker@ in the build identity exist. Not built: the layers
block, the robot-free navigator core, the decider, the layers in hello (RFC-0025 steps 2, 3, 5b,
7, 8).
Inventory¶
RFC-0020-1, -2, -3, -4, -5; RFC-0022-5; RFC-0025-9, -10, -14, -15, -23, -24, -35, -36, -38, -39, -41, -42; RFC-0005-3; RFC-0032-5 (the inventory).