[BUG FIX] Fix IPC coupler auto-detecting wrong coup_type for Plane entities#2877
Open
liminchen wants to merge 1 commit into
Open
[BUG FIX] Fix IPC coupler auto-detecting wrong coup_type for Plane entities#2877liminchen wants to merge 1 commit into
liminchen wants to merge 1 commit into
Conversation
…tities Primitive morphs (Plane, Box, Sphere, etc.) always create one joint in the rigid entity tree, even when that joint is FIXED (zero DOFs). The previous auto-detection logic used `entity.n_joints > 0` to identify articulated entities, which incorrectly classified a fixed Plane (1 FIXED joint, 0 DOFs) as `external_articulation`. PLANE geoms only support `ipc_only`, so this raised GenesisException at build time whenever a Plane was added to a scene with `IPCCouplerOptions(two_way_coupling=True)` and no explicit `coup_type`. Fix: replace `n_joints > 0` with `n_dofs > 0` in `_setup_coupling_config` so that fixed entities with no actual DOFs (Plane, fixed Box, etc.) correctly receive `ipc_only` rather than `external_articulation`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
A
Planeentity added to a scene withIPCCouplerOptions(two_way_coupling=True)crashed atscene.build()with:Root Cause
Primitive morphs (Plane, Box, Sphere, etc.) always create one joint in the rigid entity tree, even when that joint is FIXED (zero DOFs). The auto-detection logic in
_setup_coupling_configusedentity.n_joints > 0to identify articulated entities, which incorrectly classified a Plane (1 FIXED joint, 0 DOFs) asexternal_articulation(enum value 1). PLANE geoms only supportipc_only, triggering the exception.Fix
Changed
entity.n_joints > 0→entity.n_dofs > 0in_setup_coupling_config. This correctly distinguishes:ipc_onlyexternal_articulationtwo_way_soft_constraintTo Reproduce
Crashes before the fix, runs successfully after.