# intellisenselab/final-project-self-name architecture

> Architecture diagram of the GitHub repository intellisenselab/final-project-self-name, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/intellisenselab/final-project-self-name
- Repository: https://github.com/intellisenselab/final-project-self-name

## Overview

This repository is a ROS 2 vision-based leader–follower robot system: a Kobuki QBot tracks an AprilTag-equipped RC car, controls its motion, and can use LiDAR localization and Nav2 to return home. The primary workflow runs from Kinect imagery through tag detection and pose estimation to PID velocity control and the Kobuki base; a safety monitor can stop, reacquire, or initiate navigation. The README documents the wider navigation and mapping capabilities, but their runtime internals are mostly unsampled, so those links are shown only where documented.

Main entry points: [`ros_project_ws/src/safety_monitor/safety_monitor/safety_node.py`](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/safety_monitor/safety_monitor/safety_node.py) (Safety Monitor), [`ros_project_ws/src/platooning_bringup/launch/standalone_with_nav2.launch.py`](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/platooning_bringup/launch/standalone_with_nav2.launch.py) (System Bringup), [`ros_project_ws/src/platooning_pid/platooning_pid/pid_node.py`](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/platooning_pid/platooning_pid/pid_node.py) (PID Controller), [`ros_project_ws/src/kobuki_ros`](https://github.com/intellisenselab/final-project-self-name/tree/main/ros_project_ws/src/kobuki_ros) (Kobuki Driver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Sensing and Perception"]
  node_kinect["Kinect Driver"]
  node_camera_cal["Camera Calibration"]
  node_tag_detector["AprilTag Detector"]
  node_leader_pose["Leader Pose Estimator<br/>[detection_node.py]"]
  node_depth_processing["Depth Processing"]
end

subgraph group_control["Platooning Control"]
  node_pid["PID Controller<br/>[pid_node.py]"]
  node_mock_leader["Mock Leader<br/>[mock_leader.py]"]
end

subgraph group_safety["Safety and Recovery"]
  node_safety_monitor["Safety Monitor<br/>[safety_node.py]"]
end

subgraph group_robot_nav["Robot and Navigation"]
  node_kobuki_driver["Kobuki Driver"]
  node_kobuki_base["Kobuki Base"]
  node_lidar_driver["LDROBOT LiDAR Driver"]
  node_amcl["AMCL Localization"]
  node_nav2["Nav2 Navigation"]
  node_home_map["Map and Robot Model"]
  node_slam["SLAM Mapping"]
  node_bringup["System Bringup"]
  node_nav_launch["Navigation Launch"]
end

node_rc_leader(("RC Tag Leader"))

node_rc_leader -->|"carries tag"| node_tag_detector
node_kinect -->|"supplies images"| node_tag_detector
node_camera_cal -->|"calibrates images"| node_kinect
node_tag_detector -->|"publishes detections"| node_leader_pose
node_leader_pose -->|"publishes leader pose"| node_pid
node_leader_pose -->|"publishes leader pose"| node_safety_monitor
node_kinect -->|"publishes depth"| node_depth_processing
node_depth_processing -->|"supplies depth"| node_safety_monitor
node_pid -->|"receives stop signal"| node_safety_monitor
node_pid -->|"publishes velocity"| node_kobuki_driver
node_safety_monitor -->|"publishes stop velocity"| node_kobuki_driver
node_kobuki_driver -->|"drives motors"| node_kobuki_base
node_mock_leader -.->|"supplies test pose"| node_pid
node_lidar_driver -->|"supplies scans"| node_amcl
node_home_map -->|"provides map"| node_amcl
node_amcl -->|"localizes navigation"| node_nav2
node_safety_monitor -->|"sends home goal"| node_nav2
node_nav2 -.->|"commands return"| node_kobuki_driver
node_bringup -->|"includes launch"| node_nav_launch
node_bringup -->|"selects map"| node_home_map
node_bringup -->|"starts localization"| node_amcl
node_bringup -->|"starts navigation"| node_nav_launch
node_slam -->|"creates saved map"| node_home_map

click node_kinect "https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/kinect_ros2/src/kinect_ros2_component.cpp"
click node_camera_cal "https://github.com/intellisenselab/final-project-self-name/tree/main/ros_project_ws/src/kinect_ros2/cfg"
click node_leader_pose "https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/leader_detection/leader_detection/detection_node.py"
click node_pid "https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/platooning_pid/platooning_pid/pid_node.py"
click node_mock_leader "https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/platooning_pid/platooning_pid/mock_leader.py"
click node_safety_monitor "https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/safety_monitor/safety_monitor/safety_node.py"
click node_kobuki_driver "https://github.com/intellisenselab/final-project-self-name/tree/main/ros_project_ws/src/kobuki_ros"
click node_lidar_driver "https://github.com/intellisenselab/final-project-self-name/tree/main/ros_project_ws/src/ldlidar_ros2"
click node_home_map "https://github.com/intellisenselab/final-project-self-name/tree/main/ros_project_ws/src/qbot_description"
click node_bringup "https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/platooning_bringup/launch/standalone_with_nav2.launch.py"
click node_nav_launch "https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/qbot_description/launch/navigation_launch.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_kinect,node_camera_cal,node_tag_detector,node_leader_pose,node_depth_processing toneBlue
class node_pid,node_mock_leader toneAmber
class node_safety_monitor toneMint
class node_kobuki_driver,node_kobuki_base,node_lidar_driver,node_amcl,node_nav2,node_home_map,node_slam,node_bringup,node_nav_launch toneRose
class node_rc_leader toneIndigo
```

## Components

### Sensing and Perception

- [Kinect Driver](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/kinect_ros2/src/kinect_ros2_component.cpp): `ros_project_ws/src/kinect_ros2/src/kinect_ros2_component.cpp`
- [Camera Calibration](https://github.com/intellisenselab/final-project-self-name/tree/main/ros_project_ws/src/kinect_ros2/cfg): `ros_project_ws/src/kinect_ros2/cfg`
- **AprilTag Detector**
- [Leader Pose Estimator](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/leader_detection/leader_detection/detection_node.py): `ros_project_ws/src/leader_detection/leader_detection/detection_node.py`
- **Depth Processing**

### Platooning Control

- [PID Controller](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/platooning_pid/platooning_pid/pid_node.py): `ros_project_ws/src/platooning_pid/platooning_pid/pid_node.py`
- [Mock Leader](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/platooning_pid/platooning_pid/mock_leader.py): `ros_project_ws/src/platooning_pid/platooning_pid/mock_leader.py`

### Safety and Recovery

- [Safety Monitor](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/safety_monitor/safety_monitor/safety_node.py): `ros_project_ws/src/safety_monitor/safety_monitor/safety_node.py`

### Robot and Navigation

- [Kobuki Driver](https://github.com/intellisenselab/final-project-self-name/tree/main/ros_project_ws/src/kobuki_ros): `ros_project_ws/src/kobuki_ros`
- **Kobuki Base**
- [LDROBOT LiDAR Driver](https://github.com/intellisenselab/final-project-self-name/tree/main/ros_project_ws/src/ldlidar_ros2): `ros_project_ws/src/ldlidar_ros2`
- **AMCL Localization**
- **Nav2 Navigation**
- [Map and Robot Model](https://github.com/intellisenselab/final-project-self-name/tree/main/ros_project_ws/src/qbot_description): `ros_project_ws/src/qbot_description`
- **SLAM Mapping**
- [System Bringup](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/platooning_bringup/launch/standalone_with_nav2.launch.py): `ros_project_ws/src/platooning_bringup/launch/standalone_with_nav2.launch.py`
- [Navigation Launch](https://github.com/intellisenselab/final-project-self-name/blob/main/ros_project_ws/src/qbot_description/launch/navigation_launch.py): `ros_project_ws/src/qbot_description/launch/navigation_launch.py`

### Other components

- **RC Tag Leader**

## Connections

- RC Tag Leader → AprilTag Detector: carries tag (evidence: `README.md`)
- Kinect Driver → AprilTag Detector: supplies images (evidence: `README.md`)
- Camera Calibration → Kinect Driver: calibrates images (evidence: `ros_project_ws/src/kinect_ros2/src/kinect_ros2_component.cpp`)
- AprilTag Detector → Leader Pose Estimator: publishes detections (evidence: `ros_project_ws/src/leader_detection/leader_detection/detection_node.py`)
- Leader Pose Estimator → PID Controller: publishes leader pose (evidence: `README.md`)
- Leader Pose Estimator → Safety Monitor: publishes leader pose (evidence: `ros_project_ws/src/safety_monitor/safety_monitor/safety_node.py`)
- Kinect Driver → Depth Processing: publishes depth (evidence: `README.md`)
- Depth Processing → Safety Monitor: supplies depth (evidence: `ros_project_ws/src/safety_monitor/safety_monitor/safety_node.py`)
- PID Controller → Safety Monitor: receives stop signal (evidence: `ros_project_ws/src/platooning_pid/platooning_pid/pid_node.py`)
- PID Controller → Kobuki Driver: publishes velocity (evidence: `README.md`)
- Safety Monitor → Kobuki Driver: publishes stop velocity (evidence: `ros_project_ws/src/safety_monitor/safety_monitor/safety_node.py`)
- Kobuki Driver → Kobuki Base: drives motors (evidence: `README.md`)
- Mock Leader → PID Controller: supplies test pose
- LDROBOT LiDAR Driver → AMCL Localization: supplies scans (evidence: `README.md`)
- Map and Robot Model → AMCL Localization: provides map
- AMCL Localization → Nav2 Navigation: localizes navigation (evidence: `README.md`)
- Safety Monitor → Nav2 Navigation: sends home goal (evidence: `ros_project_ws/src/safety_monitor/safety_monitor/safety_node.py`)
- Nav2 Navigation → Kobuki Driver: commands return
- System Bringup → Navigation Launch: includes launch (evidence: `ros_project_ws/src/platooning_bringup/launch/standalone_with_nav2.launch.py`)
- System Bringup → Map and Robot Model: selects map (evidence: `ros_project_ws/src/platooning_bringup/launch/standalone_with_nav2.launch.py`)
- System Bringup → AMCL Localization: starts localization (evidence: `ros_project_ws/src/platooning_bringup/launch/standalone_with_nav2.launch.py`)
- System Bringup → Navigation Launch: starts navigation (evidence: `ros_project_ws/src/platooning_bringup/launch/standalone_with_nav2.launch.py`)
- SLAM Mapping → Map and Robot Model: creates saved map (evidence: `README.md`)
