# jacobsfarm/bruut_openagbot architecture

> Architecture diagram of the GitHub repository jacobsfarm/bruut_openagbot, 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/jacobsfarm/bruut_openagbot
- Repository: https://github.com/jacobsfarm/bruut_openagbot

## Overview

Bruut OpenAgbot is an experimental agricultural robot whose main workflow is field planning, selecting an AB-line mission in the web interface, and having the robot navigate and actuate its drive and steering hardware. The interface also supports status, manual control, and camera-based weed detection; route logging and mission-planning scripts support field work and review. The graph reflects documented capabilities, but several subsystem links are based on README descriptions and tree paths because their source was not sampled.

Main entry points: [`app/api/endpoints.py`](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/api/endpoints.py) (HTTP API), [`app/services/vehicle_controller.py`](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/vehicle_controller.py) (Vehicle controller), [`frontend/src/App.svelte`](https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/App.svelte) (Web application), [`app/services/ab_navigator.py`](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/ab_navigator.py) (AB-line navigator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Operator interface"]
  node_frontend["Web application<br/>[App.svelte]"]
  node_telemetry["Telemetry client<br/>[telemetry.js]"]
  node_fieldmap["Field map<br/>[veldkaart.svelte]"]
  node_dashboard["Dashboard views<br/>[dashboard.svelte]"]
  node_camera_ui["Camera view<br/>[camera.svelte]"]
end

subgraph group_mission["Planning and navigation"]
  node_api["HTTP API<br/>[endpoints.py]"]
  node_ab_plan["AB mission maker"]
  node_ab_nav["AB-line navigator<br/>[ab_navigator.py]"]
  node_navigator["Waypoint navigator<br/>[navigator.py]"]
  node_gps["RTK positioning<br/>[gps_logic.py]"]
end

subgraph group_vehicle["Vehicle control"]
  node_vehicle_control["Vehicle controller"]
  node_motor["Drive control<br/>[motor_logic.py]"]
  node_vesc["VESC CAN bus<br/>[vesc_can.py]"]
  node_steering["Stepper steering<br/>[stepper_logic.py]"]
  node_stepper_firmware["Stepper firmware"]
end

subgraph group_vision["Vision and records"]
  node_vision_stream["Camera capture and inference<br/>[streamer.py]"]
  node_weed_tracker["Weed tracking<br/>[weed_tracker.py]"]
  node_vision_log["Detection records"]
  node_ride_log["Ride logging<br/>[logger.py]"]
  node_data_handler["Data handling<br/>[data_handler.py]"]
  node_route_tools["Route review tools<br/>[overlay_routes.py]"]
end

node_operator(("Farm operator"))
node_camera(("Robot camera"))
node_rtk_receiver(("RTK receiver"))
node_vesc_units(("VESC motor controllers"))

node_operator -->|"operates"| node_frontend
node_frontend -->|"selects missions"| node_fieldmap
node_frontend -->|"views status"| node_dashboard
node_frontend -->|"views camera"| node_camera_ui
node_frontend -->|"uses"| node_telemetry
node_fieldmap -->|"requests plans"| node_api
node_telemetry -->|"requests status"| node_api
node_ab_plan -->|"writes mission data"| node_ab_nav
node_api -->|"starts and configures"| node_ab_nav
node_api -->|"starts and stops"| node_navigator
node_api -->|"reads position"| node_gps
node_ab_nav -->|"reads position"| node_gps
node_navigator -->|"reads position"| node_gps
node_ab_nav -->|"commands motion"| node_vehicle_control
node_navigator -->|"commands motion"| node_vehicle_control
node_api -->|"manual and stop commands"| node_vehicle_control
node_vehicle_control -->|"sets drive speed"| node_motor
node_vehicle_control -->|"sets steering angles"| node_steering
node_motor -->|"sends CAN commands"| node_vesc
node_vesc -->|"controls and reads"| node_vesc_units
node_steering -.->|"sends serial commands"| node_stepper_firmware
node_camera -->|"supplies frames"| node_vision_stream
node_vision_stream -.->|"provides detections"| node_weed_tracker
node_weed_tracker -.->|"records detections"| node_vision_log
node_vehicle_control -.->|"logs drive state"| node_ride_log
node_data_handler -.->|"supports route review"| node_route_tools

click node_frontend "https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/App.svelte"
click node_telemetry "https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/lib/telemetry.js"
click node_fieldmap "https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/components/veldkaart.svelte"
click node_dashboard "https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/components/dashboard.svelte"
click node_camera_ui "https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/components/camera.svelte"
click node_api "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/api/endpoints.py"
click node_ab_plan "https://github.com/jacobsfarm/bruut_openagbot/blob/main/Single_script_code/AB_mission_maker.py"
click node_ab_nav "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/ab_navigator.py"
click node_navigator "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/navigator.py"
click node_gps "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/hardware/gps_logic.py"
click node_vehicle_control "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/vehicle_controller.py"
click node_motor "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/hardware/motor_logic.py"
click node_vesc "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/hardware/vesc_can.py"
click node_steering "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/hardware/stepper_logic.py"
click node_stepper_firmware "https://github.com/jacobsfarm/bruut_openagbot/blob/main/Arduino/arduino_controlling_dual_steppercontroller.cpp"
click node_vision_stream "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/vision/streamer.py"
click node_weed_tracker "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/vision/weed_tracker.py"
click node_vision_log "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/vision/detection_logger.py"
click node_ride_log "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/logger.py"
click node_data_handler "https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/data_handler.py"
click node_route_tools "https://github.com/jacobsfarm/bruut_openagbot/blob/main/Single_script_code/overlay_routes.py"

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_frontend,node_telemetry,node_fieldmap,node_dashboard,node_camera_ui toneBlue
class node_api,node_ab_plan,node_ab_nav,node_navigator,node_gps toneAmber
class node_vehicle_control,node_motor,node_vesc,node_steering,node_stepper_firmware toneMint
class node_vision_stream,node_weed_tracker,node_vision_log,node_ride_log,node_data_handler,node_route_tools toneRose
class node_operator,node_camera,node_rtk_receiver,node_vesc_units toneIndigo
```

## Components

### Operator interface

- [Web application](https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/App.svelte): `frontend/src/App.svelte`
- [Telemetry client](https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/lib/telemetry.js): `frontend/src/lib/telemetry.js`
- [Field map](https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/components/veldkaart.svelte): `frontend/src/components/veldkaart.svelte`
- [Dashboard views](https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/components/dashboard.svelte): `frontend/src/components/dashboard.svelte`
- [Camera view](https://github.com/jacobsfarm/bruut_openagbot/blob/main/frontend/src/components/camera.svelte): `frontend/src/components/camera.svelte`

### Planning and navigation

- [HTTP API](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/api/endpoints.py): `app/api/endpoints.py`
- [AB mission maker](https://github.com/jacobsfarm/bruut_openagbot/blob/main/Single_script_code/AB_mission_maker.py): `Single_script_code/AB_mission_maker.py`
- [AB-line navigator](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/ab_navigator.py): `app/services/ab_navigator.py`
- [Waypoint navigator](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/navigator.py): `app/services/navigator.py`
- [RTK positioning](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/hardware/gps_logic.py): `app/hardware/gps_logic.py`

### Vehicle control

- [Vehicle controller](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/vehicle_controller.py): `app/services/vehicle_controller.py`
- [Drive control](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/hardware/motor_logic.py): `app/hardware/motor_logic.py`
- [VESC CAN bus](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/hardware/vesc_can.py): `app/hardware/vesc_can.py`
- [Stepper steering](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/hardware/stepper_logic.py): `app/hardware/stepper_logic.py`
- [Stepper firmware](https://github.com/jacobsfarm/bruut_openagbot/blob/main/Arduino/arduino_controlling_dual_steppercontroller.cpp): `Arduino/arduino_controlling_dual_steppercontroller.cpp`

### Vision and records

- [Camera capture and inference](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/vision/streamer.py): `app/vision/streamer.py`
- [Weed tracking](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/vision/weed_tracker.py): `app/vision/weed_tracker.py`
- [Detection records](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/vision/detection_logger.py): `app/vision/detection_logger.py`
- [Ride logging](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/logger.py): `app/services/logger.py`
- [Data handling](https://github.com/jacobsfarm/bruut_openagbot/blob/main/app/services/data_handler.py): `app/services/data_handler.py`
- [Route review tools](https://github.com/jacobsfarm/bruut_openagbot/blob/main/Single_script_code/overlay_routes.py): `Single_script_code/overlay_routes.py`

### Other components

- **Farm operator**
- **Robot camera**
- **RTK receiver**
- **VESC motor controllers**

## Connections

- Farm operator → Web application: operates
- Web application → Field map: selects missions
- Web application → Dashboard views: views status
- Web application → Camera view: views camera
- Web application → Telemetry client: uses
- Field map → HTTP API: requests plans
- Telemetry client → HTTP API: requests status
- AB mission maker → AB-line navigator: writes mission data
- HTTP API → AB-line navigator: starts and configures
- HTTP API → Waypoint navigator: starts and stops
- HTTP API → RTK positioning: reads position
- AB-line navigator → RTK positioning: reads position
- Waypoint navigator → RTK positioning: reads position
- AB-line navigator → Vehicle controller: commands motion
- Waypoint navigator → Vehicle controller: commands motion
- HTTP API → Vehicle controller: manual and stop commands
- Vehicle controller → Drive control: sets drive speed
- Vehicle controller → Stepper steering: sets steering angles
- Drive control → VESC CAN bus: sends CAN commands
- VESC CAN bus → VESC motor controllers: controls and reads
- Stepper steering → Stepper firmware: sends serial commands
- Robot camera → Camera capture and inference: supplies frames
- Camera capture and inference → Weed tracking: provides detections
- Weed tracking → Detection records: records detections
- Vehicle controller → Ride logging: logs drive state
- Data handling → Route review tools: supports route review
