# daniel-zhang2017/ros2-robotics-projects architecture

> Architecture diagram of the GitHub repository daniel-zhang2017/ros2-robotics-projects, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/daniel-zhang2017/ros2-robotics-projects
- Repository: https://github.com/daniel-zhang2017/ros2-robotics-projects

## Overview

This repository is a collection of ROS 2 robotics projects rather than one application. The README’s clearest user workflows are camera-to-YOLO detection/person alerts, system-status display, and turtle velocity control. The tree also contains robot base/sensor drivers, speech synthesis, multiple SLAM implementations, and browser-oriented image streaming. The graph keeps these as separate capabilities; wiring for some unsampled packages is intentionally not inferred from filenames alone. SLAM and streaming components are represented at meaningful subsystem level where the tree supports them.

Main entry points: [`turn_on_wheeltec_robot/src/wheeltec_robot.cpp`](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/turn_on_wheeltec_robot/src/wheeltec_robot.cpp) (Wheeltec Base), [`ultralytics_ros2/ultralytics_ros2/detection_node.py`](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/ultralytics_ros2/ultralytics_ros2/detection_node.py) (YOLO Detection), [`usb_cam-ros2/src/usb_cam_node.cpp`](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/usb_cam-ros2/src/usb_cam_node.cpp) (USB Camera), [`web_video_server-ros2/web_video_server-ros2/src/web_video_server.cpp`](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/web_video_server-ros2/web_video_server-ros2/src/web_video_server.cpp) (Web Video Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_vision["Vision and Video"]
  node_camera["USB Camera<br/>[usb_cam_node.cpp]"]
  node_yolo["YOLO Detection<br/>[detection_node.py]"]
  node_person["Person Alert"]
  node_video_server["Web Video Server"]
end

subgraph group_robot["Robot and Control"]
  node_turtle_node["Circle Controller<br/>[draw_circle.py]"]
  node_turtlesim["Turtlesim"]
  node_base_driver["Wheeltec Base<br/>[wheeltec_robot.cpp]"]
  node_imu_processor["IMU Processor<br/>[ImuProcessor.cpp]"]
end

subgraph group_status["Status Interface"]
  node_status_pub["Status Publisher<br/>[sys_status_pub.py]"]
  node_status_ui["Status Display"]
  node_status_data["Status Topics"]
end

subgraph group_mapping["SLAM and Mapping"]
  node_slam_gmapping["GMapping SLAM<br/>[slam_gmapping.cpp]"]
  node_gmapping_core["Particle Mapping Core"]
  node_scan_matcher["Scan Matcher<br/>[scanmatcher.cpp]"]
  node_lego_loam["LeGO-LOAM<br/>[main.cpp]"]
  node_lio_sam["LIO-SAM Optimization<br/>[mapOptmization.cpp]"]
  node_slam_launch["SLAM Launchers<br/>[run.launch.py]"]
end

subgraph group_speech["Speech"]
  node_tts["Text Synthesis<br/>[tts_make.cpp]"]
end

node_operator(("Operator"))
node_browser(("Video Client"))
node_serial["Serial Controller"]
node_speech_service["iFlytek TTS SDK"]

node_operator -->|"starts camera"| node_camera
node_operator -->|"starts detection"| node_yolo
node_camera -->|"publishes images"| node_yolo
node_yolo -->|"annotated images"| node_person
node_operator -->|"starts alert"| node_person
node_operator -->|"starts streaming"| node_video_server
node_video_server -->|"serves image streams"| node_browser
node_operator -->|"runs publisher"| node_status_pub
node_status_pub -->|"publishes status"| node_status_data
node_status_data -->|"delivers status"| node_status_ui
node_operator -->|"runs display"| node_status_ui
node_operator -->|"runs controller"| node_turtle_node
node_turtle_node -->|"publishes velocity"| node_turtlesim
node_operator -->|"starts robot driver"| node_base_driver
node_base_driver -->|"sends commands"| node_serial
node_serial -->|"returns telemetry"| node_base_driver
node_base_driver -.->|"robot sensor data"| node_imu_processor
node_operator -->|"requests synthesis"| node_tts
node_tts -->|"synthesizes speech"| node_speech_service
node_operator -->|"launches mapping"| node_slam_launch
node_slam_launch -.->|"starts node"| node_slam_gmapping
node_slam_gmapping -->|"processes scans"| node_gmapping_core
node_gmapping_core -->|"registers scans"| node_scan_matcher
node_operator -.->|"runs SLAM"| node_lego_loam
node_operator -.->|"runs SLAM"| node_lio_sam

click node_camera "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/usb_cam-ros2/src/usb_cam_node.cpp"
click node_yolo "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/ultralytics_ros2/ultralytics_ros2/detection_node.py"
click node_person "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/person_detector/person_detector/person_detector_node.py"
click node_video_server "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/web_video_server-ros2/web_video_server-ros2/src/web_video_server.cpp"
click node_status_pub "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/topic_practice_ws/src/status_publisher/status_publisher/sys_status_pub.py"
click node_status_ui "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/topic_practice_ws/src/status_display/src/sys_status_display.cpp"
click node_turtle_node "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/topic_practice_ws/src/turtle_draw/turtle_draw/draw_circle.py"
click node_base_driver "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/turn_on_wheeltec_robot/src/wheeltec_robot.cpp"
click node_imu_processor "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/turn_on_wheeltec_robot/src/ImuProcessor.cpp"
click node_tts "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/tts_make_ros2/src/tts_make.cpp"
click node_slam_gmapping "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/slam_gmapping/src/slam_gmapping.cpp"
click node_gmapping_core "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/openslam_gmapping/gridfastslam/gridslamprocessor.cpp"
click node_scan_matcher "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/openslam_gmapping/scanmatcher/scanmatcher.cpp"
click node_lego_loam "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/LeGO-LOAM-SR-master/LeGO-LOAM/src/main.cpp"
click node_lio_sam "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/LIO-SAM-ROS2/src/mapOptmization.cpp"
click node_slam_launch "https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/LIO-SAM-ROS2/launch/run.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_camera,node_yolo,node_person,node_video_server,node_browser toneBlue
class node_turtle_node,node_turtlesim,node_base_driver,node_imu_processor toneAmber
class node_status_pub,node_status_ui,node_status_data toneMint
class node_slam_gmapping,node_gmapping_core,node_scan_matcher,node_lego_loam,node_lio_sam,node_slam_launch toneRose
class node_tts,node_operator,node_serial,node_speech_service toneIndigo
```

## Components

### Vision and Video

- [USB Camera](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/usb_cam-ros2/src/usb_cam_node.cpp): `usb_cam-ros2/src/usb_cam_node.cpp`
- [YOLO Detection](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/ultralytics_ros2/ultralytics_ros2/detection_node.py): `ultralytics_ros2/ultralytics_ros2/detection_node.py`
- [Person Alert](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/person_detector/person_detector/person_detector_node.py): `person_detector/person_detector/person_detector_node.py`
- [Web Video Server](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/web_video_server-ros2/web_video_server-ros2/src/web_video_server.cpp): `web_video_server-ros2/web_video_server-ros2/src/web_video_server.cpp`

### Robot and Control

- [Circle Controller](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/topic_practice_ws/src/turtle_draw/turtle_draw/draw_circle.py): `topic_practice_ws/src/turtle_draw/turtle_draw/draw_circle.py`
- **Turtlesim**
- [Wheeltec Base](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/turn_on_wheeltec_robot/src/wheeltec_robot.cpp): `turn_on_wheeltec_robot/src/wheeltec_robot.cpp`
- [IMU Processor](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/turn_on_wheeltec_robot/src/ImuProcessor.cpp): `turn_on_wheeltec_robot/src/ImuProcessor.cpp`

### Status Interface

- [Status Publisher](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/topic_practice_ws/src/status_publisher/status_publisher/sys_status_pub.py): `topic_practice_ws/src/status_publisher/status_publisher/sys_status_pub.py`
- [Status Display](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/topic_practice_ws/src/status_display/src/sys_status_display.cpp): `topic_practice_ws/src/status_display/src/sys_status_display.cpp`
- **Status Topics**

### SLAM and Mapping

- [GMapping SLAM](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/slam_gmapping/src/slam_gmapping.cpp): `wheeltec_robot_slam/slam_gmapping/src/slam_gmapping.cpp`
- [Particle Mapping Core](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/openslam_gmapping/gridfastslam/gridslamprocessor.cpp): `wheeltec_robot_slam/openslam_gmapping/gridfastslam/gridslamprocessor.cpp`
- [Scan Matcher](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/openslam_gmapping/scanmatcher/scanmatcher.cpp): `wheeltec_robot_slam/openslam_gmapping/scanmatcher/scanmatcher.cpp`
- [LeGO-LOAM](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/LeGO-LOAM-SR-master/LeGO-LOAM/src/main.cpp): `wheeltec_robot_slam/LeGO-LOAM-SR-master/LeGO-LOAM/src/main.cpp`
- [LIO-SAM Optimization](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/LIO-SAM-ROS2/src/mapOptmization.cpp): `wheeltec_robot_slam/LIO-SAM-ROS2/src/mapOptmization.cpp`
- [SLAM Launchers](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/wheeltec_robot_slam/LIO-SAM-ROS2/launch/run.launch.py): `wheeltec_robot_slam/LIO-SAM-ROS2/launch/run.launch.py`

### Speech

- [Text Synthesis](https://github.com/daniel-zhang2017/ros2-robotics-projects/blob/main/tts_make_ros2/src/tts_make.cpp): `tts_make_ros2/src/tts_make.cpp`

### Other components

- **Operator**
- **Video Client**
- **Serial Controller**
- **iFlytek TTS SDK**

## Connections

- Operator → USB Camera: starts camera
- Operator → YOLO Detection: starts detection
- USB Camera → YOLO Detection: publishes images
- YOLO Detection → Person Alert: annotated images
- Operator → Person Alert: starts alert
- Operator → Web Video Server: starts streaming
- Web Video Server → Video Client: serves image streams
- Operator → Status Publisher: runs publisher
- Status Publisher → Status Topics: publishes status
- Status Topics → Status Display: delivers status
- Operator → Status Display: runs display
- Operator → Circle Controller: runs controller
- Circle Controller → Turtlesim: publishes velocity
- Operator → Wheeltec Base: starts robot driver
- Wheeltec Base → Serial Controller: sends commands
- Serial Controller → Wheeltec Base: returns telemetry
- Wheeltec Base → IMU Processor: robot sensor data
- Operator → Text Synthesis: requests synthesis
- Text Synthesis → iFlytek TTS SDK: synthesizes speech
- Operator → SLAM Launchers: launches mapping
- SLAM Launchers → GMapping SLAM: starts node
- GMapping SLAM → Particle Mapping Core: processes scans
- Particle Mapping Core → Scan Matcher: registers scans
- Operator → LeGO-LOAM: runs SLAM
- Operator → LIO-SAM Optimization: runs SLAM
