Skip to content

Commit

Permalink
Fix contact state pattern matching in ode_data
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Jun 17, 2024
1 parent 1a97511 commit 908ca8b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/jaxsim/api/ode_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,11 @@ def build(
)

# Get the contact model from the `JaxSimModel`
match model.contact_model:
case SoftContacts():
match contact:
case SoftContactsState():
pass
case None:
contact = (
contact
if contact is not None
else SoftContactsState.zero(model=model)
)
contact = SoftContactsState.zero(model=model)
case _:
raise ValueError("Unable to determine contact state class prefix.")

Expand Down

0 comments on commit 908ca8b

Please sign in to comment.