Skip to content

[BUG FIX] Fix IPC coupler auto-detecting wrong coup_type for Plane entities#2877

Open
liminchen wants to merge 1 commit into
Genesis-Embodied-AI:mainfrom
liminchen:fix/ipc-plane-coup-type-auto-detection
Open

[BUG FIX] Fix IPC coupler auto-detecting wrong coup_type for Plane entities#2877
liminchen wants to merge 1 commit into
Genesis-Embodied-AI:mainfrom
liminchen:fix/ipc-plane-coup-type-auto-detection

Conversation

@liminchen
Copy link
Copy Markdown

Description

A Plane entity added to a scene with IPCCouplerOptions(two_way_coupling=True) crashed at scene.build() with:

GenesisException: Plane entity (solver idx=0) has coup_type='1', but only 'ipc_only' is supported for plane geoms.

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_config used entity.n_joints > 0 to identify articulated entities, which incorrectly classified a Plane (1 FIXED joint, 0 DOFs) as external_articulation (enum value 1). PLANE geoms only support ipc_only, triggering the exception.

Fix

Changed entity.n_joints > 0entity.n_dofs > 0 in _setup_coupling_config. This correctly distinguishes:

  • Fixed entities with no DOFs (Plane, fixed Box, etc.) → ipc_only
  • Fixed-base articulated robots (joints with DOFs) → external_articulation
  • Free-floating rigid bodies → two_way_soft_constraint

To Reproduce

python examples/IPC_Solver/ipc_objects_falling.py

Crashes before the fix, runs successfully after.

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant