Closed duburcqa closed 8 months ago
It appears that the root cause of the exception (Too many successive constraint solving failures.
) is not related to integration failure but rather inherent numerical instabilities of the contact solver, which is known to have poor convergence property. Here is a figure of the joint acceleration before raising the exception:
Smoothness of the accelerations is a major concern, in terms of simulation speed but also learning speed.
Two options at may improve convergence:
Before implementing under-relaxation:
Currently, the lambda multipliers of the constraints are not reset to their original value if the integration step failed. This is an issue because they are used as initial guess for the constraint solver. This coupling seems to be problematic on
gym_jiminy.envs:atlas
environment. Here is a snippet to reproduce the issue:An additional buffers with the values at the previous iteration should be stored next to
contactForcesPrev_
,fPrev_
andaPrev_
.