sdformat
sdformat copied to clipboard
Add <voxel_resolution> SDF element to <convex_decomposition>
🎉 New feature
Summary
Adds a new <voxel_resolution>
parameter. This is only applicable to voxel based convex decomposition methods.
See below for alternative proposals that I have considered. I'm open to suggestions.
Alternatives considered
- Use a more generic parameter
<resolution>
instead of<voxel_resolution>
so that it's applicable to a wider range of convex decomposition methods. e.g.
<convex_decomposition>
<resolution>100000</resolution>
</convex_decomposition>
One example of non-voxel based method is the CoACD method which offers a couple resolution configuration params (resolution
and manifold preprocess resolution
).
- Have specific SDF elements for each different method / library (similar to how there is
<bullet>
,<ode>
, and<dart>
specific params):
<convex_decomposition>
<VHACD>
<voxel_resolution>200000</voxel_resolution>
<VHACD>
<some_other_method>
<another_param>50</another_param>
<some_other_method>
</convex_decomposition>
This PR chose an approach that's kind of half way between the 2 above alternatives. I added the <voxel_resolution>
SDF element to be more explicit in limiting this element to voxel based methods but not overly specific to a particular convex decomposition library.
One option for extending the spec in the future would be:
<!-- `method` can be VHACD, CoACD, etc and this determines the corresponding resolution param to use -->
<convex_decomposition method="VHACD>
<voxel_resolution>200000</voxel_resolution>
<manifold_resolution>50</manifold_resolution>
</convex_decomposition>
Test it
Run the tests: UNIT_Mesh_TEST
and INTEGRATION_geometry_dom
Checklist
- [x] Signed all commits for DCO
- [x] 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.