How robotis-git/turtlebot3_simulations works
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 turtlebot3_gazebo · turtlebot3_fake_node turtlebot3_fake_node · launch Launch stack · params Bridge params
Components 17
Meta package
Distribution boundary for the simulation stack.
- turtlebot3_simulations · Top-level package boundary that aggregates the simulation stack.
turtlebot3_simulations - ROS tooling · Package metadata and CMake-based ROS build orchestration across the repo.
Gazebo sim
Main physics simulation, assets, launch orchestration, and plugins.
- Launch stack · Composes Gazebo, robot spawn, and world selection entry points.
turtlebot3_gazebo/launch - Worlds · Simulation scenarios such as empty, house, DQN stages, autorace, and generic world.
turtlebot3_gazebo/worlds - URDFs · Robot variants and shared properties used to spawn TurtleBot3 in simulation.
turtlebot3_gazebo/urdf - Models · SDF models, meshes, and materials for robot and environment objects.
turtlebot3_gazebo/models - Plugins · Runtime behavior for driving, obstacles, and traffic control.
turtlebot3_gazebo/src - Plugin APIs · Interfaces for Gazebo plugin implementations.
turtlebot3_gazebo/include/turtlebot3_gazebo - Bridge params · Per-robot Gazebo-to-ROS bridge configurations.
turtlebot3_gazebo/params - RViz config · ROS-side visualization setup for robot state and sensors.
turtlebot3_gazebo/rviz - turtlebot3_gazebo · Main Gazebo-based simulation package.
turtlebot3_gazebo
Fake node
Lightweight software-only TurtleBot3 substitute.
- turtlebot3_fake_node · Software-only TurtleBot3 stand-in package.
turtlebot3_fake_node - Fake launch · Starts the fake TurtleBot3 runtime and RViz entry point.
turtlebot3_fake_node/launch - Fake params · Per-robot configuration for the fake node.
turtlebot3_fake_node/param - Fake runtime · Core implementation of the non-Gazebo TurtleBot3 behavior.
turtlebot3_fake_node/src/turtlebot3_fake_node.cpp
Connections 30
- 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.