dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
3.93k stars 244 forks source link

Joint motor not converging #451

Closed luxalpa closed 5 months ago

luxalpa commented 1 year ago

I'm trying to use joint motors to get a skeleton try to stick to a specific pose. While it works for some configurations of joints, it doesn't work for others.

Here is a reproduceable example project: https://github.com/luxalpa/rapier-motor-repro/blob/main/src/main.rs

As can be seen when running the example, the motor just never converges.

Tested with different versions (16.1, 17.1, and one of the PRs).

I tried various complicated workaround but none of them worked.

sebcrozet commented 5 months ago

Joint motor convergence has been significantly improved with the new constraints solver. In your example, it is now converging at step 108. I’m closing this issue, but feel free to open a new one if you find a new problematic test case.