# seongilheo/multi-robot-patrol-fleet architecture

> Architecture diagram of the GitHub repository seongilheo/multi-robot-patrol-fleet, 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/seongilheo/multi-robot-patrol-fleet
- Repository: https://github.com/seongilheo/multi-robot-patrol-fleet
- Video tour (about a minute): https://gitdiagram.com/seongilheo/multi-robot-patrol-fleet/video

## Overview

This ROS 2 project simulates a three-robot fleet and coordinates patrol and other missions. The principal workflow is mission submission to the scheduler, robot selection and dispatch through the fleet manager, then per-robot patrol execution through Nav2. SLAM, map merging, readiness supervision, heartbeat aggregation, safety gating, and audit logging support that workflow. Relationships below are based on the README and shown source excerpts; several launch- and topic-level details are documented rather than verified in sampled source.

Main entry points: [`src/fleet/src/fleet_manager_node.cpp`](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/fleet/src/fleet_manager_node.cpp) (Fleet manager), [`src/mapping/launch/robot_slam.launch.py`](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/mapping/launch/robot_slam.launch.py) (Per-robot SLAM), [`src/bringup/src/system_readiness_supervisor.cpp`](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/bringup/src/system_readiness_supervisor.cpp) (Readiness supervisor), [`src/scheduler/src/mission_scheduler_node.cpp`](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/scheduler/src/mission_scheduler_node.cpp) (Mission scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Fleet orchestration"]
  node_full_bringup["System bringup"]
  node_readiness["Readiness supervisor"]
  node_scheduler["Mission scheduler"]
  node_fleet_manager["Fleet manager"]
  node_interfaces["ROS interfaces"]
end

subgraph group_robot["Robot runtime"]
  node_patrol["Patrol manager<br/>[patrol_manager.cpp]"]
  node_navigation["Nav2 stack"]
  node_safety_gate["Safety gate"]
  node_robot_base["Robot base"]
end

subgraph group_mapping["Mapping and localization"]
  node_slam["Per-robot SLAM"]
  node_pose_watchdog["Pose watchdog"]
  node_map_merge["Map merger<br/>[merge_map.py]"]
end

subgraph group_simulation["Simulation"]
  node_gazebo["Gazebo fleet simulation"]
end

subgraph group_state["Fleet state and audit"]
  node_heartbeat["Robot heartbeat"]
  node_mission_store[("Mission store<br/>[mission_store.cpp]")]
end

node_operator(("Mission caller"))
node_external_caller(("Gazebo / ROS caller"))

node_operator -->|"queues mission"| node_scheduler
node_scheduler -->|"dispatches mission"| node_fleet_manager
node_fleet_manager -->|"starts or stops"| node_patrol
node_patrol -->|"requests waypoints"| node_navigation
node_navigation -->|"sends velocity"| node_safety_gate
node_safety_gate -->|"gates velocity"| node_robot_base
node_fleet_manager -->|"sets e-stop"| node_safety_gate
node_readiness -->|"gates dispatch"| node_scheduler
node_slam -->|"provides map"| node_navigation
node_slam -->|"provides occupancy maps"| node_map_merge
node_slam -->|"supplies readiness input"| node_readiness
node_pose_watchdog -.->|"reports localization health"| node_heartbeat
node_heartbeat -->|"reports robot state"| node_fleet_manager
node_fleet_manager -->|"records events"| node_mission_store
node_full_bringup -->|"starts simulation"| node_gazebo
node_full_bringup -->|"starts supervisor"| node_readiness
node_gazebo -->|"spawns robots"| node_robot_base
node_external_caller -.->|"provides world"| node_gazebo

click node_full_bringup "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/bringup/launch/full_system.launch.py"
click node_readiness "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/bringup/src/system_readiness_supervisor.cpp"
click node_scheduler "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/scheduler/src/mission_scheduler_node.cpp"
click node_fleet_manager "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/fleet/src/fleet_manager_node.cpp"
click node_heartbeat "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/fleet/src/robot_heartbeat_node.cpp"
click node_mission_store "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/fleet/src/mission_store.cpp"
click node_patrol "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/patrol/src/patrol_manager.cpp"
click node_navigation "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/navigation/launch/robot_navigation.launch.py"
click node_safety_gate "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/safety/src/safety_gate_node.cpp"
click node_robot_base "https://github.com/seongilheo/multi-robot-patrol-fleet/tree/main/src/description"
click node_slam "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/mapping/launch/robot_slam.launch.py"
click node_pose_watchdog "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/mapping/src/pose_jump_watchdog.cpp"
click node_map_merge "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/merge_map/merge_map/merge_map.py"
click node_gazebo "https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/sim/launch/multi_robot_sim.launch.py"
click node_interfaces "https://github.com/seongilheo/multi-robot-patrol-fleet/tree/main/src/interfaces"

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_full_bringup,node_readiness,node_scheduler,node_fleet_manager,node_interfaces toneBlue
class node_patrol,node_navigation,node_safety_gate,node_robot_base toneAmber
class node_slam,node_pose_watchdog,node_map_merge toneMint
class node_gazebo toneRose
class node_heartbeat,node_mission_store,node_operator,node_external_caller toneIndigo
```

## Components

### Fleet orchestration

- [System bringup](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/bringup/launch/full_system.launch.py): `src/bringup/launch/full_system.launch.py`
- [Readiness supervisor](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/bringup/src/system_readiness_supervisor.cpp): `src/bringup/src/system_readiness_supervisor.cpp`
- [Mission scheduler](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/scheduler/src/mission_scheduler_node.cpp): `src/scheduler/src/mission_scheduler_node.cpp`
- [Fleet manager](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/fleet/src/fleet_manager_node.cpp): `src/fleet/src/fleet_manager_node.cpp`
- [ROS interfaces](https://github.com/seongilheo/multi-robot-patrol-fleet/tree/main/src/interfaces): `src/interfaces`

### Robot runtime

- [Patrol manager](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/patrol/src/patrol_manager.cpp): `src/patrol/src/patrol_manager.cpp`
- [Nav2 stack](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/navigation/launch/robot_navigation.launch.py): `src/navigation/launch/robot_navigation.launch.py`
- [Safety gate](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/safety/src/safety_gate_node.cpp): `src/safety/src/safety_gate_node.cpp`
- [Robot base](https://github.com/seongilheo/multi-robot-patrol-fleet/tree/main/src/description): `src/description`

### Mapping and localization

- [Per-robot SLAM](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/mapping/launch/robot_slam.launch.py): `src/mapping/launch/robot_slam.launch.py`
- [Pose watchdog](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/mapping/src/pose_jump_watchdog.cpp): `src/mapping/src/pose_jump_watchdog.cpp`
- [Map merger](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/merge_map/merge_map/merge_map.py): `src/merge_map/merge_map/merge_map.py`

### Simulation

- [Gazebo fleet simulation](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/sim/launch/multi_robot_sim.launch.py): `src/sim/launch/multi_robot_sim.launch.py`

### Fleet state and audit

- [Robot heartbeat](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/fleet/src/robot_heartbeat_node.cpp): `src/fleet/src/robot_heartbeat_node.cpp`
- [Mission store](https://github.com/seongilheo/multi-robot-patrol-fleet/blob/main/src/fleet/src/mission_store.cpp): `src/fleet/src/mission_store.cpp`

### Other components

- **Mission caller**
- **Gazebo / ROS caller**

## Connections

- Mission caller → Mission scheduler: queues mission
- Mission scheduler → Fleet manager: dispatches mission
- Fleet manager → Patrol manager: starts or stops
- Patrol manager → Nav2 stack: requests waypoints
- Nav2 stack → Safety gate: sends velocity
- Safety gate → Robot base: gates velocity (evidence: `src/safety/src/safety_gate_node.cpp`)
- Fleet manager → Safety gate: sets e-stop
- Readiness supervisor → Mission scheduler: gates dispatch
- Per-robot SLAM → Nav2 stack: provides map
- Per-robot SLAM → Map merger: provides occupancy maps
- Per-robot SLAM → Readiness supervisor: supplies readiness input (evidence: `src/bringup/src/system_readiness_supervisor.cpp`)
- Pose watchdog → Robot heartbeat: reports localization health
- Robot heartbeat → Fleet manager: reports robot state
- Fleet manager → Mission store: records events (evidence: `src/fleet/src/fleet_manager_node.cpp`)
- System bringup → Gazebo fleet simulation: starts simulation
- System bringup → Readiness supervisor: starts supervisor
- Gazebo fleet simulation → Robot base: spawns robots (evidence: `src/sim/launch/multi_robot_sim.launch.py`)
- Gazebo / ROS caller → Gazebo fleet simulation: provides world
