Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Rigid*ContactsState to accept kwargs #246

Merged
merged 2 commits into from
Sep 27, 2024
Merged

Conversation

flferretti
Copy link
Collaborator

@flferretti flferretti commented Sep 27, 2024

This fixes a regression introduced from a suggestion I made in #245. When the zero-ed ODEState is created in

model_state = ODEState.build(
model=model, contact=data.state.contact.zero(model=model)
)

this raises an error in rigid contact models:

TypeError: RelaxedRigidContactsState.zero() got an unexpected keyword argument 'model'

📚 Documentation preview 📚: https://jaxsim--246.org.readthedocs.build//246/

@flferretti flferretti self-assigned this Sep 27, 2024
Copy link
Member

@diegoferigo diegoferigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @flferretti for spotting this regression!

@flferretti flferretti force-pushed the fix/contacts_state_zero branch from c46f2a1 to a7531ae Compare September 27, 2024 09:23
@flferretti flferretti merged commit 9e29f06 into main Sep 27, 2024
23 checks passed
@flferretti flferretti deleted the fix/contacts_state_zero branch September 27, 2024 09:39
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.

2 participants