# romanslack/jev-drone architecture

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

- Interactive diagram: https://gitdiagram.com/romanslack/jev-drone
- Repository: https://github.com/romanslack/jev-drone

## Overview

jev-drone is a MuJoCo autonomous-drone simulation, with two navigation modes: the main rover-following course, where classical perception and flight control are paired with advisory Jev judgments and a code-owned safety reflex, and a tunnel experiment where Jev is the sole obstacle navigator. The main workflow is launch, observe camera-derived scene data, request/cache tactical judgments, apply guidance and safety, then fly and optionally record telemetry for replay. The repository also includes a public article site. Tunnel wiring is shown only where the sampled source index or excerpts support it; unsampled internals are not inferred.

Main entry points: [`run.py`](https://github.com/romanslack/jev-drone/blob/main/run.py) (Course Episode), [`tunnel.py`](https://github.com/romanslack/jev-drone/blob/main/tunnel.py) (Tunnel Runner), [`flight.py`](https://github.com/romanslack/jev-drone/blob/main/flight.py) (Camera Scene), [`hud.py`](https://github.com/romanslack/jev-drone/blob/main/hud.py) (Telemetry HUD)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mainflight["Course Flight"]
  node_episode["Course Episode<br/>[run.py]"]
  node_guidance["Guidance Reflex<br/>[run.py]"]
  node_pilot["Geometric Pilot<br/>[flight.py]"]
  node_camera["Camera Scene<br/>[flight.py]"]
  node_course["Course Arena<br/>[world.xml]"]
end

subgraph group_tactical["Tactical Judgment"]
  node_tactician["Course Tactician<br/>[tactics.py]"]
  node_jev{{"Jev API"}}
end

subgraph group_tunnel["Tunnel Experiment"]
  node_tunnel_runner["Tunnel Runner<br/>[tunnel.py]"]
  node_tunnel_nav["Tunnel Navigation<br/>[tunnel.py]"]
  node_fast_tactician["Fast Tactician<br/>[tunnel_tactics.py]"]
end

subgraph group_replay["Telemetry Replay"]
  node_overlay["Telemetry HUD<br/>[hud.py]"]
  node_course_replay["Course Replay<br/>[replay.py]"]
  node_tunnel_replay["Tunnel Replay<br/>[replay_tunnel.py]"]
end

subgraph group_website["Project Website"]
  node_article["Project Article<br/>[page.tsx]"]
  node_site_layout["Site Layout<br/>[layout.tsx]"]
  node_site_figures["Article Figures<br/>[figures.tsx]"]
  node_site_toc["Article Contents<br/>[toc.tsx]"]
  node_site_settings["Site Metadata<br/>[lib.ts]"]
end

node_operator(("Operator"))

node_operator -->|"launches"| node_episode
node_episode -->|"observes"| node_camera
node_episode -->|"runs guidance"| node_guidance
node_guidance -->|"commands"| node_pilot
node_guidance -->|"offers scenes"| node_tactician
node_tactician -->|"requests judgments"| node_jev
node_episode -->|"renders telemetry"| node_overlay
node_episode -->|"simulates course"| node_course
node_course_replay -->|"reuses renderer"| node_camera
node_course_replay -->|"draws overlay"| node_overlay
node_tunnel_runner -->|"offers scenes"| node_fast_tactician
node_tunnel_runner -.->|"uses navigation"| node_tunnel_nav
node_tunnel_runner -->|"uses perception"| node_camera
node_tunnel_runner -->|"renders telemetry"| node_overlay
node_fast_tactician -.->|"requests judgments"| node_jev
node_tunnel_replay -->|"reuses renderer"| node_camera
node_tunnel_replay -->|"draws overlay"| node_overlay
node_article -->|"renders figures"| node_site_figures
node_article -->|"renders contents"| node_site_toc
node_site_layout -->|"loads metadata"| node_site_settings
node_site_layout -.->|"wraps page"| node_article

click node_episode "https://github.com/romanslack/jev-drone/blob/main/run.py"
click node_guidance "https://github.com/romanslack/jev-drone/blob/main/run.py"
click node_pilot "https://github.com/romanslack/jev-drone/blob/main/flight.py"
click node_camera "https://github.com/romanslack/jev-drone/blob/main/flight.py"
click node_course "https://github.com/romanslack/jev-drone/blob/main/world.xml"
click node_tactician "https://github.com/romanslack/jev-drone/blob/main/tactics.py"
click node_overlay "https://github.com/romanslack/jev-drone/blob/main/hud.py"
click node_course_replay "https://github.com/romanslack/jev-drone/blob/main/replay.py"
click node_tunnel_runner "https://github.com/romanslack/jev-drone/blob/main/tunnel.py"
click node_tunnel_nav "https://github.com/romanslack/jev-drone/blob/main/tunnel.py"
click node_fast_tactician "https://github.com/romanslack/jev-drone/blob/main/tunnel_tactics.py"
click node_tunnel_replay "https://github.com/romanslack/jev-drone/blob/main/replay_tunnel.py"
click node_article "https://github.com/romanslack/jev-drone/blob/main/site/app/page.tsx"
click node_site_layout "https://github.com/romanslack/jev-drone/blob/main/site/app/layout.tsx"
click node_site_figures "https://github.com/romanslack/jev-drone/blob/main/site/components/figures.tsx"
click node_site_toc "https://github.com/romanslack/jev-drone/blob/main/site/components/toc.tsx"
click node_site_settings "https://github.com/romanslack/jev-drone/blob/main/site/lib.ts"

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_episode,node_guidance,node_pilot,node_camera,node_course toneBlue
class node_tactician,node_jev toneAmber
class node_tunnel_runner,node_tunnel_nav,node_fast_tactician toneMint
class node_overlay,node_course_replay,node_tunnel_replay toneRose
class node_article,node_site_layout,node_site_figures,node_site_toc,node_site_settings,node_operator toneIndigo
```

## Components

### Course Flight

- [Course Episode](https://github.com/romanslack/jev-drone/blob/main/run.py): `run.py`
- [Guidance Reflex](https://github.com/romanslack/jev-drone/blob/main/run.py): `run.py`
- [Geometric Pilot](https://github.com/romanslack/jev-drone/blob/main/flight.py): `flight.py`
- [Camera Scene](https://github.com/romanslack/jev-drone/blob/main/flight.py): `flight.py`
- [Course Arena](https://github.com/romanslack/jev-drone/blob/main/world.xml): `world.xml`

### Tactical Judgment

- [Course Tactician](https://github.com/romanslack/jev-drone/blob/main/tactics.py): `tactics.py`
- **Jev API**

### Tunnel Experiment

- [Tunnel Runner](https://github.com/romanslack/jev-drone/blob/main/tunnel.py): `tunnel.py`
- [Tunnel Navigation](https://github.com/romanslack/jev-drone/blob/main/tunnel.py): `tunnel.py`
- [Fast Tactician](https://github.com/romanslack/jev-drone/blob/main/tunnel_tactics.py): `tunnel_tactics.py`

### Telemetry Replay

- [Telemetry HUD](https://github.com/romanslack/jev-drone/blob/main/hud.py): `hud.py`
- [Course Replay](https://github.com/romanslack/jev-drone/blob/main/replay.py): `replay.py`
- [Tunnel Replay](https://github.com/romanslack/jev-drone/blob/main/replay_tunnel.py): `replay_tunnel.py`

### Project Website

- [Project Article](https://github.com/romanslack/jev-drone/blob/main/site/app/page.tsx): `site/app/page.tsx`
- [Site Layout](https://github.com/romanslack/jev-drone/blob/main/site/app/layout.tsx): `site/app/layout.tsx`
- [Article Figures](https://github.com/romanslack/jev-drone/blob/main/site/components/figures.tsx): `site/components/figures.tsx`
- [Article Contents](https://github.com/romanslack/jev-drone/blob/main/site/components/toc.tsx): `site/components/toc.tsx`
- [Site Metadata](https://github.com/romanslack/jev-drone/blob/main/site/lib.ts): `site/lib.ts`

### Other components

- **Operator**

## Connections

- Operator → Course Episode: launches (evidence: `README.md`)
- Course Episode → Camera Scene: observes (evidence: `run.py`)
- Course Episode → Guidance Reflex: runs guidance (evidence: `run.py`)
- Guidance Reflex → Geometric Pilot: commands (evidence: `README.md`)
- Guidance Reflex → Course Tactician: offers scenes (evidence: `run.py`)
- Course Tactician → Jev API: requests judgments (evidence: `tactics.py`)
- Course Episode → Telemetry HUD: renders telemetry (evidence: `run.py`)
- Course Episode → Course Arena: simulates course (evidence: `README.md`)
- Course Replay → Camera Scene: reuses renderer (evidence: `replay.py`)
- Course Replay → Telemetry HUD: draws overlay (evidence: `replay.py`)
- Tunnel Runner → Fast Tactician: offers scenes (evidence: `tunnel.py`)
- Tunnel Runner → Tunnel Navigation: uses navigation (evidence: `tunnel.py`)
- Tunnel Runner → Camera Scene: uses perception (evidence: `tunnel.py`)
- Tunnel Runner → Telemetry HUD: renders telemetry (evidence: `tunnel.py`)
- Fast Tactician → Jev API: requests judgments
- Tunnel Replay → Camera Scene: reuses renderer (evidence: `replay_tunnel.py`)
- Tunnel Replay → Telemetry HUD: draws overlay (evidence: `replay_tunnel.py`)
- Project Article → Article Figures: renders figures (evidence: `site/app/page.tsx`)
- Project Article → Article Contents: renders contents (evidence: `site/app/page.tsx`)
- Site Layout → Site Metadata: loads metadata (evidence: `site/app/layout.tsx`)
- Site Layout → Project Article: wraps page
