--- name: gazebo-world-builder description: Design simulation worlds using SDF with ground planes, models, physics configuration, and lighting domain: authoring version: 1.0.0 created: 2025-11-29 triggers: - Creating new Gazebo world files - Adding models from Gazebo Fuel - Configuring physics parameters - Debugging physics instability learned_from: - Module 2 Chapter 10 Building Simulation Worlds (2025-11-29) --- # Gazebo World Builder Skill ## Persona Think like a simulation environment designer who creates realistic testing grounds for robots. You understand physics engines, lighting, and model placement. You build worlds that are stable, performant, and suitable for the testing scenarios required. --- ## Pre-Flight Questions Before creating or modifying any SDF world, ask yourself: ### 1. Environment Purpose - **Q**: What is this world testing? - **Impact**: Determines obstacles, terrain, lighting needs - Navigation → obstacles, open spaces - Manipulation → tables, objects to grasp - Outdoor → terrain, weather effects ### 2. Physics Requirements - **Q**: What physics engine should be used? - **DART**: Default, good balance of speed/accuracy - **ODE**: Older, widely compatible - **Bullet**: Good for many contacts - **Q**: What step size is appropriate? - **0.001s**: High accuracy, slower - **0.004s**: Default, good balance - **0.01s**: Fast but less accurate ### 3. Model Sources - **Q**: Are models from Gazebo Fuel or custom? - **Fuel**: Use `https://fuel.gazebosim.org/...` URIs - **Custom**: Define inline or reference local files --- ## Principles ### Principle 1: Every World Needs Core Elements ```xml 0.004 1.0 true 0 0 10 0 0 0 0.8 0.8 0.8 1 -0.5 0.1 -0.9 true 0 0 1 0 0 1100 100 ``` ### Principle 2: Use Gazebo Fuel for Standard Models ```xml https://fuel.gazebosim.org/1.0/OpenRobotics/models/Table table_1 2 0 0 0 0 0 https://fuel.gazebosim.org/1.0/OpenRobotics/models/Cardboard Box box_1 2.5 0.3 0.8 0 0 0 ``` Popular Fuel models: - `OpenRobotics/models/Table` - `OpenRobotics/models/Cardboard Box` - `OpenRobotics/models/Coke Can` - `OpenRobotics/models/Construction Cone` ### Principle 3: Configure Physics for Stability ```xml 0.004 1.0 0 0 -9.81 ``` For unstable simulations: 1. Reduce step size (0.004 → 0.001) 2. Increase solver iterations 3. Check collision geometry (too complex?) 4. Verify inertia values (too small?) ### Principle 4: Surface Properties for Realism ```xml 0.8 0.6 1e6 100 ``` Typical values: - Rubber on concrete: mu=0.8-1.0 - Metal on metal: mu=0.3-0.5 - Ice: mu=0.05-0.1 --- ## Common Patterns ### Indoor Room ```xml true 0 5 1 0 0 0 10 0.2 2 10 0.2 2 https://fuel.gazebosim.org/1.0/OpenRobotics/models/Table 2 2 0 0 0 0 ``` ### Obstacle Course ```xml https://fuel.gazebosim.org/1.0/OpenRobotics/models/Construction Cone cone_1 3 1 0 0 0 0 https://fuel.gazebosim.org/1.0/OpenRobotics/models/Construction Cone cone_2 5 -2 0 0 0 0 true 10 0 0.1 0 0 0 0.50.2 0 1 0 1 ``` --- ## Checklist Before finalizing any SDF world: - [ ] Physics engine and step size configured - [ ] Lighting provides adequate visibility - [ ] Ground plane present and stable - [ ] All model URIs are valid (Fuel or local) - [ ] Model names are unique - [ ] Poses place models at correct locations - [ ] Static models marked `true` - [ ] World loads in Gazebo without errors - [ ] Physics simulation is stable (no explosions) --- ## Integration This skill is used by: - `content-implementer` agent when generating Module 2 lessons - Students learning world building in Chapter 10 - Capstone projects requiring custom environments **Dependencies**: - `urdf-robot-model` - for robots to place in worlds - `sensor-simulation` - for testing sensors in environments - `ros2-gazebo-bridge` - for controlling simulations