Skip to content

[BUG FIX] Clarify IPC vertex constraint error#3056

Merged
duburcqa merged 2 commits into
Genesis-Embodied-AI:mainfrom
coyaSONG:fix_fem_ipc_vertex_constraints
Jul 21, 2026
Merged

[BUG FIX] Clarify IPC vertex constraint error#3056
duburcqa merged 2 commits into
Genesis-Embodied-AI:mainfrom
coyaSONG:fix_fem_ipc_vertex_constraints

Conversation

@coyaSONG

Copy link
Copy Markdown
Contributor

Description

Clarify the error raised by FEMEntity.set_vertex_constraints() when an IPCCoupler is active. The guard intentionally rejects this call because IPC owns the FEM state, but the previous message said the method was only supported by IPC—the opposite of the implemented behavior.

This changes the message to state that vertex constraints are not supported by the IPC coupler and adds a required regression test for that rejection path. Simulation behavior is unchanged.

Related Issue

Resolves #3039

Motivation and Context

Users currently cannot tell whether the IPC type check is inverted or the exception text is wrong. IPC maintains and writes back its own FEM geometry state, while the vertex-constraint kernels belong to the FEM solver, so retaining the guard and correcting its message makes the existing limitation explicit.

How Has This Been / Can This Be Tested?

  • pre-commit run --files genesis/engine/entities/fem_entity.py tests/deformable/test_fem.py --show-diff-on-failure
  • pytest -p no:cacheprovider -v -ra --logical --dev --backend cpu -m 'required and not slow' --forked tests/deformable/test_fem.py (9 passed, 1 expected xfail)
  • The new regression fails on the base revision because the old exception text does not match, and passes with this change.

Screenshots (if appropriate):

Not applicable; this changes an API error message and test coverage only.

Checklist:

  • I read the CONTRIBUTING document.
  • I followed the Submitting Code Changes section of CONTRIBUTING document.
  • I tagged the title correctly (including BUG FIX/FEATURE/MISC/BREAKING)
  • I updated the documentation accordingly or no change is needed.
  • I tested my changes and added instructions on how to test it for reviewers.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@duburcqa
duburcqa marked this pull request as ready for review July 21, 2026 20:22
@duburcqa
duburcqa requested a review from YilingQiao as a code owner July 21, 2026 20:22
@duburcqa
duburcqa merged commit 18d4c5d into Genesis-Embodied-AI:main Jul 21, 2026
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.

[Bug]: FEMEntity.set_vertex_constraints() raises when coupler IS IPCCoupler — inverted condition, or intended?

2 participants