-
Notifications
You must be signed in to change notification settings - Fork 14
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
Reintroduce alternative contact models and streamline changes to the new API #360
base: main
Are you sure you want to change the base?
Conversation
5ec7f2b
to
a7b7150
Compare
ca8e2a3
to
d4ae223
Compare
Ready for review @ami-iit/darwin. Thanks! |
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 @flferretti !! I left some minor comments. By the way, remember to remove the hunt_crossley_model
function from the relaxed rigid contact model since now we have restored the soft contact model that has this function built in.
@flferretti did you notice that here we have also the |
Yes, but the results are not deterministic, as the test passes if re-run with |
@@ -37,14 +37,11 @@ def collidable_point_kinematics( | |||
the linear component of the mixed 6D frame velocity. | |||
""" | |||
|
|||
# Switch to inertial-fixed since the RBDAs expect velocities in this representation. | |||
with data.switch_velocity_representation(VelRepr.Inertial): |
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.
We should pay attention to this change of representation for PR #359 in which the property returns data in the active representation (not always inertial)
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.
I'm accessing the attributes, not the property, so I believe it should always return the quantity in inertial representation, right?
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.
Yes, I agree, it should be equivalent
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.
yep true. Coming from other languages I don't like to access directly the "private" attributes of a class, is like coupling to the inner implementation of it. If in a next PR we change the representation in which they are stored it will be difficult to backtrace errors here, while if we use the class API we are relying on the class contract.
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.
Good point, we should see them as protected rather than private
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.
Leaving unresolved for now, thanks for pointing this out
4280c6f
to
05bbe6e
Compare
ccb1c2e
to
9b2a238
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.
Thank you! I added some comments :)
Requires #360 to avoid warnings
6fa0a76
to
a2e6a1a
Compare
Requires #360 to avoid warnings
Requires #360 to avoid warnings
Requires #360 to avoid warnings
This reverts commit 9408f74.
3005e41
to
59a2a7b
Compare
This PR restores the alternative contact models of the original API and streamlines changes to the rest of the codebase
📚 Documentation preview 📚: https://jaxsim--360.org.readthedocs.build//360/