# cunuduh/hurricane-template architecture

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

- Interactive diagram: https://gitdiagram.com/cunuduh/hurricane-template
- Repository: https://github.com/cunuduh/hurricane-template

## Overview

Hurricanes is VEX V5 robot-control software. Its user-facing workflow selects an autonomous routine in the on-robot UI, loads and runs the routine’s actions, and drives the robot through chassis control; operators can also control the robot directly. The repository separates route/routine handling, action execution, motion control, and localization. Source excerpts support the main calls and data flow, but omit some wiring in the robot entry point and UI, so uncertain connections are left out.

Main entry points: [`src/chassis.rs`](https://github.com/cunuduh/hurricane-template/blob/main/src/chassis.rs) (Chassis control), [`src/main.rs`](https://github.com/cunuduh/hurricane-template/blob/main/src/main.rs) (Robot entry point), [`src/plan.rs`](https://github.com/cunuduh/hurricane-template/blob/main/src/plan.rs) (Action executor), [`src/autonomous.rs`](https://github.com/cunuduh/hurricane-template/blob/main/src/autonomous.rs) (Autonomous motion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_selection["Selection and routines"]
  node_main["Robot entry point<br/>[main.rs]"]
  node_ui["Route selector UI<br/>[ui.slint]"]
  node_routines["Routine loader<br/>[mod.rs]"]
  node_routine_files["Autonomous routines"]
end

subgraph group_execution["Autonomous execution"]
  node_plan["Action executor<br/>[plan.rs]"]
  node_triggers["Action triggers<br/>[triggers.rs]"]
end

subgraph group_control["Motion and control"]
  node_chassis["Chassis control<br/>[chassis.rs]"]
  node_driver["Driver controls<br/>[driver_control.rs]"]
  node_autonomous["Autonomous motion<br/>[autonomous.rs]"]
  node_motion_profile["Motion profiles<br/>[motion_profile.rs]"]
  node_path["Path interpolation<br/>[path.rs]"]
  node_pid["PID controller<br/>[pid.rs]"]
end

subgraph group_localization["Localization"]
  node_odometry["Odometry<br/>[odometry.rs]"]
  node_mcl["Particle localization<br/>[mcl.rs]"]
  node_pose[("Pose and motion state<br/>[odometry.rs]")]
end

node_operator(("Robot operator"))
node_robot_hw["VEX V5 hardware"]

node_operator -->|"selects route"| node_ui
node_main -->|"creates UI"| node_ui
node_ui -->|"reports selection"| node_main
node_main -->|"lists routines"| node_routines
node_routine_files -->|"provides routine data"| node_routines
node_routines -->|"returns actions"| node_plan
node_main -->|"runs actions"| node_plan
node_plan -->|"issues motion commands"| node_chassis
node_plan -->|"arms triggers"| node_triggers
node_triggers -->|"applies trigger actions"| node_chassis
node_main -->|"runs driver control"| node_driver
node_driver -->|"sets drive and intake"| node_chassis
node_chassis -->|"delegates motion"| node_autonomous
node_autonomous -->|"uses profiles"| node_motion_profile
node_motion_profile -->|"interpolates paths"| node_path
node_autonomous -->|"computes feedback"| node_pid
node_chassis -->|"updates pose"| node_odometry
node_chassis -->|"updates localization"| node_mcl
node_mcl -->|"estimates pose"| node_pose
node_odometry -->|"tracks pose"| node_pose
node_robot_hw -->|"provides sensor readings"| node_chassis
node_chassis -->|"commands actuators"| node_robot_hw

click node_main "https://github.com/cunuduh/hurricane-template/blob/main/src/main.rs"
click node_ui "https://github.com/cunuduh/hurricane-template/blob/main/src/ui/ui.slint"
click node_routines "https://github.com/cunuduh/hurricane-template/blob/main/src/routines/mod.rs"
click node_routine_files "https://github.com/cunuduh/hurricane-template/tree/main/src/routines"
click node_plan "https://github.com/cunuduh/hurricane-template/blob/main/src/plan.rs"
click node_triggers "https://github.com/cunuduh/hurricane-template/blob/main/src/triggers.rs"
click node_chassis "https://github.com/cunuduh/hurricane-template/blob/main/src/chassis.rs"
click node_driver "https://github.com/cunuduh/hurricane-template/blob/main/src/driver_control.rs"
click node_autonomous "https://github.com/cunuduh/hurricane-template/blob/main/src/autonomous.rs"
click node_motion_profile "https://github.com/cunuduh/hurricane-template/blob/main/src/motion_profile.rs"
click node_path "https://github.com/cunuduh/hurricane-template/blob/main/src/utils/path.rs"
click node_pid "https://github.com/cunuduh/hurricane-template/blob/main/src/pid.rs"
click node_odometry "https://github.com/cunuduh/hurricane-template/blob/main/src/odometry.rs"
click node_mcl "https://github.com/cunuduh/hurricane-template/blob/main/src/mcl.rs"
click node_pose "https://github.com/cunuduh/hurricane-template/blob/main/src/odometry.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_main,node_ui,node_routines,node_routine_files toneBlue
class node_plan,node_triggers toneAmber
class node_chassis,node_driver,node_autonomous,node_motion_profile,node_path,node_pid toneMint
class node_odometry,node_mcl,node_pose toneRose
class node_operator,node_robot_hw toneIndigo
```

## Components

### Selection and routines

- [Robot entry point](https://github.com/cunuduh/hurricane-template/blob/main/src/main.rs): `src/main.rs`
- [Route selector UI](https://github.com/cunuduh/hurricane-template/blob/main/src/ui/ui.slint): `src/ui/ui.slint`
- [Routine loader](https://github.com/cunuduh/hurricane-template/blob/main/src/routines/mod.rs): `src/routines/mod.rs`
- [Autonomous routines](https://github.com/cunuduh/hurricane-template/tree/main/src/routines): `src/routines`

### Autonomous execution

- [Action executor](https://github.com/cunuduh/hurricane-template/blob/main/src/plan.rs): `src/plan.rs`
- [Action triggers](https://github.com/cunuduh/hurricane-template/blob/main/src/triggers.rs): `src/triggers.rs`

### Motion and control

- [Chassis control](https://github.com/cunuduh/hurricane-template/blob/main/src/chassis.rs): `src/chassis.rs`
- [Driver controls](https://github.com/cunuduh/hurricane-template/blob/main/src/driver_control.rs): `src/driver_control.rs`
- [Autonomous motion](https://github.com/cunuduh/hurricane-template/blob/main/src/autonomous.rs): `src/autonomous.rs`
- [Motion profiles](https://github.com/cunuduh/hurricane-template/blob/main/src/motion_profile.rs): `src/motion_profile.rs`
- [Path interpolation](https://github.com/cunuduh/hurricane-template/blob/main/src/utils/path.rs): `src/utils/path.rs`
- [PID controller](https://github.com/cunuduh/hurricane-template/blob/main/src/pid.rs): `src/pid.rs`

### Localization

- [Odometry](https://github.com/cunuduh/hurricane-template/blob/main/src/odometry.rs): `src/odometry.rs`
- [Particle localization](https://github.com/cunuduh/hurricane-template/blob/main/src/mcl.rs): `src/mcl.rs`
- [Pose and motion state](https://github.com/cunuduh/hurricane-template/blob/main/src/odometry.rs): `src/odometry.rs`

### Other components

- **Robot operator**
- **VEX V5 hardware**

## Connections

- Robot operator → Route selector UI: selects route
- Robot entry point → Route selector UI: creates UI
- Route selector UI → Robot entry point: reports selection
- Robot entry point → Routine loader: lists routines
- Autonomous routines → Routine loader: provides routine data
- Routine loader → Action executor: returns actions
- Robot entry point → Action executor: runs actions
- Action executor → Chassis control: issues motion commands
- Action executor → Action triggers: arms triggers
- Action triggers → Chassis control: applies trigger actions
- Robot entry point → Driver controls: runs driver control
- Driver controls → Chassis control: sets drive and intake
- Chassis control → Autonomous motion: delegates motion
- Autonomous motion → Motion profiles: uses profiles
- Motion profiles → Path interpolation: interpolates paths
- Autonomous motion → PID controller: computes feedback
- Chassis control → Odometry: updates pose
- Chassis control → Particle localization: updates localization
- Particle localization → Pose and motion state: estimates pose
- Odometry → Pose and motion state: tracks pose
- VEX V5 hardware → Chassis control: provides sensor readings
- Chassis control → VEX V5 hardware: commands actuators
