Minimizing Energy Loss in High-Impact Simulations with Joint Limits in MuJoCo #2647
Unanswered
caba0404
asked this question in
Asking for Help
Replies: 1 comment 5 replies
-
Hi, You could get better help if you shared the model you are working with. Here are some suggestions (mostly regarding contact parameters, which might be useful for the constraint model in general)
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
Hello everyone,
I’m using MuJoCo for high-energy impact simulations with tensegrity robots
My setup
My current setup is:
• solver: Newton
• integrator: RK4
• cone: elliptic
• solimp.d: 0.999
• codim: 1
My question
For contacts and joint limits, I’ve been tuning the solref parameter to reduce energy loss. Specifically, I’m using:
solref="-1/dt^2 0"
where dt is my simulation timestep. While this helps reduce energy dissipation, I still observe significant energy loss during joint limit engagement and ground impacts.
Has anyone found a robust configuration for \texttt{solref} that minimizes energy loss, especially during impacts and joint limit collisions? Are there additional parameters---such as increasing \texttt{solimp.mindist}, tuning \texttt{imp_ratio}, or increasing solver iterations---that can help achieve near-conservative behavior?
The following plot illustrates the energy behavior during simulation. As shown, energy losses become evident when the joint limits are active. Moreover, there is a noticeable drop in energy at around \textbf{0.7 seconds}, which corresponds to the moment the robot impacts the ground.
Total_Energy.pdf
In addition, I am wondering if there is a way to explicitly define the stiffness to prevent energy loss. I noticed that using lower stiffness values (\texttt{k}) results in higher energy dissipation, particularly during joint limit activation. However, when \texttt{k} is set too high, I observe an unphysical increase in total energy, especially at the moment of ground impact. This suggests a numerical instability or energy injection caused by an overly stiff contact model. It appears there is a delicate trade-off when selecting the appropriate stiffness value: too low leads to damping-like energy loss, and too high can result in energy gain. Any recommendations on how to balance this stiffness setting effectively to achieve near-conservative dynamics would be greatly appreciated.
Any insights or recommendations would be greatly appreciated!
Thanks in advance,
Agustin
XLM Code
Beta Was this translation helpful? Give feedback.
All reactions