# robotis-git/turtlebot3_simulations architecture

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

- Interactive diagram: https://gitdiagram.com/robotis-git/turtlebot3_simulations
- Repository: https://github.com/robotis-git/turtlebot3_simulations

## Overview

1. This repository is a ROS-based simulation stack for TurtleBot3. It is organized as three packages: `turtlebot3_gazebo` for the main simulator, `turtlebot3_fake_node` for a lightweight software-only stand-in, and `turtlebot3_simulations` as the top-level meta/package boundary.

2. The main runtime center is `turtlebot3_gazebo`. It packages the Gazebo simulation assets needed to instantiate a TurtleBot3 robot in multiple environments: empty world, house, DQN training stages, autorace, and a generic TurtleBot3 world.

3. `turtlebot3_gazebo` contains the robot description layer in `urdf/` and the corresponding Gazebo model assets in `models/`. The URDF files define the robot variants (`burger`, `waffle`, `waffle_pi`, and camera-equipped variants), while the SDF/model folders provide the visual and collision geometry Gazebo actually loads.

4. The simulation behavior is extended through C++ Gazebo plugins in `src/` and `include/`. These include robot driving logic (`turtlebot3_drive`), obstacle models (`obstacle1`, `obstacle2`, `obstacles`), and traffic infrastructure (`traffic_light_plugin`, `traffic_bar_plugin`). These plugins are the main code path that turns static worlds into interactive scenarios.

5. Launch files in `turtlebot3_gazebo/launch/` compose the simulation at runtime. They start Gazebo, spawn the robot, bring up robot state publishing, and select the target world. Separate launch entry points exist for training stages, house/world demos, and a generic empty world.

6. The bridge between Gazebo and ROS is parameterized through YAML files in `turtlebot3_gazebo/params/`. There are distinct bridge configurations for each robot variant, including the camera-equipped Burger. These files indicate that topic/service integration is handled per platform configuration rather than with one universal bridge setup.

7. `turtlebot3_gazebo/rviz/` provides an RViz2 configuration for visualization. This is the primary visualization boundary in the stack: Gazebo handles physics and world simulation, while RViz presents the ROS-side view of the robot state and sensors.

8. `turtlebot3_fake_node` is a separate ROS node package with its own C++ implementation, launch file, and per-robot parameter files. Architecturally, it serves as a non-Gazebo test/simulation substitute for TurtleBot3 behavior, likely useful for validating higher-level ROS interactions without the full physics environment.

9. `turtlebot3_simulations` is mostly a packaging umbrella. It has the ROS package metadata and build definition but no runtime source tree of its own, which suggests its role is to aggregate dependencies and provide a distribution anchor for the simulation packages.

10. The repository is built with standard ROS tooling: `CMakeLists.txt` and `package.xml` in each package, plus Python launch files for ROS 2-style startup orchestration. The README’s branch notes (`noetic`, `humble`, `main`) show the project is maintained across multiple ROS generations.

11. CI is first-class: `.github/workflows/ros-ci.yml` and `ros-lint.yml` indicate automated build/test and style checks across the ROS packages. This matters architecturally because the repo is structured to stay buildable as a multi-package ROS distribution, not as a single standalone library.

12. For an architecture diagram, the key flows are: launch files select a world/robot variant; Gazebo loads world SDF + robot URDF/model assets; plugins add runtime behavior and simulated interactions; ROS bridge parameters connect Gazebo-generated data to ROS topics; RViz and higher-level nodes consume the ROS-side outputs; the fake node provides an alternate lightweight simulation path when Gazebo is not used.

Main entry points: [`turtlebot3_gazebo`](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo) (turtlebot3_gazebo), [`turtlebot3_fake_node`](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_fake_node) (turtlebot3_fake_node), [`turtlebot3_gazebo/launch`](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/launch) (Launch stack), [`turtlebot3_gazebo/params`](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/params) (Bridge params)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_meta["Meta package"]
  node_node_meta_pkg["turtlebot3_simulations<br/>ROS meta-package"]
  node_node_ros2_tooling["ROS tooling<br/>Build/runtime tooling"]
end

subgraph group_group_gazebo["Gazebo sim"]
  node_node_gz_launch["Launch stack<br/>ROS launch"]
  node_node_gz_worlds["Worlds"]
  node_node_gz_urdf["URDFs<br/>Robot description"]
  node_node_gz_models[("Models<br/>Gazebo assets")]
  node_node_gz_plugins["Plugins<br/>Gazebo C++"]
  node_node_gz_headers["Plugin APIs<br/>C++ headers"]
  node_node_gz_bridge["Bridge params<br/>ROS params"]
  node_node_gz_rviz["RViz config<br/>Visualization"]
  node_node_gz_pkg["turtlebot3_gazebo<br/>ROS package"]
end

subgraph group_group_fake["Fake node"]
  node_node_fake_pkg["turtlebot3_fake_node<br/>ROS package"]
  node_node_fake_launch["Fake launch<br/>ROS launch"]
  node_node_fake_params["Fake params<br/>ROS params"]
  node_node_fake_impl["Fake runtime<br/>C++ node"]
end

subgraph group_group_ci["CI"]
  node_node_ci_build["ROS CI<br/>GitHub Actions<br/>[ros-ci.yml]"]
  node_node_ci_lint["ROS lint<br/>GitHub Actions<br/>[ros-lint.yml]"]
end

node_node_meta_pkg -->|"includes"| node_node_gz_pkg
node_node_meta_pkg -->|"includes"| node_node_fake_pkg
node_node_meta_pkg -->|"defines"| node_node_ros2_tooling
node_node_gz_pkg -->|"orchestrates"| node_node_gz_launch
node_node_gz_pkg -->|"ships"| node_node_gz_worlds
node_node_gz_pkg -->|"ships"| node_node_gz_urdf
node_node_gz_pkg -->|"ships"| node_node_gz_models
node_node_gz_pkg -->|"implements"| node_node_gz_plugins
node_node_gz_pkg -->|"configures"| node_node_gz_bridge
node_node_gz_pkg -->|"visualizes"| node_node_gz_rviz
node_node_gz_plugins -->|"uses"| node_node_gz_headers
node_node_gz_launch -->|"selects"| node_node_gz_worlds
node_node_gz_launch -->|"spawns"| node_node_gz_urdf
node_node_gz_launch -->|"loads"| node_node_gz_bridge
node_node_gz_launch -->|"activates"| node_node_gz_plugins
node_node_gz_urdf -->|"references"| node_node_gz_models
node_node_gz_models -->|"supports"| node_node_gz_plugins
node_node_gz_bridge -->|"feeds"| node_node_gz_rviz
node_node_gz_bridge -.->|"parallels"| node_node_fake_impl
node_node_fake_pkg -->|"orchestrates"| node_node_fake_launch
node_node_fake_pkg -->|"configures"| node_node_fake_params
node_node_fake_pkg -->|"implements"| node_node_fake_impl
node_node_fake_launch -->|"starts"| node_node_fake_impl
node_node_fake_launch -->|"loads"| node_node_fake_params
node_node_ci_build -->|"checks"| node_node_gz_pkg
node_node_ci_build -->|"checks"| node_node_fake_pkg
node_node_ci_lint -->|"checks"| node_node_gz_pkg
node_node_ci_lint -->|"checks"| node_node_fake_pkg
node_node_ros2_tooling -->|"builds"| node_node_gz_pkg
node_node_ros2_tooling -->|"builds"| node_node_fake_pkg

click node_node_meta_pkg "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_simulations"
click node_node_gz_launch "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/launch"
click node_node_gz_worlds "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/worlds"
click node_node_gz_urdf "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/urdf"
click node_node_gz_models "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/models"
click node_node_gz_plugins "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/src"
click node_node_gz_headers "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/include/turtlebot3_gazebo"
click node_node_gz_bridge "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/params"
click node_node_gz_rviz "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/rviz"
click node_node_gz_pkg "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo"
click node_node_fake_pkg "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_fake_node"
click node_node_fake_launch "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_fake_node/launch"
click node_node_fake_params "https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_fake_node/param"
click node_node_fake_impl "https://github.com/robotis-git/turtlebot3_simulations/blob/main/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp"
click node_node_ci_build "https://github.com/robotis-git/turtlebot3_simulations/blob/main/.github/workflows/ros-ci.yml"
click node_node_ci_lint "https://github.com/robotis-git/turtlebot3_simulations/blob/main/.github/workflows/ros-lint.yml"

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_node_meta_pkg,node_node_ros2_tooling toneBlue
class node_node_gz_launch,node_node_gz_worlds,node_node_gz_urdf,node_node_gz_models,node_node_gz_plugins,node_node_gz_headers,node_node_gz_bridge,node_node_gz_rviz,node_node_gz_pkg toneAmber
class node_node_fake_pkg,node_node_fake_launch,node_node_fake_params,node_node_fake_impl toneMint
class node_node_ci_build,node_node_ci_lint toneRose
```

## Components

### Meta package

Distribution boundary for the simulation stack.

- [turtlebot3_simulations](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_simulations): ROS meta-package · Top-level package boundary that aggregates the simulation stack. · `turtlebot3_simulations`
- **ROS tooling**: Build/runtime tooling · Package metadata and CMake-based ROS build orchestration across the repo.

### Gazebo sim

Main physics simulation, assets, launch orchestration, and plugins.

- [Launch stack](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/launch): ROS launch · Composes Gazebo, robot spawn, and world selection entry points. · `turtlebot3_gazebo/launch`
- [Worlds](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/worlds): Gazebo worlds · Simulation scenarios such as empty, house, DQN stages, autorace, and generic world. · `turtlebot3_gazebo/worlds`
- [URDFs](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/urdf): Robot description · Robot variants and shared properties used to spawn TurtleBot3 in simulation. · `turtlebot3_gazebo/urdf`
- [Models](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/models): Gazebo assets · SDF models, meshes, and materials for robot and environment objects. · `turtlebot3_gazebo/models`
- [Plugins](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/src): Gazebo C++ · Runtime behavior for driving, obstacles, and traffic control. · `turtlebot3_gazebo/src`
- [Plugin APIs](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/include/turtlebot3_gazebo): C++ headers · Interfaces for Gazebo plugin implementations. · `turtlebot3_gazebo/include/turtlebot3_gazebo`
- [Bridge params](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/params): ROS params · Per-robot Gazebo-to-ROS bridge configurations. · `turtlebot3_gazebo/params`
- [RViz config](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo/rviz): Visualization · ROS-side visualization setup for robot state and sensors. · `turtlebot3_gazebo/rviz`
- [turtlebot3_gazebo](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_gazebo): ROS package · Main Gazebo-based simulation package. · `turtlebot3_gazebo`

### Fake node

Lightweight software-only TurtleBot3 substitute.

- [turtlebot3_fake_node](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_fake_node): ROS package · Software-only TurtleBot3 stand-in package. · `turtlebot3_fake_node`
- [Fake launch](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_fake_node/launch): ROS launch · Starts the fake TurtleBot3 runtime and RViz entry point. · `turtlebot3_fake_node/launch`
- [Fake params](https://github.com/robotis-git/turtlebot3_simulations/tree/main/turtlebot3_fake_node/param): ROS params · Per-robot configuration for the fake node. · `turtlebot3_fake_node/param`
- [Fake runtime](https://github.com/robotis-git/turtlebot3_simulations/blob/main/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp): C++ node · Core implementation of the non-Gazebo TurtleBot3 behavior. · `turtlebot3_fake_node/src/turtlebot3_fake_node.cpp`

### CI

Repository automation for build and lint validation.

- [ROS CI](https://github.com/robotis-git/turtlebot3_simulations/blob/main/.github/workflows/ros-ci.yml): GitHub Actions · Automated build and test workflow. · `.github/workflows/ros-ci.yml`
- [ROS lint](https://github.com/robotis-git/turtlebot3_simulations/blob/main/.github/workflows/ros-lint.yml): GitHub Actions · Automated lint and style workflow. · `.github/workflows/ros-lint.yml`

## Connections

- turtlebot3_simulations → turtlebot3_gazebo: includes · Distribution boundary contains the main simulation package.
- turtlebot3_simulations → turtlebot3_fake_node: includes · Distribution boundary contains the fake node package.
- turtlebot3_simulations → ROS tooling: defines · Top-level package anchors ROS build and packaging.
- turtlebot3_gazebo → Launch stack: orchestrates · Package provides launch entry points for simulation startup.
- turtlebot3_gazebo → Worlds: ships · Package ships scenario worlds loaded by Gazebo.
- turtlebot3_gazebo → URDFs: ships · Package ships robot descriptions used at spawn time.
- turtlebot3_gazebo → Models: ships · Package ships robot and environment assets.
- turtlebot3_gazebo → Plugins: implements · Package provides interactive simulation behavior in C++.
- turtlebot3_gazebo → Bridge params: configures · Package parameterizes Gazebo-to-ROS integration per robot variant.
- turtlebot3_gazebo → RViz config: visualizes · Package includes the main RViz view for ROS-side inspection.
- Plugins → Plugin APIs: uses · Source implementations depend on corresponding plugin interfaces.
- Launch stack → Worlds: selects · Launch files choose the target world or training stage.
- Launch stack → URDFs: spawns · Launch files spawn a robot variant using URDF description.
- Launch stack → Bridge params: loads · Launch files load bridge parameters for the selected robot.
- Launch stack → Plugins: activates · Simulation startup enables runtime behavior through plugins.
- URDFs → Models: references · URDFs map robot variants to Gazebo meshes and model assets.
- Models → Plugins: supports · Environment models and obstacles become interactive through plugins.
- Bridge params → RViz config: feeds · ROS bridge output is consumed by visualization.
- Bridge params → Fake runtime: parallels · Fake node mirrors robot-variant-specific behavior and interfaces.
- turtlebot3_fake_node → Fake launch: orchestrates · Package provides startup entry points for the fake runtime.
- turtlebot3_fake_node → Fake params: configures · Package ships per-robot parameters.
- turtlebot3_fake_node → Fake runtime: implements · Package contains the core fake TurtleBot3 node.
- Fake launch → Fake runtime: starts · Launch files bring up the fake node runtime.
- Fake launch → Fake params: loads · Launch files load robot-specific parameters.
- ROS CI → turtlebot3_gazebo: checks · CI validates the main simulation package.
- ROS CI → turtlebot3_fake_node: checks · CI validates the fake node package.
- ROS lint → turtlebot3_gazebo: checks · Lint workflow covers the simulation package.
- ROS lint → turtlebot3_fake_node: checks · Lint workflow covers the fake node package.
- ROS tooling → turtlebot3_gazebo: builds · ROS build tooling compiles and installs the Gazebo package.
- ROS tooling → turtlebot3_fake_node: builds · ROS build tooling compiles and installs the fake node package.
