gazebosim / gz-sim

Open source robotics simulator. The latest version of Gazebo.
https://gazebosim.org
Apache License 2.0
686 stars 263 forks source link

Enable StoreResolvedURIs when loading SDF #2323

Closed iche033 closed 6 months ago

iche033 commented 7 months ago

🎉 New feature

Depends on https://github.com/gazebosim/sdformat/pull/1373

Summary

When ParserConfig's SetStoreResolvedURIs option is set to true, the URIs will be resolved / expanded and stored in the SDF parsed. Any consumer of the SDF will not have to resolve the URIs themselves.

One use case for this is that the bullet-featherstone implementation in gz-physics needs to load meshes from the URI element in SDF. Without resolved URIs, the bullet-featherstone engine will need to implement its own logic to resolve all mesh URIs which may result in duplicate code, e.g. https://github.com/gazebosim/gz-physics/pull/599.

For context, this ParserConfig option was added in https://github.com/gazebosim/sdformat/pull/1147 to help with bullet-featherstone work but for some reason it was not set at the time (https://github.com/gazebosim/gz-physics/pull/599#issuecomment-1958166114).

While testing, I ran into some unused code for mesh URIs in rendering/SceneManager.cc so removed that as well.

Checklist

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.

iche033 commented 6 months ago

closing this in favor of #2349 that targets harmonic