# roganjo/autonomous_bot architecture

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

- Interactive diagram: https://gitdiagram.com/roganjo/autonomous_bot
- Repository: https://github.com/roganjo/autonomous_bot

## Overview

Autonomous Bot is a ROS 2 two-wheel robot project: users can drive it in simulation or on hardware, use lidar to build a map, then send a goal for autonomous navigation. The graph preserves the documented simulation, teleoperation, mapping, localization, and navigation branches, plus the hardware and lidar interfaces. Source excerpts show the hardware serial interface and the lidar driver’s SDK dependency; several higher-level ROS relationships are documented only at README level, so their links cite the README.

Main entry points: [`ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp`](https://github.com/roganjo/autonomous_bot/blob/main/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp) (ROS Lidar Node), [`articubot_one/launch/navigation_launch.py`](https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/navigation_launch.py) (Navigation), [`diffbot_hardware/src/diffbot_hardware.cpp`](https://github.com/roganjo/autonomous_bot/blob/main/diffbot_hardware/src/diffbot_hardware.cpp) (Drive Interface), [`diffbot_hardware/src/serial_port.cpp`](https://github.com/roganjo/autonomous_bot/blob/main/diffbot_hardware/src/serial_port.cpp) (Serial Port)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bringup["Robot Bringup"]
  node_robot_bringup["Robot Bringup"]
  node_simulation["Simulation Launch"]
  node_teleop["Joystick Launch<br/>[joystick.launch.py]"]
  node_keyboard["Keyboard Driving"]
end

subgraph group_hardware["Drive Hardware"]
  node_diffbot_hw["Drive Interface"]
  node_serial_port["Serial Port<br/>[serial_port.cpp]"]
  node_esp32["ESP32 Drive Base"]
end

subgraph group_lidar["Lidar Stack"]
  node_lidar_launch["Lidar Launch<br/>[ydlidar_launch.py]"]
  node_lidar_node["ROS Lidar Node"]
  node_lidar_sdk["Lidar SDK API<br/>[CYdLidar.cpp]"]
  node_lidar_device["YDLIDAR Scanner"]
end

subgraph group_autonomy["Mapping and Navigation"]
  node_mapping["Online Mapping"]
  node_localization["Localization"]
  node_navigation["Navigation"]
  node_map_result["Saved Map"]
end

node_operator(("Operator"))
node_goal(("Map Goal"))

node_operator -->|"starts simulation"| node_simulation
node_operator -->|"starts robot"| node_robot_bringup
node_operator -->|"drives by joystick"| node_teleop
node_operator -->|"drives by keyboard"| node_keyboard
node_diffbot_hw -->|"uses serial"| node_serial_port
node_serial_port -->|"exchanges commands"| node_esp32
node_lidar_launch -->|"launches"| node_lidar_node
node_lidar_node -->|"uses SDK"| node_lidar_sdk
node_lidar_sdk -.->|"communicates with"| node_lidar_device
node_lidar_node -->|"provides scans"| node_mapping
node_mapping -->|"saves map"| node_map_result
node_map_result -->|"localizes against"| node_localization
node_goal -->|"sets destination"| node_navigation
node_localization -.->|"supports navigation"| node_navigation
node_navigation -.->|"drives robot"| node_diffbot_hw

click node_robot_bringup "https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/launch_robot.launch.py"
click node_simulation "https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/launch_sim.launch.py"
click node_teleop "https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/joystick.launch.py"
click node_diffbot_hw "https://github.com/roganjo/autonomous_bot/blob/main/diffbot_hardware/src/diffbot_hardware.cpp"
click node_serial_port "https://github.com/roganjo/autonomous_bot/blob/main/diffbot_hardware/src/serial_port.cpp"
click node_lidar_launch "https://github.com/roganjo/autonomous_bot/blob/main/ydlidar_ros2_driver/launch/ydlidar_launch.py"
click node_lidar_node "https://github.com/roganjo/autonomous_bot/blob/main/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp"
click node_lidar_sdk "https://github.com/roganjo/autonomous_bot/blob/main/YDLidar-SDK/src/CYdLidar.cpp"
click node_mapping "https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/online_async_launch.py"
click node_localization "https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/localization_launch.py"
click node_navigation "https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/navigation_launch.py"
click node_keyboard "https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/launch_robot.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_robot_bringup,node_simulation,node_teleop,node_keyboard toneBlue
class node_diffbot_hw,node_serial_port,node_esp32 toneAmber
class node_lidar_launch,node_lidar_node,node_lidar_sdk,node_lidar_device toneMint
class node_mapping,node_localization,node_navigation,node_map_result toneRose
class node_operator,node_goal toneIndigo
```

## Components

### Robot Bringup

- [Robot Bringup](https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/launch_robot.launch.py): `articubot_one/launch/launch_robot.launch.py`
- [Simulation Launch](https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/launch_sim.launch.py): `articubot_one/launch/launch_sim.launch.py`
- [Joystick Launch](https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/joystick.launch.py): `articubot_one/launch/joystick.launch.py`
- [Keyboard Driving](https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/launch_robot.launch.py): `articubot_one/launch/launch_robot.launch.py`

### Drive Hardware

- [Drive Interface](https://github.com/roganjo/autonomous_bot/blob/main/diffbot_hardware/src/diffbot_hardware.cpp): `diffbot_hardware/src/diffbot_hardware.cpp`
- [Serial Port](https://github.com/roganjo/autonomous_bot/blob/main/diffbot_hardware/src/serial_port.cpp): `diffbot_hardware/src/serial_port.cpp`
- **ESP32 Drive Base**

### Lidar Stack

- [Lidar Launch](https://github.com/roganjo/autonomous_bot/blob/main/ydlidar_ros2_driver/launch/ydlidar_launch.py): `ydlidar_ros2_driver/launch/ydlidar_launch.py`
- [ROS Lidar Node](https://github.com/roganjo/autonomous_bot/blob/main/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp): `ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp`
- [Lidar SDK API](https://github.com/roganjo/autonomous_bot/blob/main/YDLidar-SDK/src/CYdLidar.cpp): `YDLidar-SDK/src/CYdLidar.cpp`
- **YDLIDAR Scanner**

### Mapping and Navigation

- [Online Mapping](https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/online_async_launch.py): `articubot_one/launch/online_async_launch.py`
- [Localization](https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/localization_launch.py): `articubot_one/launch/localization_launch.py`
- [Navigation](https://github.com/roganjo/autonomous_bot/blob/main/articubot_one/launch/navigation_launch.py): `articubot_one/launch/navigation_launch.py`
- **Saved Map**

### Other components

- **Operator**
- **Map Goal**

## Connections

- Operator → Simulation Launch: starts simulation (evidence: `README.md`)
- Operator → Robot Bringup: starts robot (evidence: `README.md`)
- Operator → Joystick Launch: drives by joystick (evidence: `README.md`)
- Operator → Keyboard Driving: drives by keyboard (evidence: `README.md`)
- Drive Interface → Serial Port: uses serial (evidence: `diffbot_hardware/src/diffbot_hardware.cpp`)
- Serial Port → ESP32 Drive Base: exchanges commands (evidence: `README.md`)
- Lidar Launch → ROS Lidar Node: launches (evidence: `README.md`)
- ROS Lidar Node → Lidar SDK API: uses SDK (evidence: `ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp`)
- Lidar SDK API → YDLIDAR Scanner: communicates with
- ROS Lidar Node → Online Mapping: provides scans (evidence: `README.md`)
- Online Mapping → Saved Map: saves map (evidence: `README.md`)
- Saved Map → Localization: localizes against (evidence: `README.md`)
- Map Goal → Navigation: sets destination (evidence: `README.md`)
- Localization → Navigation: supports navigation
- Navigation → Drive Interface: drives robot
