# yueyangwu380-alt/originbot_code architecture

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

- Interactive diagram: https://gitdiagram.com/yueyangwu380-alt/originbot_code
- Repository: https://github.com/yueyangwu380-alt/originbot_code

## Overview

OriginBot is a ROS 2 robot application spanning a Humble physical robot and a Jazzy desktop. The principal documented workflow brings up robot sensors and motion interfaces, builds maps on the desktop, then uses frontier exploration to send Nav2 goals and save a completed map. Separate branches provide camera-based cat detection, body/gesture control, and desktop visualization. The graph combines README-documented interactions with sampled source; relationships inside unsampled packages are omitted where wiring is not established.

Main entry points: [`my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_explorer.py`](https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_explorer.py) (Frontier explorer), [`official/desktop_jazzy/originbot_navigation/launch/nav2_carto.py`](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_navigation/launch/nav2_carto.py) (Nav2 navigation), [`my_code/originbot_autonomous_mapping/launch/autonomous_mapping.launch.py`](https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/launch/autonomous_mapping.launch.py) (Mapping launch), [`official/robot_humble/originbot_bringup/launch/originbot.launch.py`](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_bringup/launch/originbot.launch.py) (Robot bringup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_robot["Robot runtime"]
  node_base["Base and odometry<br/>[originbot_base.cpp]"]
  node_lidar["VP100 lidar"]
  node_bringup["Robot bringup"]
  node_buzzer["Robot buzzer<br/>[control_buzzer.py]"]
  node_robot_motion["Robot motion interface<br/>[originbot_base.cpp]"]
end

subgraph group_mapping["Mapping and navigation"]
  node_slam["SLAM mapping"]
  node_nav2["Nav2 navigation<br/>[nav2_carto.py]"]
  node_explorer["Frontier explorer"]
  node_frontier["Frontier policy<br/>[frontier_core.py]"]
  node_map_save["Automatic map saving"]
  node_mapping_launch["Mapping launch"]
end

subgraph group_perception["Perception and control"]
  node_camera["Camera pipeline<br/>[camera.launch.py]"]
  node_cat_buzzer["Cat confirmation buzzer<br/>[cat_buzzer.py]"]
  node_body_tracking["Body tracking<br/>[body_tracking.cpp]"]
  node_gesture["Gesture control"]
  node_line_follow["Line following"]
end

subgraph group_desktop["Desktop tools"]
  node_desktop_ui["Robot desktop UI<br/>[mainwindow.cpp]"]
  node_rviz["RViz visualization"]
  node_gazebo["Gazebo simulation"]
  node_nav_goal["Goal sender<br/>[send_goal_node.cpp]"]
end

node_operator(("Robot operator"))
node_network["ROS 2 DDS network"]
node_saved_map["Saved occupancy map"]

node_operator -->|"starts robot"| node_bringup
node_bringup -->|"starts base"| node_base
node_bringup -->|"starts lidar"| node_lidar
node_base -->|"publishes robot state"| node_network
node_lidar -->|"publishes scans"| node_network
node_network -->|"provides sensor data"| node_slam
node_slam -->|"provides map"| node_nav2
node_mapping_launch -->|"starts SLAM"| node_slam
node_mapping_launch -->|"starts navigation"| node_nav2
node_mapping_launch -->|"starts explorer"| node_explorer
node_explorer -->|"uses policy"| node_frontier
node_explorer -->|"sends goals"| node_nav2
node_explorer -->|"requests map saving"| node_map_save
node_map_save -->|"writes map"| node_saved_map
node_nav2 -->|"commands robot"| node_network
node_network -->|"delivers motion commands"| node_robot_motion
node_camera -.->|"provides detections"| node_cat_buzzer
node_cat_buzzer -.->|"sounds on cat confirmation"| node_buzzer
node_body_tracking -.->|"tracks people"| node_network
node_gesture -.->|"sends motion control"| node_robot_motion
node_line_follow -.->|"controls following"| node_robot_motion
node_operator -.->|"views robot"| node_desktop_ui
node_desktop_ui -.->|"exchanges ROS data"| node_network
node_operator -->|"views navigation"| node_rviz
node_operator -.->|"runs simulation"| node_gazebo
node_operator -.->|"submits goal"| node_nav_goal

click node_base "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_base/src/originbot_base.cpp"
click node_lidar "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_driver/vp100_ros2/src/vp100_ros2_node.cpp"
click node_bringup "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_bringup/launch/originbot.launch.py"
click node_slam "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_navigation/launch/cartographer_gazebo.launch.py"
click node_nav2 "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_navigation/launch/nav2_carto.py"
click node_explorer "https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_explorer.py"
click node_frontier "https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_core.py"
click node_map_save "https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/launch/autonomous_mapping.launch.py"
click node_mapping_launch "https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/launch/autonomous_mapping.launch.py"
click node_camera "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_bringup/launch/camera.launch.py"
click node_cat_buzzer "https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_vision/originbot_vision/cat_buzzer.py"
click node_body_tracking "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_deeplearning/body_tracking/src/body_tracking.cpp"
click node_gesture "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_deeplearning/gesture_control/src/gesture_control_engine.cpp"
click node_line_follow "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_deeplearning/line_follower_perception/src/line_follower_perception.cpp"
click node_desktop_ui "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_app/src/mainwindow.cpp"
click node_rviz "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_viz/launch/display_navigation.launch.py"
click node_gazebo "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_gazebo/launch/originbot_navigation_gazebo.launch.py"
click node_nav_goal "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_example/originbot_send_goal/src/send_goal_node.cpp"
click node_buzzer "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_demo/originbot_demo/control_buzzer.py"
click node_robot_motion "https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_base/src/originbot_base.cpp"

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_base,node_lidar,node_bringup,node_buzzer,node_robot_motion toneBlue
class node_slam,node_nav2,node_explorer,node_frontier,node_map_save,node_mapping_launch toneAmber
class node_camera,node_cat_buzzer,node_body_tracking,node_gesture,node_line_follow toneMint
class node_desktop_ui,node_rviz,node_gazebo,node_nav_goal toneRose
class node_operator,node_network,node_saved_map toneIndigo
```

## Components

### Robot runtime

- [Base and odometry](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_base/src/originbot_base.cpp): `official/robot_humble/originbot_base/src/originbot_base.cpp`
- [VP100 lidar](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_driver/vp100_ros2/src/vp100_ros2_node.cpp): `official/robot_humble/originbot_driver/vp100_ros2/src/vp100_ros2_node.cpp`
- [Robot bringup](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_bringup/launch/originbot.launch.py): `official/robot_humble/originbot_bringup/launch/originbot.launch.py`
- [Robot buzzer](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_demo/originbot_demo/control_buzzer.py): `official/robot_humble/originbot_demo/originbot_demo/control_buzzer.py`
- [Robot motion interface](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_base/src/originbot_base.cpp): `official/robot_humble/originbot_base/src/originbot_base.cpp`

### Mapping and navigation

- [SLAM mapping](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_navigation/launch/cartographer_gazebo.launch.py): `official/desktop_jazzy/originbot_navigation/launch/cartographer_gazebo.launch.py`
- [Nav2 navigation](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_navigation/launch/nav2_carto.py): `official/desktop_jazzy/originbot_navigation/launch/nav2_carto.py`
- [Frontier explorer](https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_explorer.py): `my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_explorer.py`
- [Frontier policy](https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_core.py): `my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_core.py`
- [Automatic map saving](https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/launch/autonomous_mapping.launch.py): `my_code/originbot_autonomous_mapping/launch/autonomous_mapping.launch.py`
- [Mapping launch](https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_autonomous_mapping/launch/autonomous_mapping.launch.py): `my_code/originbot_autonomous_mapping/launch/autonomous_mapping.launch.py`

### Perception and control

- [Camera pipeline](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_bringup/launch/camera.launch.py): `official/robot_humble/originbot_bringup/launch/camera.launch.py`
- [Cat confirmation buzzer](https://github.com/yueyangwu380-alt/originbot_code/blob/main/my_code/originbot_vision/originbot_vision/cat_buzzer.py): `my_code/originbot_vision/originbot_vision/cat_buzzer.py`
- [Body tracking](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_deeplearning/body_tracking/src/body_tracking.cpp): `official/robot_humble/originbot_deeplearning/body_tracking/src/body_tracking.cpp`
- [Gesture control](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_deeplearning/gesture_control/src/gesture_control_engine.cpp): `official/robot_humble/originbot_deeplearning/gesture_control/src/gesture_control_engine.cpp`
- [Line following](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_deeplearning/line_follower_perception/src/line_follower_perception.cpp): `official/robot_humble/originbot_deeplearning/line_follower_perception/src/line_follower_perception.cpp`

### Desktop tools

- [Robot desktop UI](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_app/src/mainwindow.cpp): `official/desktop_jazzy/originbot_app/src/mainwindow.cpp`
- [RViz visualization](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_viz/launch/display_navigation.launch.py): `official/desktop_jazzy/originbot_viz/launch/display_navigation.launch.py`
- [Gazebo simulation](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/desktop_jazzy/originbot_gazebo/launch/originbot_navigation_gazebo.launch.py): `official/desktop_jazzy/originbot_gazebo/launch/originbot_navigation_gazebo.launch.py`
- [Goal sender](https://github.com/yueyangwu380-alt/originbot_code/blob/main/official/robot_humble/originbot_example/originbot_send_goal/src/send_goal_node.cpp): `official/robot_humble/originbot_example/originbot_send_goal/src/send_goal_node.cpp`

### Other components

- **Robot operator**
- **ROS 2 DDS network**
- **Saved occupancy map**

## Connections

- Robot operator → Robot bringup: starts robot (evidence: `README.md`)
- Robot bringup → Base and odometry: starts base (evidence: `README.md`)
- Robot bringup → VP100 lidar: starts lidar (evidence: `README.md`)
- Base and odometry → ROS 2 DDS network: publishes robot state (evidence: `README.md`)
- VP100 lidar → ROS 2 DDS network: publishes scans (evidence: `README.md`)
- ROS 2 DDS network → SLAM mapping: provides sensor data (evidence: `README.md`)
- SLAM mapping → Nav2 navigation: provides map (evidence: `README.md`)
- Mapping launch → SLAM mapping: starts SLAM (evidence: `README.md`)
- Mapping launch → Nav2 navigation: starts navigation (evidence: `README.md`)
- Mapping launch → Frontier explorer: starts explorer (evidence: `README.md`)
- Frontier explorer → Frontier policy: uses policy (evidence: `my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_explorer.py`)
- Frontier explorer → Nav2 navigation: sends goals (evidence: `my_code/originbot_autonomous_mapping/originbot_autonomous_mapping/frontier_explorer.py`)
- Frontier explorer → Automatic map saving: requests map saving (evidence: `README.md`)
- Automatic map saving → Saved occupancy map: writes map (evidence: `README.md`)
- Nav2 navigation → ROS 2 DDS network: commands robot (evidence: `README.md`)
- ROS 2 DDS network → Robot motion interface: delivers motion commands (evidence: `README.md`)
- Camera pipeline → Cat confirmation buzzer: provides detections (evidence: `README.md`)
- Cat confirmation buzzer → Robot buzzer: sounds on cat confirmation (evidence: `README.md`)
- Body tracking → ROS 2 DDS network: tracks people
- Gesture control → Robot motion interface: sends motion control
- Line following → Robot motion interface: controls following
- Robot operator → Robot desktop UI: views robot
- Robot desktop UI → ROS 2 DDS network: exchanges ROS data
- Robot operator → RViz visualization: views navigation (evidence: `README.md`)
- Robot operator → Gazebo simulation: runs simulation
- Robot operator → Goal sender: submits goal
