Closed flferretti closed 2 weeks ago
For some reason, CI is failing only in Python 3.10 (https://github.com/ami-iit/jaxsim/actions/runs/9511311149)
For some reason, CI is failing only in Python 3.10 (https://github.com/ami-iit/jaxsim/actions/runs/9511311149)
Mmh, since it is related to hash and equality, maybe we can wait to merge #179.
What if we leave the actual soft-contact class defining the algorithm in
jaxsim.rbda
? If we plan to add multiple contact models, I'm ok in adding a new subpackagejaxsim.rbda.contacts.{soft|...}
.
Done in https://github.com/ami-iit/jaxsim/pull/178/commits/29991984118fc7e504f164a2c7e7c5f59ce45b52
Can you double check in our codebase where
JaxSimModel.build
is called? For sure, the newJaxSimModel.contact_model
attribute has to be copied when the model is reduced here.
The only part in which the contact_model
is not specified is in the test, yet this is not a problem since the soft contact model is the default value
I added the pass
statements and the rest of the suggestions in https://github.com/ami-iit/jaxsim/pull/178/commits/ab7a688aba91545e6372f9dac68436dd4efb5b27
Can you double check in our codebase where
JaxSimModel.build
is called? For sure, the newJaxSimModel.contact_model
attribute has to be copied when the model is reduced here.The only part in which the
contact_model
is not specified is in the test, yet this is not a problem since the soft contact model is the default value
Ok. Instead, regarding the model reduction, I meant that something to prevent a problem similar to #168 is still missing, right?
Can you double check in our codebase where
JaxSimModel.build
is called? For sure, the newJaxSimModel.contact_model
attribute has to be copied when the model is reduced here.The only part in which the
contact_model
is not specified is in the test, yet this is not a problem since the soft contact model is the default valueOk. Instead, regarding the model reduction, I meant that something to prevent a problem similar to #168 is still missing, right?
It's indeed there https://github.com/ami-iit/jaxsim/blob/dfebf773d924ad6ab67b91891b28cc4281dbc369/src/jaxsim/api/model.py#L369
Can you double check in our codebase where
JaxSimModel.build
is called? For sure, the newJaxSimModel.contact_model
attribute has to be copied when the model is reduced here.The only part in which the
contact_model
is not specified is in the test, yet this is not a problem since the soft contact model is the default valueOk. Instead, regarding the model reduction, I meant that something to prevent a problem similar to #168 is still missing, right?
It's indeed there
Woops, sorry my bad. All good then, thanks!
This pull request refactors the contact models to enhance flexibility and future extensibility. Key changes include:
ContactModel
base class together withContactsState
andContactParams
SoftContactModel
,SoftContactParams
andSoftContactState
to inherit fromContactModel
for consistency.contact_model
attribute toJaxSimModel
.These changes allow specifying different contact models during instantiation, facilitating the development of additional contact models in the future.
C.C. @xela-95
📚 Documentation preview 📚: https://jaxsim--178.org.readthedocs.build//178/