TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/clearpathrobotics/cpr_gazebo/llms.txt
Use this file to discover all available pages before exploring further.
gazebo_race_modules package is not a complete Gazebo world — it is a toolkit of modular, composable track pieces that you assemble into any custom race circuit you need. Each tile (straight segment, 90-degree corner, or barrier edge) is a standalone URDF xacro model that you spawn independently at any position and heading. By mixing tile types, surface materials, barrier styles, and sizes, you can build road, dirt, or mud tracks ranging from a compact 1 m-grid layout all the way to broad 3 m-grid circuits, without modifying a world file.
Tile Types
Four tile roles make up a complete track. Track tiles define the driving surface; edge tiles provide the barriers on each side.| Parameter name | Description |
|---|---|
straight_description | A straight segment of track. Spawn one or more end-to-end to form a straightaway. |
corner_description | A 90-degree turn tile. Rotate on Z to orient the exit direction. |
edge_straight_description | A barrier sized to border a straight tile. Place one per side of each straight. |
edge_corner_description | A barrier sized to border a corner tile. Place one per side of each corner. |
object_descriptions.launch file loads each of these four descriptions as ROS parameters, selecting the correct URDF xacro file based on the arguments you supply. Individual tiles are then spawned by passing the appropriate parameter name to gazebo_ros/spawn_model.
Parameter Reference
The material of the driving surface. Controls which texture and mesh is loaded for
straight_description and corner_description tiles.road— paved asphalt surfacedirt— unpaved dirt surfacemud— muddy/off-road surface
The appearance of the barrier edge tiles (
edge_straight_description and edge_corner_description).racing— standard racing barrier appearanceblack— solid black barrier appearance
Polygon density and surface resolution of all tiles. Lower complexity improves simulation performance.
simple— reduced polygon count; recommended for most use casescomplex— higher polygon count for improved visual fidelity
The footprint of each tile. All tiles in a single track must use the same size so they align correctly.
small— tiles are 1 m × 1 mlarge— tiles are 3 m × 3 m
Launching
Bringing up a race track involves two steps: starting Gazebo with the minimal world, then loading the tile descriptions so individual tiles can be spawned.Start Gazebo
Launch an empty Gazebo world configured for race modules. This also calls Optional arguments accepted by
object_descriptions.launch with default parameters (road surface, racing barriers, simple complexity, small tiles).spawn_world.launch:| Argument | Default | Description |
|---|---|---|
use_sim_time | true | Use Gazebo simulation clock |
gui | true | Launch the Gazebo GUI |
headless | false | Run without a display |
world_name | $(find gazebo_race_modules)/worlds/actually_empty_world.world | Path to the .world file |
Load tile descriptions
Load the URDF xacro descriptions onto the ROS parameter server. Pass arguments to select the surface, barrier style, complexity, and tile size you want.This publishes five parameters —
ground_description, straight_description, corner_description, edge_straight_description, and edge_corner_description — that your spawner nodes will reference.Customizing the track surface
To build a mud track with racing barriers, high-detail meshes, and small tiles:test_small_track.launch is a fully working example that spawns a closed-loop 8-straight, 6-corner small road track with racing barriers. Study it as a reference when designing your own track layouts:track_type, barrier_type, complexity, and size arguments, so you can try out different combinations without writing new launch XML.Naming Convention
Each URDF xacro file ingazebo_race_modules/urdf/ follows a strict naming pattern that mirrors the launch argument values. Understanding the convention lets you predict the exact filename for any combination of parameters.
Track tiles (driving surface):
| Example filename | size | track_type / barrier_type | Tile role | complexity |
|---|---|---|---|---|
small_road_straight_simple.urdf.xacro | small | road | straight | simple |
large_mud_corner_complex.urdf.xacro | large | mud | corner | complex |
small_racing_edge_straight_simple.urdf.xacro | small | racing | edge straight | simple |
large_black_edge_corner_complex.urdf.xacro | large | black | edge corner | complex |
size × track_type × {straight,corner} × complexity and size × barrier_type × {edge_straight,edge_corner} × complexity are provided, giving 24 track tile files and 16 edge tile files (plus two ground plane files).