gz-sim
gz-sim copied to clipboard
Fix tutorial for `blender_sdf_exporter`
🦟 Bug fix
Summary
I encountered 2 issues when trying the tutorial.
- The COLLADA (
.dae
) would get exported correctly under./meshes/model.dae
. However, SDF file refer to./model.dae
as a relative URI for the mesh, which prevented Gazebo from finding it (assuming that only the parent directory of the model is part ofGZ_SIM_RESOURCE_PATH
). Corrected the path. - The script always expected a model to have an assigned material, which would make it fail for objects without any material. Added a simple check to prevent throwing an exception when exporting models without a material.
Tested both with Blender 2.82 and 3.2
Checklist
- [x] Signed all commits for DCO
- [ ] Added tests
- [ ] Updated documentation (as needed)
- [ ] Updated migration guide (as needed)
- [ ] Consider updating Python bindings (if the library has them)
- [ ]
codecheck
passed (See contributing) - [ ] All tests passed (See test coverage)
- [ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by
messages.