-
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
Add relaxed rigid contacts model #223
Conversation
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.
Great work @flferretti! I left an initial review with some comment. Let's align on the merging strategy as soon as @xela-95 is back and #218 gets reviewed as well.
4fb23ed
to
a562aea
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.
Great, well done @flferretti. All looks good - just minor suggestions excluding a methodological question on the free acceleration. I'll give you green flag as soon as it will be answered.
7a0758a
to
f588068
Compare
f588068
to
9537c2c
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 for the updates @flferretti. I still have a doubt on the representation used in
Co-authored-by: Diego Ferigo <diego.ferigo@iit.it>
Co-authored-by: Diego Ferigo <diego.ferigo@iit.it>
fb3cb28
to
43e50d2
Compare
3319598
to
ae1ff74
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.
Awesome, good to go now. Just the last minor suggestions. Great work @flferretti.
# Convert the inertial-fixed base acceleration to a mixed base acceleration. | ||
W_H_B = data.base_transform() | ||
W_H_BW = W_H_B.at[0:3, 0:3].set(jnp.eye(3)) | ||
BW_X_W = math.Adjoint.from_transform(W_H_BW, inverse=True) | ||
term1 = BW_X_W @ W_v̇_WB | ||
term2 = jnp.zeros(6).at[0:3].set(jnp.cross(W_ṗ_B, W_ω_WB)) | ||
BW_v̇_WB = term1 - term2 | ||
|
||
BW_ν̇ = jnp.hstack([BW_v̇_WB, s̈]) |
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.
@xela-95 not necessarily before this PR is merged, can you provide some feedback that this computation is equivalent with the new one? Just want to be sure that everything stays consistent.
ae1ff74
to
3c75735
Compare
Co-authored-by: Alessandro Croci <alessandro.croci@iit.it> Co-authored-by: Diego Ferigo <diego.ferigo@iit.it>
3c75735
to
a09bc0d
Compare
Good to go! Last, can you please link in the first comment the url to code/documentation of Mujoco/Brax from where this contact model got inspired? Thanks! |
6c47479
to
42aed4b
Compare
This PR adds an alternative rigid contact model in which the holonomic constraint is relaxed. This allows some penetration, while guaranteeing more stability with respect to the spring-damper model. It is worth noting that the slipping behavior is not considered.
Note
This model is based on https://ieeexplore.ieee.org/document/5979814 and the code is based on the
brax
implementation in https://github.com/google/brax/blob/main/brax/generalized/constraint.py📚 Documentation preview 📚: https://jaxsim--223.org.readthedocs.build//223/