Coefficient of restitution #2081
Answered
by
Aryan-Satpathy
Aryan-Satpathy
asked this question in
Asking for Help
-
Hi, I am a student trying to use MuJoCo for some physics simulation. I was wondering if there is a way to define the coefficient of restitution for geometries, or somehow translate coefficient of restitution to solimp and/or solref parameters? |
Beta Was this translation helpful? Give feedback.
Answered by
Aryan-Satpathy
Nov 27, 2024
Replies: 1 comment 3 replies
-
https://mujoco.readthedocs.io/en/latest/modeling.html#restitution |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Jack, I couldn't find a way to do it through MuJoCo. So, I approximated the collision as a damped spring between the bodies (when they are in contact) and manually applied the force before calling
mujoco.mj_step()
. The parameters are calculated as follows (this can be derived using energy conservation):ce
is the coefficient of restitution, andm_eff
is the harmonic mean of the two masses that are colliding. You need to consider inertia matrices and jacobians for the colliding bodies if there are joints on an…