gazebosim / gz-sim

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

Support visualizing mesh collisions with convex decomposition #2352

Closed iche033 closed 1 week ago

iche033 commented 3 months ago

🎉 New feature

Replaces #2331

Related gz-physics PR: https://github.com/gazebosim/gz-physics/pull/611

Summary

Extends VisualizationCapabilities gui plugin to support visualizing mesh collisions with convex decomposition.

if a mesh collision has the new attribute , the plugin will decompose the meshes on the GUI side before visualizing them.

Test it

Here's a Cordless Drill Simplified model on fuel and a cordless_drill.sdf world for testing. This model uses convex decomposition on the collision mesh.

Optional: to actually have the collisions decomposed on the physics side, you'll need these PRs. This is not required to see the collision visualizations.

Then launch gz-sim with bullet-featherstone plugin:

gz sim -v 4 cordless_drill.sdf --physics-engine gz-physics-bullet-featherstone-plugin

Right click on the drill model and view collisions:

cordless_drill_simplified

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 1 month ago

refactored to use the optimizeMesh function added in #2417