# utahrobotics/utah-lunabotics-2026 architecture

> Architecture diagram of the GitHub repository utahrobotics/utah-lunabotics-2026, 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/utahrobotics/utah-lunabotics-2026
- Repository: https://github.com/utahrobotics/utah-lunabotics-2026

## Overview

Lunabot is a robotics system whose production runtime coordinates sensing, state estimation, autonomy, and motor control; it also supports simulation and log replay. The README identifies a Copper task configuration as the source of task and datatype wiring, but that configuration is not in the supplied tree, so the graph avoids asserting detailed task-to-task connections. Runtime entry-point and component roles are based on the sampled source and repository paths.

Main entry points: [`lunabot-cu/src/tasks/sinks/motor_controller.rs`](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/sinks/motor_controller.rs) (Motor controller), [`lunabot-cu/src/main.rs`](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/main.rs) (Copper application), [`lunabot-cu/src/tasks/ai/behaviors/autonomy/autonomy_main.rs`](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/ai/behaviors/autonomy/autonomy_main.rs) (Autonomous navigation), [`lunabot-cu/src/tasks/ai/behaviors/teleop.rs`](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/ai/behaviors/teleop.rs) (Teleoperation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and data"]
  node_copper_app["Copper application<br/>[main.rs]"]
  node_task_graph["Task components"]
  node_payloads["Task payloads"]
  node_realsense_process["RealSense publisher<br/>[main.rs]"]
end

subgraph group_perception["Sensing and state"]
  node_localization["Localization<br/>[localizer.rs]"]
  node_state_estimation["State estimation"]
  node_occupancy["Obstacle mapping"]
  node_camera_capture["Camera capture"]
end

subgraph group_planning["Control and autonomy"]
  node_ai["AI behavior<br/>[lunabot_ai.rs]"]
  node_teleop["Teleoperation<br/>[teleop.rs]"]
  node_autonomy["Autonomous navigation<br/>[autonomy_main.rs]"]
  node_pathfinding["Pathfinding"]
end

subgraph group_hardware["Hardware interface"]
  node_motor_sink["Motor controller"]
  node_pico["Pico firmware<br/>[pico-prime.rs]"]
end

subgraph group_operations["Observability"]
  node_log[("Runtime log<br/>[main.rs]")]
  node_rerun["Rerun visualization<br/>[rerun_viz.rs]"]
  node_replay["Log replay<br/>[resim.rs]"]
end

node_operator(("Operator"))
node_environment(("Robot environment"))
node_robot_sensors(("Robot sensors"))
node_motors(("Motor hardware"))

node_operator -->|"issues commands"| node_teleop
node_environment -->|"produces measurements"| node_robot_sensors
node_robot_sensors -->|"supplies sensor data"| node_task_graph
node_copper_app -->|"runs configured tasks"| node_task_graph
node_copper_app -->|"launches process"| node_realsense_process
node_realsense_process -->|"publishes camera data"| node_camera_capture
node_camera_capture -->|"provides frames"| node_occupancy
node_localization -->|"provides localization input"| node_state_estimation
node_ai -->|"selects behavior"| node_teleop
node_ai -->|"selects behavior"| node_autonomy
node_autonomy -->|"requests routes"| node_pathfinding
node_teleop -->|"supplies steering"| node_motor_sink
node_autonomy -->|"supplies steering"| node_motor_sink
node_motor_sink -->|"commands motors"| node_motors
node_pico -.->|"drives actuators"| node_motors
node_copper_app -->|"initializes logging"| node_log
node_motor_sink -->|"logs telemetry"| node_rerun
node_log -->|"replays records"| node_replay

click node_copper_app "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/main.rs"
click node_task_graph "https://github.com/utahrobotics/utah-lunabotics-2026/tree/main/lunabot-cu/src/tasks"
click node_payloads "https://github.com/utahrobotics/utah-lunabotics-2026/tree/main/lunabot-cu/src/payloads"
click node_realsense_process "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/external-tasks/realsense/src/main.rs"
click node_ai "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/ai/lunabot_ai.rs"
click node_teleop "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/ai/behaviors/teleop.rs"
click node_autonomy "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/ai/behaviors/autonomy/autonomy_main.rs"
click node_pathfinding "https://github.com/utahrobotics/utah-lunabotics-2026/tree/main/lunabot-cu/src/pathfinding"
click node_localization "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/localizer.rs"
click node_state_estimation "https://github.com/utahrobotics/utah-lunabotics-2026/tree/main/lunabot-cu/src/kalman_filtering"
click node_occupancy "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/realsense_occupancy_grid.rs"
click node_camera_capture "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/sources/realsense_subscriber.rs"
click node_motor_sink "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/sinks/motor_controller.rs"
click node_pico "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/embedded/src/bin/pico-prime.rs"
click node_log "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/main.rs"
click node_rerun "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/rerun_viz.rs"
click node_replay "https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/resim.rs"

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_copper_app,node_task_graph,node_payloads,node_realsense_process toneBlue
class node_localization,node_state_estimation,node_occupancy,node_camera_capture toneAmber
class node_ai,node_teleop,node_autonomy,node_pathfinding toneMint
class node_motor_sink,node_pico toneRose
class node_log,node_rerun,node_replay,node_operator,node_environment,node_robot_sensors,node_motors toneIndigo
```

## Components

### Runtime and data

- [Copper application](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/main.rs): `lunabot-cu/src/main.rs`
- [Task components](https://github.com/utahrobotics/utah-lunabotics-2026/tree/main/lunabot-cu/src/tasks): `lunabot-cu/src/tasks`
- [Task payloads](https://github.com/utahrobotics/utah-lunabotics-2026/tree/main/lunabot-cu/src/payloads): `lunabot-cu/src/payloads`
- [RealSense publisher](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/external-tasks/realsense/src/main.rs): `external-tasks/realsense/src/main.rs`

### Sensing and state

- [Localization](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/localizer.rs): `lunabot-cu/src/tasks/localizer.rs`
- [State estimation](https://github.com/utahrobotics/utah-lunabotics-2026/tree/main/lunabot-cu/src/kalman_filtering): `lunabot-cu/src/kalman_filtering`
- [Obstacle mapping](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/realsense_occupancy_grid.rs): `lunabot-cu/src/tasks/realsense_occupancy_grid.rs`
- [Camera capture](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/sources/realsense_subscriber.rs): `lunabot-cu/src/tasks/sources/realsense_subscriber.rs`

### Control and autonomy

- [AI behavior](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/ai/lunabot_ai.rs): `lunabot-cu/src/tasks/ai/lunabot_ai.rs`
- [Teleoperation](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/ai/behaviors/teleop.rs): `lunabot-cu/src/tasks/ai/behaviors/teleop.rs`
- [Autonomous navigation](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/ai/behaviors/autonomy/autonomy_main.rs): `lunabot-cu/src/tasks/ai/behaviors/autonomy/autonomy_main.rs`
- [Pathfinding](https://github.com/utahrobotics/utah-lunabotics-2026/tree/main/lunabot-cu/src/pathfinding): `lunabot-cu/src/pathfinding`

### Hardware interface

- [Motor controller](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/tasks/sinks/motor_controller.rs): `lunabot-cu/src/tasks/sinks/motor_controller.rs`
- [Pico firmware](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/embedded/src/bin/pico-prime.rs): `embedded/src/bin/pico-prime.rs`

### Observability

- [Runtime log](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/main.rs): `lunabot-cu/src/main.rs`
- [Rerun visualization](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/rerun_viz.rs): `lunabot-cu/src/rerun_viz.rs`
- [Log replay](https://github.com/utahrobotics/utah-lunabotics-2026/blob/main/lunabot-cu/src/resim.rs): `lunabot-cu/src/resim.rs`

### Other components

- **Operator**
- **Robot environment**
- **Robot sensors**
- **Motor hardware**

## Connections

- Operator → Teleoperation: issues commands
- Robot environment → Robot sensors: produces measurements
- Robot sensors → Task components: supplies sensor data
- Copper application → Task components: runs configured tasks
- Copper application → RealSense publisher: launches process
- RealSense publisher → Camera capture: publishes camera data
- Camera capture → Obstacle mapping: provides frames
- Localization → State estimation: provides localization input
- AI behavior → Teleoperation: selects behavior
- AI behavior → Autonomous navigation: selects behavior
- Autonomous navigation → Pathfinding: requests routes
- Teleoperation → Motor controller: supplies steering
- Autonomous navigation → Motor controller: supplies steering
- Motor controller → Motor hardware: commands motors
- Pico firmware → Motor hardware: drives actuators
- Copper application → Runtime log: initializes logging
- Motor controller → Rerun visualization: logs telemetry
- Runtime log → Log replay: replays records
