# minhanghuang/cyberrt architecture

> Architecture diagram of the GitHub repository minhanghuang/cyberrt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/minhanghuang/cyberrt
- Repository: https://github.com/minhanghuang/cyberrt

## Overview

Apollo CyberRT is a real-time runtime and communications framework for composing and running distributed robotics applications. A user starts the runtime or launches configured components; components use nodes to publish and subscribe to typed channels, while CyberRT discovers endpoints and schedules work to deliver messages. The repository also provides services and parameters, recording and playback, monitoring and channel/node/service inspection, Python bindings, and a ROS bridge. The workflow is supported by the README and tree; source excerpts are partial, so links between unsampled subsystems are limited to documented capabilities.

Main entry points: [`cyber/node/node.h`](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/node/node.h) (Node API), [`cyber/service_discovery/topology_manager.cc`](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/service_discovery/topology_manager.cc) (Service discovery), [`cyber/transport/transport.h`](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/transport/transport.h) (Channel transport), [`cyber/component/component_base.h`](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/component/component_base.h) (Components)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Runtime"]
  node_mainboard["Mainboard<br/>[mainboard.cc]"]
  node_controller["Module controller"]
  node_components["Components<br/>[component_base.h]"]
  node_node["Node API<br/>[node.h]"]
  node_messages["Message types<br/>[message_traits.h]"]
end

subgraph group_comm["Communication"]
  node_channels["Channel transport<br/>[transport.h]"]
  node_dispatch["Message dispatch<br/>[dispatcher.h]"]
  node_shm["Shared memory<br/>[segment.h]"]
  node_rtps["RTPS transport<br/>[participant.h]"]
  node_discovery["Service discovery"]
  node_graph["Topology graph<br/>[graph.h]"]
end

subgraph group_execution["Execution and State"]
  node_scheduler["Scheduler<br/>[scheduler.h]"]
  node_tasks["Task manager<br/>[task_manager.cc]"]
  node_parameters["Parameters"]
  node_services["Service API<br/>[service.h]"]
end

subgraph group_records["Recording"]
  node_recorder["Recorder and player<br/>[recorder.cc]"]
  node_recordio["Record file I/O<br/>[record_writer.cc]"]
end

subgraph group_interfaces["Tools and Integrations"]
  node_channeltools["Channel tools<br/>[cyber_channel.py]"]
  node_inspection["Node and service tools<br/>[cyber_node.py]"]
  node_monitor["Monitor<br/>[main.cc]"]
  node_python["Python bindings<br/>[cyber.py]"]
  node_ros["ROS bridge<br/>[ros_bridge.cc]"]
end

node_user(("Application developer"))
node_rosnetwork(("ROS network"))
node_recorduser(("Record operator"))

node_user -->|"starts runtime"| node_mainboard
node_mainboard -->|"loads modules"| node_controller
node_controller -->|"initializes"| node_components
node_components -->|"uses node API"| node_node
node_node -->|"types messages"| node_messages
node_node -->|"publishes and subscribes"| node_channels
node_channels -->|"dispatches messages"| node_dispatch
node_dispatch -->|"uses shared memory"| node_shm
node_dispatch -->|"uses RTPS"| node_rtps
node_discovery -->|"creates participant"| node_rtps
node_discovery -->|"updates topology"| node_graph
node_channels -->|"registers endpoints"| node_discovery
node_components -->|"runs scheduled work"| node_scheduler
node_tasks -->|"creates tasks"| node_scheduler
node_node -->|"offers service API"| node_services
node_node -->|"uses parameters"| node_parameters
node_recorduser -->|"records or plays"| node_recorder
node_recorder -->|"reads and writes"| node_recordio
node_channeltools -->|"inspects channels"| node_discovery
node_inspection -->|"inspects topology"| node_discovery
node_monitor -->|"monitors topology"| node_discovery
node_python -->|"exposes runtime"| node_node
node_rosnetwork -.->|"exchanges messages"| node_ros
node_ros -.->|"bridges messages"| node_channels

click node_mainboard "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/mainboard/mainboard.cc"
click node_controller "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/mainboard/module_controller.cc"
click node_components "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/component/component_base.h"
click node_node "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/node/node.h"
click node_messages "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/message/message_traits.h"
click node_channels "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/transport/transport.h"
click node_dispatch "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/transport/dispatcher/dispatcher.h"
click node_shm "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/transport/shm/segment.h"
click node_rtps "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/transport/rtps/participant.h"
click node_discovery "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/service_discovery/topology_manager.cc"
click node_graph "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/service_discovery/container/graph.h"
click node_scheduler "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/scheduler/scheduler.h"
click node_tasks "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/task/task_manager.cc"
click node_parameters "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/parameter/parameter_server.cc"
click node_services "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/service/service.h"
click node_recorder "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/tools/cyber_recorder/recorder.cc"
click node_recordio "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/record/record_writer.cc"
click node_channeltools "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/tools/cyber_channel/cyber_channel.py"
click node_inspection "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/tools/cyber_node/cyber_node.py"
click node_monitor "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/tools/cyber_monitor/main.cc"
click node_python "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/python/cyber_py3/cyber.py"
click node_ros "https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/ros_bridge/ros_bridge.cc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mainboard,node_controller,node_components,node_node,node_messages toneBlue
class node_channels,node_dispatch,node_shm,node_rtps,node_discovery,node_graph toneAmber
class node_scheduler,node_tasks,node_parameters,node_services toneMint
class node_recorder,node_recordio toneRose
class node_channeltools,node_inspection,node_monitor,node_python,node_ros,node_user,node_rosnetwork,node_recorduser toneIndigo
```

## Components

### Application Runtime

- [Mainboard](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/mainboard/mainboard.cc): `cyber/mainboard/mainboard.cc`
- [Module controller](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/mainboard/module_controller.cc): `cyber/mainboard/module_controller.cc`
- [Components](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/component/component_base.h): `cyber/component/component_base.h`
- [Node API](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/node/node.h): `cyber/node/node.h`
- [Message types](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/message/message_traits.h): `cyber/message/message_traits.h`

### Communication

- [Channel transport](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/transport/transport.h): `cyber/transport/transport.h`
- [Message dispatch](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/transport/dispatcher/dispatcher.h): `cyber/transport/dispatcher/dispatcher.h`
- [Shared memory](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/transport/shm/segment.h): `cyber/transport/shm/segment.h`
- [RTPS transport](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/transport/rtps/participant.h): `cyber/transport/rtps/participant.h`
- [Service discovery](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/service_discovery/topology_manager.cc): `cyber/service_discovery/topology_manager.cc`
- [Topology graph](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/service_discovery/container/graph.h): `cyber/service_discovery/container/graph.h`

### Execution and State

- [Scheduler](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/scheduler/scheduler.h): `cyber/scheduler/scheduler.h`
- [Task manager](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/task/task_manager.cc): `cyber/task/task_manager.cc`
- [Parameters](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/parameter/parameter_server.cc): `cyber/parameter/parameter_server.cc`
- [Service API](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/service/service.h): `cyber/service/service.h`

### Recording

- [Recorder and player](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/tools/cyber_recorder/recorder.cc): `cyber/tools/cyber_recorder/recorder.cc`
- [Record file I/O](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/record/record_writer.cc): `cyber/record/record_writer.cc`

### Tools and Integrations

- [Channel tools](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/tools/cyber_channel/cyber_channel.py): `cyber/tools/cyber_channel/cyber_channel.py`
- [Node and service tools](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/tools/cyber_node/cyber_node.py): `cyber/tools/cyber_node/cyber_node.py`
- [Monitor](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/tools/cyber_monitor/main.cc): `cyber/tools/cyber_monitor/main.cc`
- [Python bindings](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/python/cyber_py3/cyber.py): `cyber/python/cyber_py3/cyber.py`
- [ROS bridge](https://github.com/minhanghuang/cyberrt/blob/v10.0.0/cyber/ros_bridge/ros_bridge.cc): `cyber/ros_bridge/ros_bridge.cc`

### Other components

- **Application developer**
- **ROS network**
- **Record operator**

## Connections

- Application developer → Mainboard: starts runtime
- Mainboard → Module controller: loads modules
- Module controller → Components: initializes
- Components → Node API: uses node API
- Node API → Message types: types messages
- Node API → Channel transport: publishes and subscribes
- Channel transport → Message dispatch: dispatches messages
- Message dispatch → Shared memory: uses shared memory
- Message dispatch → RTPS transport: uses RTPS
- Service discovery → RTPS transport: creates participant
- Service discovery → Topology graph: updates topology
- Channel transport → Service discovery: registers endpoints
- Components → Scheduler: runs scheduled work
- Task manager → Scheduler: creates tasks
- Node API → Service API: offers service API
- Node API → Parameters: uses parameters
- Record operator → Recorder and player: records or plays
- Recorder and player → Record file I/O: reads and writes
- Channel tools → Service discovery: inspects channels
- Node and service tools → Service discovery: inspects topology
- Monitor → Service discovery: monitors topology
- Python bindings → Node API: exposes runtime
- ROS network → ROS bridge: exchanges messages
- ROS bridge → Channel transport: bridges messages
