Hello,
I wanted to try MLCP solver with featherstone physics so I went and made btMultiBodyConstraintSolver inherit from btMLCPSolver, added a constructor to accept a MLCPSolverInterface object and in btMultiBodyConstraintSolver.cpp, I changed the calls to btSequentialImpulseConstraintSolver:: into btMLCPSolver::
And it does not work (objects fall through ground, where they properly bumped when using the unmodified btMultiBodyConstraintSolver).
Do you know what I am missing / doing wrong? Thank for any help. I will post the solution if I find it.
MLCP as MultiBodyConstraintSolver
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: MLCP as MultiBodyConstraintSolver
This is currently not supported. btMultiBody Featherstone implementation only works in combination with the btMultiBodyConstraintSolver. The Featherstone constraints are solved in the same loop as the PGS/SI constraints, so it cannot be trivially ported over to a MLCP constraint solver. I do plan to integrate the MLCP solvers with Featherstone in the future, but it requires a bit more work than just overriding some methods. In a nutshell, the Featherstone constraints needs to fill the A matrix and rhs vector, similar to the other constraints, and then we can solve the matrix using either PGS, Dantzig, Lemke etc. Afterwards, we need to apply the 'appliedImpulse' as 'deltavee' to the btMultiBody.
It is likely easy to couple the btMultiBodyConstraintSolver with the new btNNCGConstraintSolver (in SVN trunk). With iteration count of about 100 to 2000, it converges much better than PGS and the performance is better than Dantzig/Lemke solvers. You might want to try it out.
See also Bullet/Demos/FeatherstoneMultiBodyDemo for the use of Featherstone (but you likely already did)
Thanks,
Erwin
It is likely easy to couple the btMultiBodyConstraintSolver with the new btNNCGConstraintSolver (in SVN trunk). With iteration count of about 100 to 2000, it converges much better than PGS and the performance is better than Dantzig/Lemke solvers. You might want to try it out.
See also Bullet/Demos/FeatherstoneMultiBodyDemo for the use of Featherstone (but you likely already did)
Thanks,
Erwin
-
- Posts: 5
- Joined: Tue Nov 05, 2013 3:05 am
Re: MLCP as MultiBodyConstraintSolver
Noted. Thanks for the prompt reply!