Prerequisites
- Basic familiarity with XML
- Docker and Docker Compose installed (install guide)
- Clone the turtlebot-maze repository
The SDF world file format
Simulation Description Format (SDF) is the XML schema used by Gazebo to describe simulation worlds. Every world file has the following top-level structure:Plugins
Gazebo Sim (Harmonic) is plugin-based. Each capability, physics, sensors, scene rendering, is a loadable shared library declared in the world file:gz-sim-scene-broadcaster-system is only loaded when the simulation is not running headless. The Small House world uses an Xacro argument to control this:Physics
The<physics> element configures the ODE (Open Dynamics Engine) solver. The Small House world uses a 3 ms time step:
Lighting
Gazebo supports directional, point, and spot lights. The Small House world uses a single directional sun:<direction> vector (-0.5, 0.1, -0.9) angles the light from upper-left, creating natural shadow contrast on furniture.
Xacro: parameterized world files
Xacro (XML Macros) extends plain SDF with:- Arguments, pass parameters when loading the world
- Conditionals,
<xacro:if>/<xacro:unless>for optional blocks - Macros, reusable XML templates with local variables
.sdf.xacro extension. To process them, ROS 2 runs the Xacro preprocessor at launch time, producing a pure SDF file that Gazebo can load.
The Small House world declares one argument:
Model anatomy
Every Gazebo model lives in its own directory with two required files:model.config
model.sdf
A static furniture model needs three things: inertial properties, a collision shape for physics, and a visual mesh for rendering. Here is the complete ChairA_01 model:
The AWS RoboMaker Small House world
The Small House world is a residential interior adapted from AWS RoboMaker’s open-source assets. It contains 68aws_robomaker_residential_* models covering:
Placing models in the world
Each model is placed with a<model> block in the world file. The <include> element references the model directory by name; <pose> gives its position (x, y, z) and orientation (roll, pitch, yaw in radians):
<static>true</static> tells Gazebo the model does not move, the physics engine skips dynamics for it, saving computation.
Launching the house world
Navigation map
The house world ships with a pre-built Nav2 occupancy grid map at 5 cm/px resolution (tb_worlds/maps/house_world_map.yaml). The map was generated by running GMapping SLAM in the world and recording the result.
When a new model is added or furniture is rearranged, the map must be regenerated, Nav2 will plan routes through walls it does not know about.
Available worlds
The turtlebot-maze project includes four Gazebo environments:
All worlds use the same Docker images and behavior demo services, only the world service name changes.

