# ericahn03/ds685-assignments architecture

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

- Interactive diagram: https://gitdiagram.com/ericahn03/ds685-assignments
- Repository: https://github.com/ericahn03/ds685-assignments

## Overview

This repository provides TurtleBot navigation and object-search demos, plus standalone vision, SLAM, and semantic-mapping services. In the primary workflow, a behavior-tree autonomy node selects a location, sends a Nav2 goal, then checks for a target using HSV vision or Zenoh-delivered YOLO detections. Separately, camera data supports SLAM and detection streams can be turned into a persistent semantic map and logged or queried. The README documents the service-level architecture; source excerpts show autonomy behavior registration and semantic-graph processing, but several integration details are unsampled.

Main entry points: [`detector/graph_builder.py`](https://github.com/ericahn03/ds685-assignments/blob/main/detector/graph_builder.py) (Semantic Graph Builder), [`tb_autonomy/scripts/autonomy_node.py`](https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/scripts/autonomy_node.py) (Python Autonomy), [`tb_autonomy/python/tb_behaviors/vision.py`](https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/python/tb_behaviors/vision.py) (Vision Behavior), [`slam/slam_bridge.py`](https://github.com/ericahn03/ds685-assignments/blob/main/slam/slam_bridge.py) (SLAM Bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_autonomy["Robot Autonomy"]
  node_py_autonomy["Python Autonomy<br/>[autonomy_node.py]"]
  node_cpp_autonomy["C++ Autonomy<br/>[autonomy_node.cpp]"]
  node_py_navigation["Navigation Behaviors<br/>[navigation.py]"]
  node_cpp_navigation["Navigation Behaviors"]
  node_py_vision["Vision Behavior<br/>[vision.py]"]
  node_cpp_vision["Vision Behavior"]
  node_zenoh_sub["Detection Subscriber"]
end

subgraph group_perception["Vision and Mapping"]
  node_detector["YOLO Detector<br/>[object_detector.py]"]
  node_slam_bridge["SLAM Bridge<br/>[slam_bridge.py]"]
  node_slam_engine["SLAM Engine<br/>[run_slam.cc]"]
  node_embedding_ingest["Embedding Ingest"]
  node_graph_builder["Semantic Graph Builder<br/>[graph_builder.py]"]
  node_place_clustering["Place Clustering<br/>[online_dbscan.py]"]
  node_landmark_fusion["Landmark Fusion<br/>[landmark_fusion.py]"]
end

subgraph group_data["Data and Queries"]
  node_semantic_db[("Semantic Graph")]
  node_detection_logger["Zenoh Logger<br/>[zenoh_logger.py]"]
  node_detection_query["Detection Queries"]
  node_semantic_query["Semantic Queries"]
  node_semantic_plot["Semantic Map Plotter"]
  node_detection_data[("Detection Logs")]
  node_slam_data[("SLAM Logs")]
end

subgraph group_simulation["Simulation and Transport"]
  node_zenoh["Zenoh Transport"]
  node_gazebo["Gazebo Worlds"]
end

node_operator(("Demo Operator"))
node_nav2["Nav2"]
node_camera["Camera Images"]
node_robot["TurtleBot"]

node_operator -->|"starts demo"| node_py_autonomy
node_py_autonomy -->|"uses"| node_py_navigation
node_py_autonomy -->|"uses"| node_py_vision
node_cpp_autonomy -->|"registers"| node_cpp_navigation
node_cpp_autonomy -->|"registers"| node_cpp_vision
node_py_navigation -->|"sends goals"| node_nav2
node_cpp_navigation -->|"wraps action"| node_nav2
node_py_vision -->|"subscribes"| node_camera
node_cpp_vision -->|"subscribes"| node_camera
node_py_vision -.->|"reads detections"| node_zenoh_sub
node_camera -->|"bridges images"| node_zenoh
node_zenoh -->|"streams images"| node_detector
node_detector -->|"publishes detections"| node_zenoh
node_zenoh -->|"delivers detections"| node_zenoh_sub
node_camera -->|"streams images"| node_slam_bridge
node_slam_bridge -->|"invokes"| node_slam_engine
node_slam_bridge -->|"publishes poses"| node_zenoh
node_graph_builder -->|"uses"| node_place_clustering
node_graph_builder -->|"uses"| node_landmark_fusion
node_zenoh -.->|"streams detections"| node_graph_builder
node_graph_builder -->|"writes graph"| node_semantic_db
node_embedding_ingest -.->|"optional integration"| node_zenoh
node_detection_logger -->|"subscribes"| node_zenoh
node_detection_logger -->|"appends logs"| node_detection_data
node_detection_query -->|"queries logs"| node_detection_data
node_semantic_query -.->|"queries graph"| node_semantic_db
node_semantic_plot -.->|"visualizes map"| node_semantic_db
node_zenoh -->|"logs poses"| node_slam_data
node_gazebo -->|"provides images"| node_camera
node_nav2 -->|"navigates"| node_robot

click node_py_autonomy "https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/scripts/autonomy_node.py"
click node_cpp_autonomy "https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/src/autonomy_node.cpp"
click node_py_navigation "https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/python/tb_behaviors/navigation.py"
click node_cpp_navigation "https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/src/navigation_behaviors.cpp"
click node_py_vision "https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/python/tb_behaviors/vision.py"
click node_cpp_vision "https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/src/vision_behaviors.cpp"
click node_zenoh_sub "https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/scripts/zenoh_detection_sub.py"
click node_detector "https://github.com/ericahn03/ds685-assignments/blob/main/detector/object_detector.py"
click node_slam_bridge "https://github.com/ericahn03/ds685-assignments/blob/main/slam/slam_bridge.py"
click node_slam_engine "https://github.com/ericahn03/ds685-assignments/blob/main/slam/run_slam.cc"
click node_embedding_ingest "https://github.com/ericahn03/ds685-assignments/blob/main/detector/embedding_ingest.py"
click node_graph_builder "https://github.com/ericahn03/ds685-assignments/blob/main/detector/graph_builder.py"
click node_place_clustering "https://github.com/ericahn03/ds685-assignments/blob/main/detector/online_dbscan.py"
click node_landmark_fusion "https://github.com/ericahn03/ds685-assignments/blob/main/detector/landmark_fusion.py"
click node_detection_logger "https://github.com/ericahn03/ds685-assignments/blob/main/detector/zenoh_logger.py"
click node_detection_query "https://github.com/ericahn03/ds685-assignments/blob/main/detector/query_detections.py"
click node_semantic_query "https://github.com/ericahn03/ds685-assignments/blob/main/detector/query_semantic_db.py"
click node_semantic_plot "https://github.com/ericahn03/ds685-assignments/blob/main/detector/plot_semantic_map.py"
click node_detection_data "https://github.com/ericahn03/ds685-assignments/tree/main/data/detections"
click node_slam_data "https://github.com/ericahn03/ds685-assignments/tree/main/data/slam"
click node_gazebo "https://github.com/ericahn03/ds685-assignments/tree/main/tb_worlds"

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_py_autonomy,node_cpp_autonomy,node_py_navigation,node_cpp_navigation,node_py_vision,node_cpp_vision,node_zenoh_sub toneBlue
class node_detector,node_slam_bridge,node_slam_engine,node_embedding_ingest,node_graph_builder,node_place_clustering,node_landmark_fusion toneAmber
class node_semantic_db,node_detection_logger,node_detection_query,node_semantic_query,node_semantic_plot,node_detection_data,node_slam_data toneMint
class node_zenoh,node_gazebo toneRose
class node_operator,node_nav2,node_camera,node_robot toneIndigo
```

## Components

### Robot Autonomy

- [Python Autonomy](https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/scripts/autonomy_node.py): `tb_autonomy/scripts/autonomy_node.py`
- [C++ Autonomy](https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/src/autonomy_node.cpp): `tb_autonomy/src/autonomy_node.cpp`
- [Navigation Behaviors](https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/python/tb_behaviors/navigation.py): `tb_autonomy/python/tb_behaviors/navigation.py`
- [Navigation Behaviors](https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/src/navigation_behaviors.cpp): `tb_autonomy/src/navigation_behaviors.cpp`
- [Vision Behavior](https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/python/tb_behaviors/vision.py): `tb_autonomy/python/tb_behaviors/vision.py`
- [Vision Behavior](https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/src/vision_behaviors.cpp): `tb_autonomy/src/vision_behaviors.cpp`
- [Detection Subscriber](https://github.com/ericahn03/ds685-assignments/blob/main/tb_autonomy/scripts/zenoh_detection_sub.py): `tb_autonomy/scripts/zenoh_detection_sub.py`

### Vision and Mapping

- [YOLO Detector](https://github.com/ericahn03/ds685-assignments/blob/main/detector/object_detector.py): `detector/object_detector.py`
- [SLAM Bridge](https://github.com/ericahn03/ds685-assignments/blob/main/slam/slam_bridge.py): `slam/slam_bridge.py`
- [SLAM Engine](https://github.com/ericahn03/ds685-assignments/blob/main/slam/run_slam.cc): `slam/run_slam.cc`
- [Embedding Ingest](https://github.com/ericahn03/ds685-assignments/blob/main/detector/embedding_ingest.py): `detector/embedding_ingest.py`
- [Semantic Graph Builder](https://github.com/ericahn03/ds685-assignments/blob/main/detector/graph_builder.py): `detector/graph_builder.py`
- [Place Clustering](https://github.com/ericahn03/ds685-assignments/blob/main/detector/online_dbscan.py): `detector/online_dbscan.py`
- [Landmark Fusion](https://github.com/ericahn03/ds685-assignments/blob/main/detector/landmark_fusion.py): `detector/landmark_fusion.py`

### Data and Queries

- **Semantic Graph**
- [Zenoh Logger](https://github.com/ericahn03/ds685-assignments/blob/main/detector/zenoh_logger.py): `detector/zenoh_logger.py`
- [Detection Queries](https://github.com/ericahn03/ds685-assignments/blob/main/detector/query_detections.py): `detector/query_detections.py`
- [Semantic Queries](https://github.com/ericahn03/ds685-assignments/blob/main/detector/query_semantic_db.py): `detector/query_semantic_db.py`
- [Semantic Map Plotter](https://github.com/ericahn03/ds685-assignments/blob/main/detector/plot_semantic_map.py): `detector/plot_semantic_map.py`
- [Detection Logs](https://github.com/ericahn03/ds685-assignments/tree/main/data/detections): `data/detections`
- [SLAM Logs](https://github.com/ericahn03/ds685-assignments/tree/main/data/slam): `data/slam`

### Simulation and Transport

- **Zenoh Transport**
- [Gazebo Worlds](https://github.com/ericahn03/ds685-assignments/tree/main/tb_worlds): `tb_worlds`

### Other components

- **Demo Operator**
- **Nav2**
- **Camera Images**
- **TurtleBot**

## Connections

- Demo Operator → Python Autonomy: starts demo
- Python Autonomy → Navigation Behaviors: uses (evidence: `tb_autonomy/scripts/autonomy_node.py`)
- Python Autonomy → Vision Behavior: uses (evidence: `tb_autonomy/scripts/autonomy_node.py`)
- C++ Autonomy → Navigation Behaviors: registers (evidence: `tb_autonomy/src/autonomy_node.cpp`)
- C++ Autonomy → Vision Behavior: registers (evidence: `tb_autonomy/src/autonomy_node.cpp`)
- Navigation Behaviors → Nav2: sends goals (evidence: `tb_autonomy/python/tb_behaviors/navigation.py`)
- Navigation Behaviors → Nav2: wraps action (evidence: `tb_autonomy/src/navigation_behaviors.cpp`)
- Vision Behavior → Camera Images: subscribes (evidence: `tb_autonomy/python/tb_behaviors/vision.py`)
- Vision Behavior → Camera Images: subscribes (evidence: `tb_autonomy/src/vision_behaviors.cpp`)
- Vision Behavior → Detection Subscriber: reads detections
- Camera Images → Zenoh Transport: bridges images
- Zenoh Transport → YOLO Detector: streams images
- YOLO Detector → Zenoh Transport: publishes detections
- Zenoh Transport → Detection Subscriber: delivers detections
- Camera Images → SLAM Bridge: streams images
- SLAM Bridge → SLAM Engine: invokes
- SLAM Bridge → Zenoh Transport: publishes poses
- Semantic Graph Builder → Place Clustering: uses (evidence: `detector/graph_builder.py`)
- Semantic Graph Builder → Landmark Fusion: uses (evidence: `detector/graph_builder.py`)
- Zenoh Transport → Semantic Graph Builder: streams detections
- Semantic Graph Builder → Semantic Graph: writes graph (evidence: `detector/graph_builder.py`)
- Embedding Ingest → Zenoh Transport: optional integration
- Zenoh Logger → Zenoh Transport: subscribes
- Zenoh Logger → Detection Logs: appends logs
- Detection Queries → Detection Logs: queries logs
- Semantic Queries → Semantic Graph: queries graph
- Semantic Map Plotter → Semantic Graph: visualizes map
- Zenoh Transport → SLAM Logs: logs poses
- Gazebo Worlds → Camera Images: provides images
- Nav2 → TurtleBot: navigates
