Skip to content

Contracts, Components, And Capabilities

R2Kernel uses three primitive public spec families and one compatibility bundle.

Family Owns Example
msg.* payload datatype and field layout msg.core.spatial.v1/Pose
api.* Event, Control, Procedure, and Operation endpoints api.locomotion.velocity.v1
capability.* app-facing robot semantics and constraints capability.r2kernel.mobility.body_motion.v1
component.* replacement-compatible bundle of required APIs component.mobile_base.v1

The runtime envelope is not a fourth public payload family. R2Kernel adds identity, transport timing, execution timing, status, and lifecycle metadata around typed payloads at runtime.

How The Layers Connect

msg.* payloads
    -> api.* endpoint contracts
        -> component.* compatibility bundles for component-role subsystems

msg.* payloads
    -> api.* endpoint contracts
        -> capability.* app-facing semantic contracts

An API is deliberately smaller than a component. For example, component.mobile_base.v1 requires locomotion velocity and mobile-base state APIs. Optional odometry or differential-drive APIs do not change the meaning of the required bundle.

A capability is not an API bundle. It names the robot-level behavior an app may rely on, points to one backing api.* interface, and adds semantic rules such as stop-on-disconnect or topology independence. Its authority segment identifies the organization or package that owns those semantics.

Subsystem Roles

All executable units are subsystems. Their role determines the normal contract boundary.

Role Normal requirements Normal provides
gateway device and host resources public api.* hardware abstractions
component gateway or component APIs, plus CPU resources component.* bundle and its api.* interfaces
compound component, gateway, or capability interfaces app-facing capability.* interfaces
app capability.* interfaces package-specific status or operator surfaces when needed

Gateway subsystems are the only role that directly owns device-level hardware communication. A simulator-backed device follows the same boundary and is treated as a device behind its gateway.

Public And Package-Local Contracts

Official gateway and component provides must resolve to the installed public R2Kernel dictionary. This protects replacement compatibility.

Product-specific behavior can be package-local when no stable public semantic standard exists. The cleaner tutorial therefore defines trash disposal under its own tutorial.* spec root. It does not claim that trash incineration is a general R2Kernel capability.

Source Of Truth

  • spec/messages
  • spec/apis
  • spec/components
  • spec/capabilities

The installed SDK mirrors this tree. The runtime validator and Web Console Spec Dictionary read the same definitions.