# qxhhhq/sentrymaster2026 architecture

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

- Interactive diagram: https://gitdiagram.com/qxhhhq/sentrymaster2026
- Repository: https://github.com/qxhhhq/sentrymaster2026

## Overview

This is a ROS 2 sentry-robot workspace. Its documented workflow takes Odin1 odometry and sensor data, combines robot state and referee inputs in decision and planning nodes, then routes control topics through the USB/UART driver to chassis electronics. Supporting branches cover Odin1 configuration and point-cloud/depth processing, shared ROS message interfaces, and robot launch orchestration. The README documents several cross-package flows; unsampled implementation details are represented only where the tree supports a path, and launch inclusion does not imply currently enabled nodes.

Main entry points: [`src/odin_ros_driver/src/host_sdk_sample.cpp`](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/host_sdk_sample.cpp) (Odin1 driver), [`src/uartdriver/src/uart_driver_node.cpp`](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/uartdriver/src/uart_driver_node.cpp) (UART driver node), [`src/sentry_planner/src/sentry_planner_node.cpp`](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_planner/src/sentry_planner_node.cpp) (Planner node), [`src/sentry_decision_sys/sentry_decision_sys/decision_node.py`](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_decision_sys/sentry_decision_sys/decision_node.py) (Decision node)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Odin1 sensing"]
  node_odin["Odin1 driver"]
  node_lidar_api["LiDAR device API<br/>[lidar_api.h]"]
  node_lidar_types["LiDAR data types<br/>[lidar_api_type.h]"]
  node_yaml_config["Device configuration<br/>[yaml_parser.cpp]"]
  node_binary_log["Binary data logging<br/>[data_logger.h]"]
  node_cloud_render["Raw cloud rendering<br/>[rawCloudRender.cpp]"]
  node_camera_model["Camera model"]
  node_cloud_reprojection["Cloud reprojection"]
  node_depth_conversion["Cloud-to-depth"]
  node_depth_node["Depth image node"]
end

subgraph group_behavior["Decision and planning"]
  node_decision["Decision node<br/>[decision_node.py]"]
  node_planner["Planner node"]
  node_map[("Navigation maps")]
end

subgraph group_interfaces["Robot interfaces"]
  node_messages["ROS message interfaces"]
  node_uart_node["UART driver node"]
  node_serial["Serial transport<br/>[serial.cc]"]
  node_transfer["Serial transfer<br/>[transfer.cpp]"]
end

subgraph group_runtime["Runtime integration"]
  node_launch["Chassis launch<br/>[chassis.launch.py]"]
  node_planner_launch["Planner launch"]
  node_odin_launch["Odin1 launch"]
  node_uart_launch["UART launch<br/>[driver.launch.py]"]
end

node_electronics(("Chassis electronics"))
node_referee(("Referee system"))
node_robot(("Robot sensors"))

node_robot -->|"supplies sensor data"| node_odin
node_odin -->|"publishes odometry"| node_decision
node_odin -->|"publishes odometry"| node_planner
node_referee -->|"provides referee data"| node_decision
node_referee -->|"provides referee data"| node_planner
node_decision -->|"issues navigation commands"| node_planner
node_decision -->|"issues posture commands"| node_uart_node
node_planner -->|"issues speed commands"| node_uart_node
node_uart_node -->|"sends chassis control"| node_electronics
node_uart_node -->|"publishes chassis data"| node_decision
node_uart_node -->|"publishes chassis data"| node_planner
node_decision -->|"uses ROS interfaces"| node_messages
node_planner -->|"uses chassis interface"| node_messages
node_uart_node -->|"uses ROS interfaces"| node_messages
node_odin -->|"uses device API"| node_lidar_api
node_lidar_api -->|"uses data types"| node_lidar_types
node_odin -->|"loads configuration"| node_yaml_config
node_odin -->|"records streams"| node_binary_log
node_odin -->|"renders raw clouds"| node_cloud_render
node_odin -.->|"provides sensor streams"| node_cloud_reprojection
node_cloud_reprojection -.->|"uses camera model"| node_camera_model
node_odin -.->|"provides point clouds"| node_depth_conversion
node_depth_conversion -.->|"feeds depth images"| node_depth_node
node_uart_node -.->|"transfers serial data"| node_transfer
node_transfer -.->|"uses serial transport"| node_serial
node_launch -->|"includes planner"| node_planner_launch
node_launch -->|"starts decision node"| node_decision
node_launch -.->|"references UART launch"| node_uart_launch
node_launch -.->|"references Odin1 launch"| node_odin_launch
node_planner_launch -.->|"starts planner"| node_planner
node_odin_launch -.->|"starts driver"| node_odin
node_uart_launch -.->|"starts driver"| node_uart_node
node_map -.->|"supports navigation"| node_planner

click node_odin "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/host_sdk_sample.cpp"
click node_lidar_api "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/include/lidar_api.h"
click node_lidar_types "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/include/lidar_api_type.h"
click node_yaml_config "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/yaml_parser.cpp"
click node_binary_log "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/include/data_logger.h"
click node_cloud_render "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/rawCloudRender.cpp"
click node_camera_model "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/include/polynomial_camera.hpp"
click node_cloud_reprojection "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/cloud_reprojection_ros.cpp"
click node_depth_conversion "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/pointcloud_depth_converter.cpp"
click node_depth_node "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/depth_image_ros2_node.cpp"
click node_decision "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_decision_sys/sentry_decision_sys/decision_node.py"
click node_planner "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_planner/src/sentry_planner_node.cpp"
click node_map "https://github.com/qxhhhq/sentrymaster2026/tree/main/src/sentry_planner"
click node_messages "https://github.com/qxhhhq/sentrymaster2026/tree/main/src/rm_msgs"
click node_uart_node "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/uartdriver/src/uart_driver_node.cpp"
click node_serial "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/uartdriver/src/serial.cc"
click node_transfer "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/uartdriver/src/transfer.cpp"
click node_launch "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_launch/launch/chassis.launch.py"
click node_planner_launch "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_planner/launch/global_planning.launch.py"
click node_odin_launch "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/launch_ROS2/odin1_ros2.launch.py"
click node_uart_launch "https://github.com/qxhhhq/sentrymaster2026/blob/main/src/uartdriver/launch/driver.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_odin,node_lidar_api,node_lidar_types,node_yaml_config,node_binary_log,node_cloud_render,node_camera_model,node_cloud_reprojection,node_depth_conversion,node_depth_node toneBlue
class node_decision,node_planner,node_map toneAmber
class node_messages,node_uart_node,node_serial,node_transfer toneMint
class node_launch,node_planner_launch,node_odin_launch,node_uart_launch toneRose
class node_electronics,node_referee,node_robot toneIndigo
```

## Components

### Odin1 sensing

- [Odin1 driver](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/host_sdk_sample.cpp): `src/odin_ros_driver/src/host_sdk_sample.cpp`
- [LiDAR device API](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/include/lidar_api.h): `src/odin_ros_driver/include/lidar_api.h`
- [LiDAR data types](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/include/lidar_api_type.h): `src/odin_ros_driver/include/lidar_api_type.h`
- [Device configuration](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/yaml_parser.cpp): `src/odin_ros_driver/src/yaml_parser.cpp`
- [Binary data logging](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/include/data_logger.h): `src/odin_ros_driver/include/data_logger.h`
- [Raw cloud rendering](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/rawCloudRender.cpp): `src/odin_ros_driver/src/rawCloudRender.cpp`
- [Camera model](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/include/polynomial_camera.hpp): `src/odin_ros_driver/include/polynomial_camera.hpp`
- [Cloud reprojection](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/cloud_reprojection_ros.cpp): `src/odin_ros_driver/src/cloud_reprojection_ros.cpp`
- [Cloud-to-depth](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/pointcloud_depth_converter.cpp): `src/odin_ros_driver/src/pointcloud_depth_converter.cpp`
- [Depth image node](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/src/depth_image_ros2_node.cpp): `src/odin_ros_driver/src/depth_image_ros2_node.cpp`

### Decision and planning

- [Decision node](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_decision_sys/sentry_decision_sys/decision_node.py): `src/sentry_decision_sys/sentry_decision_sys/decision_node.py`
- [Planner node](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_planner/src/sentry_planner_node.cpp): `src/sentry_planner/src/sentry_planner_node.cpp`
- [Navigation maps](https://github.com/qxhhhq/sentrymaster2026/tree/main/src/sentry_planner): `src/sentry_planner`

### Robot interfaces

- [ROS message interfaces](https://github.com/qxhhhq/sentrymaster2026/tree/main/src/rm_msgs): `src/rm_msgs`
- [UART driver node](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/uartdriver/src/uart_driver_node.cpp): `src/uartdriver/src/uart_driver_node.cpp`
- [Serial transport](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/uartdriver/src/serial.cc): `src/uartdriver/src/serial.cc`
- [Serial transfer](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/uartdriver/src/transfer.cpp): `src/uartdriver/src/transfer.cpp`

### Runtime integration

- [Chassis launch](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_launch/launch/chassis.launch.py): `src/sentry_launch/launch/chassis.launch.py`
- [Planner launch](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/sentry_planner/launch/global_planning.launch.py): `src/sentry_planner/launch/global_planning.launch.py`
- [Odin1 launch](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/odin_ros_driver/launch_ROS2/odin1_ros2.launch.py): `src/odin_ros_driver/launch_ROS2/odin1_ros2.launch.py`
- [UART launch](https://github.com/qxhhhq/sentrymaster2026/blob/main/src/uartdriver/launch/driver.launch.py): `src/uartdriver/launch/driver.launch.py`

### Other components

- **Chassis electronics**
- **Referee system**
- **Robot sensors**

## Connections

- Robot sensors → Odin1 driver: supplies sensor data
- Odin1 driver → Decision node: publishes odometry
- Odin1 driver → Planner node: publishes odometry
- Referee system → Decision node: provides referee data
- Referee system → Planner node: provides referee data
- Decision node → Planner node: issues navigation commands
- Decision node → UART driver node: issues posture commands
- Planner node → UART driver node: issues speed commands
- UART driver node → Chassis electronics: sends chassis control
- UART driver node → Decision node: publishes chassis data
- UART driver node → Planner node: publishes chassis data
- Decision node → ROS message interfaces: uses ROS interfaces
- Planner node → ROS message interfaces: uses chassis interface
- UART driver node → ROS message interfaces: uses ROS interfaces
- Odin1 driver → LiDAR device API: uses device API (evidence: `src/odin_ros_driver/src/host_sdk_sample.cpp`)
- LiDAR device API → LiDAR data types: uses data types (evidence: `src/odin_ros_driver/include/lidar_api.h`)
- Odin1 driver → Device configuration: loads configuration (evidence: `src/odin_ros_driver/src/host_sdk_sample.cpp`)
- Odin1 driver → Binary data logging: records streams
- Odin1 driver → Raw cloud rendering: renders raw clouds (evidence: `src/odin_ros_driver/src/host_sdk_sample.cpp`)
- Odin1 driver → Cloud reprojection: provides sensor streams
- Cloud reprojection → Camera model: uses camera model
- Odin1 driver → Cloud-to-depth: provides point clouds
- Cloud-to-depth → Depth image node: feeds depth images
- UART driver node → Serial transfer: transfers serial data
- Serial transfer → Serial transport: uses serial transport
- Chassis launch → Planner launch: includes planner (evidence: `src/sentry_launch/launch/chassis.launch.py`)
- Chassis launch → Decision node: starts decision node (evidence: `src/sentry_launch/launch/chassis.launch.py`)
- Chassis launch → UART launch: references UART launch (evidence: `src/sentry_launch/launch/chassis.launch.py`)
- Chassis launch → Odin1 launch: references Odin1 launch (evidence: `src/sentry_launch/launch/chassis.launch.py`)
- Planner launch → Planner node: starts planner
- Odin1 launch → Odin1 driver: starts driver
- UART launch → UART driver node: starts driver
- Navigation maps → Planner node: supports navigation (evidence: `src/sentry_planner/src/sentry_planner_node.cpp`)
