# trymf/ros2_ws_competition_gr1 architecture

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

- Interactive diagram: https://gitdiagram.com/trymf/ros2_ws_competition_gr1
- Repository: https://github.com/trymf/ros2_ws_competition_gr1

## Overview

This ROS 2 multi-robot rescue challenge simulates two TurtleBot3s exploring a world, detecting numbered markers and reporting their positions for scoring. The operator launches a world, the scoring node, and the challenge nodes; robots explore while camera-based detection feeds a leader that submits marker reports and guides the robots toward the big fire. The graph also shows simulation assets, scoring interfaces, and the ArUco pose-processing layer. Some launch and marker-pose implementation details were not excerpted, so those connections are omitted or marked unverified.

Main entry points: [`src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_node.py`](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_node.py) (Marker detection), [`src/multi_robot_challenge_23/multi_robot_challenge_23/leader.py`](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/multi_robot_challenge_23/leader.py) (Marker and fire leader), [`src/multi_robot_scoring/scoring/scoring/scoring.py`](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_scoring/scoring/scoring/scoring.py) (Challenge scoring), [`src/multi_robot_challenge_23/multi_robot_challenge_23/robot_handler.py`](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/multi_robot_challenge_23/robot_handler.py) (Wall-following robots)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sim["Simulation"]
  node_world_launch["World launch"]
  node_world_assets["World assets"]
  node_spawn["Robot spawning"]
  node_robot_model["Robot model"]
end

subgraph group_explore["Robot exploration"]
  node_rescue_launch["Challenge launch"]
  node_handler["Wall-following robots<br/>[robot_handler.py]"]
end

subgraph group_vision["Marker vision"]
  node_aruco_launch["ArUco launch"]
  node_aruco["Marker detection<br/>[aruco_node.py]"]
  node_pose_vis["Pose visualization<br/>[aruco_pose_vis.py]"]
  node_transforms["Pose transforms<br/>[transformations.py]"]
  node_marker_pose["Marker map poses<br/>[marker_pose.py]"]
end

subgraph group_coord["Coordination and scoring"]
  node_leader["Marker and fire leader<br/>[leader.py]"]
  node_scoring["Challenge scoring<br/>[scoring.py]"]
  node_score_service["Marker-position service"]
end

node_operator(("Operator"))
node_gazebo["Gazebo simulator"]
node_robots["TurtleBot3s"]
node_camera["Camera input"]
node_gazebo_state["Gazebo entity state"]

node_operator -->|"launches world"| node_world_launch
node_operator -->|"starts scoring"| node_scoring
node_operator -->|"starts nodes"| node_rescue_launch
node_world_launch -.->|"starts simulation"| node_gazebo
node_world_assets -.->|"provides worlds"| node_gazebo
node_spawn -->|"processes description"| node_robot_model
node_spawn -->|"spawns entity"| node_gazebo
node_gazebo -.->|"simulates"| node_robots
node_rescue_launch -.->|"starts nodes"| node_handler
node_handler -->|"commands motion"| node_robots
node_robots -->|"sends sensor data"| node_handler
node_aruco_launch -.->|"starts detector"| node_aruco
node_camera -->|"sends images"| node_aruco
node_aruco -->|"uses transforms"| node_transforms
node_pose_vis -->|"uses transforms"| node_transforms
node_aruco -.->|"provides detections"| node_marker_pose
node_marker_pose -->|"publishes marker data"| node_leader
node_robots -->|"reports odometry"| node_leader
node_leader -->|"calls service"| node_score_service
node_score_service -->|"defines request"| node_scoring
node_leader -->|"publishes fire target"| node_handler
node_scoring -->|"reads odometry"| node_robots
node_scoring -->|"requests entity state"| node_gazebo_state
node_gazebo_state -->|"queries models"| node_gazebo

click node_world_launch "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/launch/rescue_robots_w1.launch.py"
click node_world_assets "https://github.com/trymf/ros2_ws_competition_gr1/tree/main/src/multi_robot_challenge_23/worlds"
click node_spawn "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/launch/spawn_robot.launch.py"
click node_robot_model "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/urdf/turtlebot3_waffle_pi.urdf.xacro"
click node_rescue_launch "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/launch/rescue_nodes.launch.py"
click node_handler "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/multi_robot_challenge_23/robot_handler.py"
click node_aruco_launch "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/launch/aruco_recognition.launch.py"
click node_aruco "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_node.py"
click node_pose_vis "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_pose_vis.py"
click node_transforms "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/ros2_aruco/ros2_aruco/ros2_aruco/transformations.py"
click node_marker_pose "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/multi_robot_challenge_23/marker_pose.py"
click node_leader "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/multi_robot_challenge_23/leader.py"
click node_scoring "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_scoring/scoring/scoring/scoring.py"
click node_score_service "https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_scoring/scoring_interfaces/srv/SetMarkerPosition.srv"

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_world_launch,node_world_assets,node_spawn,node_robot_model toneBlue
class node_rescue_launch,node_handler toneAmber
class node_aruco_launch,node_aruco,node_pose_vis,node_transforms,node_marker_pose toneMint
class node_leader,node_scoring,node_score_service toneRose
class node_operator,node_gazebo,node_robots,node_camera,node_gazebo_state toneIndigo
```

## Components

### Simulation

- [World launch](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/launch/rescue_robots_w1.launch.py): `src/multi_robot_challenge_23/launch/rescue_robots_w1.launch.py`
- [World assets](https://github.com/trymf/ros2_ws_competition_gr1/tree/main/src/multi_robot_challenge_23/worlds): `src/multi_robot_challenge_23/worlds`
- [Robot spawning](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/launch/spawn_robot.launch.py): `src/multi_robot_challenge_23/launch/spawn_robot.launch.py`
- [Robot model](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/urdf/turtlebot3_waffle_pi.urdf.xacro): `src/multi_robot_challenge_23/urdf/turtlebot3_waffle_pi.urdf.xacro`

### Robot exploration

- [Challenge launch](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/launch/rescue_nodes.launch.py): `src/multi_robot_challenge_23/launch/rescue_nodes.launch.py`
- [Wall-following robots](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/multi_robot_challenge_23/robot_handler.py): `src/multi_robot_challenge_23/multi_robot_challenge_23/robot_handler.py`

### Marker vision

- [ArUco launch](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/launch/aruco_recognition.launch.py): `src/multi_robot_challenge_23/launch/aruco_recognition.launch.py`
- [Marker detection](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_node.py): `src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_node.py`
- [Pose visualization](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_pose_vis.py): `src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_pose_vis.py`
- [Pose transforms](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/ros2_aruco/ros2_aruco/ros2_aruco/transformations.py): `src/ros2_aruco/ros2_aruco/ros2_aruco/transformations.py`
- [Marker map poses](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/multi_robot_challenge_23/marker_pose.py): `src/multi_robot_challenge_23/multi_robot_challenge_23/marker_pose.py`

### Coordination and scoring

- [Marker and fire leader](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_challenge_23/multi_robot_challenge_23/leader.py): `src/multi_robot_challenge_23/multi_robot_challenge_23/leader.py`
- [Challenge scoring](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_scoring/scoring/scoring/scoring.py): `src/multi_robot_scoring/scoring/scoring/scoring.py`
- [Marker-position service](https://github.com/trymf/ros2_ws_competition_gr1/blob/main/src/multi_robot_scoring/scoring_interfaces/srv/SetMarkerPosition.srv): `src/multi_robot_scoring/scoring_interfaces/srv/SetMarkerPosition.srv`

### Other components

- **Operator**
- **Gazebo simulator**
- **TurtleBot3s**
- **Camera input**
- **Gazebo entity state**

## Connections

- Operator → World launch: launches world (evidence: `README.md`)
- Operator → Challenge scoring: starts scoring (evidence: `README.md`)
- Operator → Challenge launch: starts nodes (evidence: `README.md`)
- World launch → Gazebo simulator: starts simulation
- World assets → Gazebo simulator: provides worlds
- Robot spawning → Robot model: processes description (evidence: `src/multi_robot_challenge_23/launch/spawn_robot.launch.py`)
- Robot spawning → Gazebo simulator: spawns entity (evidence: `src/multi_robot_challenge_23/launch/spawn_robot.launch.py`)
- Gazebo simulator → TurtleBot3s: simulates
- Challenge launch → Wall-following robots: starts nodes
- Wall-following robots → TurtleBot3s: commands motion (evidence: `src/multi_robot_challenge_23/multi_robot_challenge_23/robot_handler.py`)
- TurtleBot3s → Wall-following robots: sends sensor data (evidence: `src/multi_robot_challenge_23/multi_robot_challenge_23/robot_handler.py`)
- ArUco launch → Marker detection: starts detector
- Camera input → Marker detection: sends images (evidence: `src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_node.py`)
- Marker detection → Pose transforms: uses transforms (evidence: `src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_node.py`)
- Pose visualization → Pose transforms: uses transforms (evidence: `src/ros2_aruco/ros2_aruco/ros2_aruco/aruco_pose_vis.py`)
- Marker detection → Marker map poses: provides detections
- Marker map poses → Marker and fire leader: publishes marker data (evidence: `src/multi_robot_challenge_23/multi_robot_challenge_23/leader.py`)
- TurtleBot3s → Marker and fire leader: reports odometry (evidence: `src/multi_robot_challenge_23/multi_robot_challenge_23/leader.py`)
- Marker and fire leader → Marker-position service: calls service (evidence: `src/multi_robot_challenge_23/multi_robot_challenge_23/leader.py`)
- Marker-position service → Challenge scoring: defines request
- Marker and fire leader → Wall-following robots: publishes fire target (evidence: `src/multi_robot_challenge_23/multi_robot_challenge_23/robot_handler.py`)
- Challenge scoring → TurtleBot3s: reads odometry (evidence: `src/multi_robot_scoring/scoring/scoring/scoring.py`)
- Challenge scoring → Gazebo entity state: requests entity state (evidence: `src/multi_robot_scoring/scoring/scoring/scoring.py`)
- Gazebo entity state → Gazebo simulator: queries models
