# Blender Models in Gazebo Import 3D models from Blender into the ARG simulation. ## Workflow ``` Blender (.blend) → Export COLLADA (.dae) → Gazebo Model → World ``` ## Step 1: Create Model in Blender 1. Create your 3D model 2. Apply all transforms: `Ctrl+A` → All Transforms 3. Set origin to geometry center ## Step 2: Export from Blender 1. File → Export → COLLADA (.dae) 2. Settings: - Selection Only (if needed) - Include Armatures: OFF - Include Animations: OFF - Triangulate: ON 3. Save as `model.dae` ## Step 3: Create Gazebo Model ``` gazebo/models/my_model/ ├── model.config ├── model.sdf ├── meshes/ │ └── model.dae └── materials/ └── textures/ └── texture.png ``` ### model.config ```xml My Model 1.0 model.sdf Custom Blender model ``` ### model.sdf ```xml true meshes/model.dae 1 1 1 meshes/model.dae 1 1 1 ``` ## Step 4: Add to World ```xml model://my_model my_model_instance 5 3 0 0 0 0 ``` ## Step 5: Set Model Path ```bash export GZ_SIM_RESOURCE_PATH=$PWD/gazebo/models:$GZ_SIM_RESOURCE_PATH ``` ## Common Issues ### Model Not Found ```bash export GZ_SIM_RESOURCE_PATH=/full/path/to/gazebo/models:$GZ_SIM_RESOURCE_PATH ``` ### Scale Wrong In Blender, check unit settings: Properties → Scene → Units Adjust in SDF: ```xml 0.01 0.01 0.01 ``` ### Textures Not Showing Put textures in `materials/textures/` and reference in DAE file. Or add material in SDF: ```xml meshes/model.dae 0.8 0.2 0.2 1 ``` ### Model Orientation Wrong Blender uses Z-up, Gazebo uses Z-up. Should match. If rotated, fix in Blender or use pose: ```xml 0 0 0 1.5708 0 0 ``` ## Simplified Collision For complex meshes, use simple collision: ```xml 2 2 3 meshes/complex_model.dae ``` ## Template Copy the template: ```bash cp -r gazebo/models/custom_object gazebo/models/my_model ``` Then: 1. Edit `model.config` with your name 2. Edit `model.sdf` with your model name 3. Put your `model.dae` in `meshes/` ## Test Model ```bash gz sim -v4 gazebo/worlds/custom_landing.sdf ```