-
Notifications
You must be signed in to change notification settings - Fork 13
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
Update ContactModel.compute_contact_forces
APIs
#247
Conversation
44060d2
to
6a37c5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Diego, LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @diegoferigo!! LGTM!
6b8753b
to
a6737cb
Compare
a6737cb
to
cecc824
Compare
Co-authored-by: Filippo Luca Ferretti <102977828+flferretti@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the review! This improves a lot the readability and the logic of that part of the codebase
The new contact models that have been introduced recently need to consider the whole system dynamics to compute the contact forces. This was not necessary in the original
SoftContacts
model. However, this is just a simplification specific to theSoftContacts
model implementation, and it is the main reason why they can run so fast compared to the new models.I believe that the most generic APIs take
model
anddata
as input arguments instead ofposition
andvelocity
. This also aligns the disparity in which theposition|velocity
arguments ofSoftContacts
were the individual ones, while for the other contact models were the vmapped ones. Furthermore, it removes the ambiguity for the other contact models in which the passedposition|velocity
could differ from the kinematics that can be computed frommodel|data
.📚 Documentation preview 📚: https://jaxsim--247.org.readthedocs.build//247/