From c1001f7886d0b6ba2b021e017dde92c88b8b169c Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Thu, 14 Nov 2024 12:15:17 +0100 Subject: [PATCH] Update preparation of model and data for running contact models --- src/jaxsim/rbda/contacts/common.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jaxsim/rbda/contacts/common.py b/src/jaxsim/rbda/contacts/common.py index 6bdce1762..9a3fc3f24 100644 --- a/src/jaxsim/rbda/contacts/common.py +++ b/src/jaxsim/rbda/contacts/common.py @@ -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