# filippabodecker/autonomous-dog-search-robot architecture

> Architecture diagram of the GitHub repository filippabodecker/autonomous-dog-search-robot, 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/filippabodecker/autonomous-dog-search-robot
- Repository: https://github.com/filippabodecker/autonomous-dog-search-robot

## Overview

This is an embedded autonomous dog-search robot: the K10 coordinates LiDAR navigation, on-device dog detection, detection responses and voice-triggered mission completion, while an ESP32 relays mission reports and images to Telegram. The README documents the end-to-end subsystem behavior; the K10 firmware is only partially excerpted, and the ESP32 firmware is not sampled, so those paths and relationships rely on the README where indicated.

Main entry points: [`src/k10/autonomous_dog_search_robot.cpp`](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp) (Detection Response), [`src/esp32/telegram_gateway.ino`](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/esp32/telegram_gateway.ino) (ESP32 Gateway)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_k10["K10 Firmware"]
  node_k10loop["K10 Mission Loop"]
  node_navigation["LiDAR Navigation"]
end

subgraph group_mission["Mission Workflow"]
  node_dogdetection["Dog Detection"]
  node_detectionresponse["Detection Response"]
  node_voicecommand["Voice Command"]
  node_completion["Mission Completion"]
  node_images[("Captured Images")]
end

subgraph group_hardware["Robot Hardware"]
  node_maqueen["Maqueen Platform"]
  node_treatservo["Treat Servo"]
  node_localfeedback["Display and Audio"]
end

subgraph group_reporting["Reporting"]
  node_esp32["ESP32 Gateway"]
  node_telegram["Telegram"]
end

node_lidar{{"LiDAR"}}
node_camera{{"Camera"}}

node_camera -->|"provides frames"| node_dogdetection
node_lidar -->|"provides distances"| node_navigation
node_k10loop -->|"starts task"| node_navigation
node_k10loop -->|"checks detections"| node_dogdetection
node_navigation -->|"drives motors"| node_maqueen
node_dogdetection -->|"triggers response"| node_detectionresponse
node_detectionresponse -->|"pauses navigation"| node_navigation
node_detectionresponse -->|"stops and lights"| node_maqueen
node_detectionresponse -->|"captures and saves"| node_images
node_detectionresponse -->|"dispenses treat"| node_treatservo
node_detectionresponse -->|"shows photo"| node_localfeedback
node_detectionresponse -->|"sends detection event"| node_esp32
node_k10loop -->|"checks command"| node_voicecommand
node_voicecommand -->|"ends mission"| node_completion
node_completion -->|"stops robot"| node_maqueen
node_completion -->|"reports completion"| node_localfeedback
node_completion -->|"sends summary and images"| node_esp32
node_images -->|"uploads over HTTP"| node_esp32
node_esp32 -->|"forwards reports"| node_telegram

click node_k10loop "https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp"
click node_navigation "https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp"
click node_dogdetection "https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp"
click node_detectionresponse "https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp"
click node_voicecommand "https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp"
click node_completion "https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp"
click node_images "https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp"
click node_esp32 "https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/esp32/telegram_gateway.ino"

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_k10loop,node_navigation toneBlue
class node_dogdetection,node_detectionresponse,node_voicecommand,node_completion,node_images toneAmber
class node_maqueen,node_treatservo,node_localfeedback toneMint
class node_esp32,node_telegram toneRose
class node_lidar,node_camera toneIndigo
```

## Components

### K10 Firmware

- [K10 Mission Loop](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp): `src/k10/autonomous_dog_search_robot.cpp`
- [LiDAR Navigation](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp): `src/k10/autonomous_dog_search_robot.cpp`

### Mission Workflow

- [Dog Detection](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp): `src/k10/autonomous_dog_search_robot.cpp`
- [Detection Response](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp): `src/k10/autonomous_dog_search_robot.cpp`
- [Voice Command](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp): `src/k10/autonomous_dog_search_robot.cpp`
- [Mission Completion](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp): `src/k10/autonomous_dog_search_robot.cpp`
- [Captured Images](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/k10/autonomous_dog_search_robot.cpp): `src/k10/autonomous_dog_search_robot.cpp`

### Robot Hardware

- **Maqueen Platform**
- **Treat Servo**
- **Display and Audio**

### Reporting

- [ESP32 Gateway](https://github.com/filippabodecker/autonomous-dog-search-robot/blob/main/src/esp32/telegram_gateway.ino): `src/esp32/telegram_gateway.ino`
- **Telegram**

### Other components

- **LiDAR**
- **Camera**

## Connections

- Camera → Dog Detection: provides frames (evidence: `README.md`)
- LiDAR → LiDAR Navigation: provides distances (evidence: `README.md`)
- K10 Mission Loop → LiDAR Navigation: starts task (evidence: `src/k10/autonomous_dog_search_robot.cpp`)
- K10 Mission Loop → Dog Detection: checks detections (evidence: `src/k10/autonomous_dog_search_robot.cpp`)
- LiDAR Navigation → Maqueen Platform: drives motors (evidence: `README.md`)
- Dog Detection → Detection Response: triggers response (evidence: `README.md`)
- Detection Response → LiDAR Navigation: pauses navigation (evidence: `README.md`)
- Detection Response → Maqueen Platform: stops and lights (evidence: `README.md`)
- Detection Response → Captured Images: captures and saves (evidence: `README.md`)
- Detection Response → Treat Servo: dispenses treat (evidence: `README.md`)
- Detection Response → Display and Audio: shows photo (evidence: `README.md`)
- Detection Response → ESP32 Gateway: sends detection event (evidence: `README.md`)
- K10 Mission Loop → Voice Command: checks command (evidence: `src/k10/autonomous_dog_search_robot.cpp`)
- Voice Command → Mission Completion: ends mission (evidence: `README.md`)
- Mission Completion → Maqueen Platform: stops robot (evidence: `README.md`)
- Mission Completion → Display and Audio: reports completion (evidence: `README.md`)
- Mission Completion → ESP32 Gateway: sends summary and images (evidence: `README.md`)
- Captured Images → ESP32 Gateway: uploads over HTTP (evidence: `README.md`)
- ESP32 Gateway → Telegram: forwards reports (evidence: `README.md`)
