gz-sim icon indicating copy to clipboard operation
gz-sim copied to clipboard

Enable StoreResolvedURIs when loading SDF

Open iche033 opened this issue 1 year ago • 0 comments

🎉 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

  • [x] Signed all commits for DCO
  • [ ] Added tests
  • [ ] Added example and/or tutorial
  • [ ] 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.

iche033 avatar Feb 23 '24 21:02 iche033