Rigid object can use vhacd as decomposition method#344
Open
matafela wants to merge 2 commits into
Open
Conversation
added 2 commits
July 1, 2026 18:31
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for selecting the convex decomposition backend for rigid mesh collision (enabling V-HACD in addition to CoACD) and wires this option through the mesh-loading path, with an updated tutorial example showing usage.
Changes:
- Introduced
convex_decomposition_methodonRigidObjectCfg(defaulting to"coacd"). - Updated mesh spawning to call
load_actor_with_acd(..., method=...)whenmax_convex_hull_num > 1. - Updated the grasp tutorial to use
"vhacd"for convex decomposition (and aligned joint regex patterns with existing UR10 tests).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/tutorials/grasp/grasp_generator.py | Uses the new config field in an example (sets convex_decomposition_method="vhacd"). |
| embodichain/lab/sim/utility/sim_utils.py | Forwards the configured decomposition method into the actor-loading path for convex decomposition. |
| embodichain/lab/sim/cfg.py | Adds the new RigidObjectCfg.convex_decomposition_method configuration field. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
833
to
835
| If `max_convex_hull_num` is set to larger than 1, the rigid body will be decomposed into multiple convex hulls using coacd alogorithm. | ||
| Reference: https://github.com/SarahWeiii/CoACD | ||
| """ |
Comment on lines
+837
to
+840
| convex_decomposition_method: str = "coacd" | ||
| """The method used for convex decomposition of the rigid body. | ||
| Currently, "coacd" and "vhacd" is supported. If `max_convex_hull_num` is set to larger than 1, the rigid body will be decomposed into multiple convex hulls using the specified method. | ||
| """ |
Comment on lines
318
to
320
| max_convex_hull_num=max_convex_hull_num, | ||
| method=cfg.convex_decomposition_method, | ||
| ) |
| cache_path=cache_dir, | ||
| actor_type=body_type, | ||
| max_convex_hull_num=max_convex_hull_num, | ||
| method=cfg.convex_decomposition_method, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Rigid object can use vhacd as decomposition method.
example:
scripts/tutorials/grasp/grasp_generator.pyType of change
Checklist
black .command to format the code base.