Skip to content

Commit

Permalink
Update preparation of model and data for running contact models
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Nov 15, 2024
1 parent bf75036 commit fb6884f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/jaxsim/rbda/contacts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,10 @@ def initialize_model_and_data(
The initialized model and data objects.
"""

with model.editable(validate=validate) as model_out:
model_out.contact_model = self
with self.editable(validate=validate) as contact_model:
contact_model.parameters = data.contacts_params

with data.editable(validate=validate) as data_out:
data_out.contacts_params = data.contacts_params
with model.editable(validate=validate) as model_out:
model_out.contact_model = contact_model

return model_out, data_out
return model_out, data

0 comments on commit fb6884f

Please sign in to comment.