Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support visualizing mesh collisions with convex decomposition #2352

Merged
merged 9 commits into from
Jun 25, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Apr 1, 2024

🎉 New feature

Replaces #2331

Related gz-physics PR: gazebosim/gz-physics#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

  • 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 iche033 requested a review from mjcarroll as a code owner April 1, 2024 21:54
@github-actions github-actions bot added the 🏛️ ionic Gazebo Ionic label Apr 1, 2024
@azeey azeey requested a review from caguero May 6, 2024 18:48
…ams, refactor visualizaiton capabilities to use optimizeMesh function

Signed-off-by: Ian Chen <[email protected]>
@iche033
Copy link
Contributor Author

iche033 commented Jun 6, 2024

refactored to use the optimizeMesh function added in #2417

Signed-off-by: Ian Chen <[email protected]>
Copy link
Contributor

@caguero caguero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a minor comment.

}
}
if (setConvexDecomp)
meshShape.SetConvexDecomposition(convexDecomp);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could you remove the if and let just meshShape.SetConvexDecomposition(convexDecomp);?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep removed. c74e7c1

@iche033 iche033 merged commit 3487086 into main Jun 25, 2024
8 of 9 checks passed
@iche033 iche033 deleted the convex_decomposition_9 branch June 25, 2024 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants