# ivan-smit/aux-robot-4x4 architecture

> Architecture diagram of the GitHub repository ivan-smit/aux-robot-4x4, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ivan-smit/aux-robot-4x4
- Repository: https://github.com/ivan-smit/aux-robot-4x4

## Overview

AUX-ROBOT-4x4 combines a browser control panel, a Python proxy/planner, and ESP32 motor firmware. The main workflow is to connect the launcher to the robot’s Wi-Fi, send manual commands or draw a route, then use camera-derived marker pose to guide Turn-and-Go movement and report status to the UI. README-described capabilities include live controller tuning, detection-zone filtering, trajectory plots, and one-click launch. Some README features are represented at subsystem level because their implementation was not sampled; edges are limited to explicit README or source evidence.

Main entry points: [`client/proxy.py`](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/proxy.py) (WebSocket / TCP proxy), [`client/static/js/main.js`](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/static/js/main.js) (UI controls), [`client/planner.py`](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/planner.py) (Trajectory tracker), [`client/visual_odometry.py`](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/visual_odometry.py) (Visual odometry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launch"]
  node_launcher["Launcher<br/>[launcher.py]"]
end

subgraph group_interface["Control interface"]
  node_panel["Browser panel<br/>[index.html]"]
  node_ui["UI controls<br/>[main.js]"]
  node_proxy["WebSocket / TCP proxy<br/>[proxy.py]"]
  node_trajectory["Route drawing and plots<br/>[main.js]"]
end

subgraph group_autonomy["Autonomous navigation"]
  node_config["Robot configuration<br/>[config.py]"]
  node_odometry["Visual odometry<br/>[visual_odometry.py]"]
  node_marker["Marker detection<br/>[visual_odometry.py]"]
  node_planner["Trajectory tracker<br/>[planner.py]"]
  node_graphs[("Trajectory images")]
end

subgraph group_robot["Robot runtime"]
  node_esp32["ESP32 firmware<br/>[bobr4x4.c]"]
  node_motors["Motor drivers<br/>[bobr4x4.c]"]
  node_robot_wifi["Robot Wi-Fi AP<br/>[bobr4x4.c]"]
end

node_operator(("Operator"))
node_camera["Camera"]

node_operator -->|"starts"| node_launcher
node_launcher -->|"starts process"| node_proxy
node_operator -->|"uses"| node_panel
node_panel -->|"loads"| node_ui
node_ui -->|"sends commands"| node_proxy
node_proxy -->|"sends TCP commands"| node_esp32
node_esp32 -->|"hosts"| node_robot_wifi
node_operator -->|"draws route"| node_trajectory
node_trajectory -.->|"sends route"| node_ui
node_proxy -->|"starts capture"| node_odometry
node_camera -->|"provides frames"| node_odometry
node_odometry -->|"detects marker"| node_marker
node_proxy -->|"starts tracker"| node_planner
node_proxy -->|"updates pose"| node_planner
node_planner -->|"sends motor commands"| node_esp32
node_esp32 -->|"applies PWM"| node_motors
node_config -->|"configures"| node_planner
node_config -->|"configures"| node_odometry
node_planner -->|"broadcasts telemetry"| node_proxy
node_proxy -.->|"sends telemetry"| node_ui
node_ui -->|"saves trajectory PNG"| node_graphs
node_proxy -->|"starts debug view"| node_odometry

click node_launcher "https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/launcher.py"
click node_panel "https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/static/index.html"
click node_ui "https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/static/js/main.js"
click node_proxy "https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/proxy.py"
click node_config "https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/config.py"
click node_odometry "https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/visual_odometry.py"
click node_marker "https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/visual_odometry.py"
click node_planner "https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/planner.py"
click node_trajectory "https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/static/js/main.js"
click node_esp32 "https://github.com/ivan-smit/aux-robot-4x4/blob/main/src/bobr4x4.c"
click node_motors "https://github.com/ivan-smit/aux-robot-4x4/blob/main/src/bobr4x4.c"
click node_robot_wifi "https://github.com/ivan-smit/aux-robot-4x4/blob/main/src/bobr4x4.c"
click node_graphs "https://github.com/ivan-smit/aux-robot-4x4/tree/main/client/graphs"

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_launcher toneBlue
class node_panel,node_ui,node_proxy,node_trajectory toneAmber
class node_config,node_odometry,node_marker,node_planner,node_graphs toneMint
class node_esp32,node_motors,node_robot_wifi toneRose
class node_operator,node_camera toneIndigo
```

## Components

### Launch

- [Launcher](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/launcher.py): `client/launcher.py`

### Control interface

- [Browser panel](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/static/index.html): `client/static/index.html`
- [UI controls](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/static/js/main.js): `client/static/js/main.js`
- [WebSocket / TCP proxy](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/proxy.py): `client/proxy.py`
- [Route drawing and plots](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/static/js/main.js): `client/static/js/main.js`

### Autonomous navigation

- [Robot configuration](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/config.py): `client/config.py`
- [Visual odometry](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/visual_odometry.py): `client/visual_odometry.py`
- [Marker detection](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/visual_odometry.py): `client/visual_odometry.py`
- [Trajectory tracker](https://github.com/ivan-smit/aux-robot-4x4/blob/main/client/planner.py): `client/planner.py`
- [Trajectory images](https://github.com/ivan-smit/aux-robot-4x4/tree/main/client/graphs): `client/graphs`

### Robot runtime

- [ESP32 firmware](https://github.com/ivan-smit/aux-robot-4x4/blob/main/src/bobr4x4.c): `src/bobr4x4.c`
- [Motor drivers](https://github.com/ivan-smit/aux-robot-4x4/blob/main/src/bobr4x4.c): `src/bobr4x4.c`
- [Robot Wi-Fi AP](https://github.com/ivan-smit/aux-robot-4x4/blob/main/src/bobr4x4.c): `src/bobr4x4.c`

### Other components

- **Operator**
- **Camera**

## Connections

- Operator → Launcher: starts (evidence: `README.md`)
- Launcher → WebSocket / TCP proxy: starts process (evidence: `client/launcher.py`)
- Operator → Browser panel: uses (evidence: `README.md`)
- Browser panel → UI controls: loads
- UI controls → WebSocket / TCP proxy: sends commands (evidence: `client/static/js/main.js`)
- WebSocket / TCP proxy → ESP32 firmware: sends TCP commands (evidence: `client/proxy.py`)
- ESP32 firmware → Robot Wi-Fi AP: hosts (evidence: `src/bobr4x4.c`)
- Operator → Route drawing and plots: draws route (evidence: `README.md`)
- Route drawing and plots → UI controls: sends route (evidence: `client/static/js/main.js`)
- WebSocket / TCP proxy → Visual odometry: starts capture (evidence: `client/proxy.py`)
- Camera → Visual odometry: provides frames (evidence: `client/visual_odometry.py`)
- Visual odometry → Marker detection: detects marker (evidence: `client/visual_odometry.py`)
- WebSocket / TCP proxy → Trajectory tracker: starts tracker (evidence: `client/proxy.py`)
- WebSocket / TCP proxy → Trajectory tracker: updates pose (evidence: `client/proxy.py`)
- Trajectory tracker → ESP32 firmware: sends motor commands (evidence: `client/planner.py`)
- ESP32 firmware → Motor drivers: applies PWM (evidence: `src/bobr4x4.c`)
- Robot configuration → Trajectory tracker: configures (evidence: `client/planner.py`)
- Robot configuration → Visual odometry: configures (evidence: `client/visual_odometry.py`)
- Trajectory tracker → WebSocket / TCP proxy: broadcasts telemetry (evidence: `client/planner.py`)
- WebSocket / TCP proxy → UI controls: sends telemetry
- UI controls → Trajectory images: saves trajectory PNG (evidence: `client/static/js/main.js`)
- WebSocket / TCP proxy → Visual odometry: starts debug view (evidence: `client/proxy.py`)
