Page 1 of 1

Direct solver

Posted: Tue Jul 02, 2013 1:31 pm
by nicokruithof
Is it possible to use a direct solver in bullet instead of an iterative Gauss-Seidel solver? For example would it be possible to integrate the dWorldStep of ODE in bullet?

Re: Direct solver

Posted: Wed Jul 03, 2013 4:23 pm
by Erwin Coumans
Yes, some people integrated some direct solver to Bullet in the past, but we haven't integrated it yet.

Possibly after we release the first version of our new GPU rigid body pipeline for Bullet 3 (http://github.com/erwincoumans/bullet3), we'll look into adding a direct solver.
Thanks,
Erwin

Re: Direct solver

Posted: Wed Jul 03, 2013 7:33 pm
by nicokruithof
That is good news. I sometimes don't get the accuracy I would like to have.

What is the best thing to do with the current solver to increase accuracy? I'm particularly interested in the precision of the constraints. I could increase the number of iterations. Is it possible to use a different integrator (higher order)? Or use the odeint library that is part of boost?

Re: Direct solver

Posted: Thu Jul 04, 2013 5:00 am
by Dirk Gregorius
The best way is to use smaller timesteps and the second best is more iterations. Using a direct solver can solve some of your problems, but if your system is over-constrained the solver might find no solution at all. Finally direct solvers are usually O(n^3) as opposed to the iterative solver which is linear in time and space.

Bullet solves a DAE and not an ODE. So I don't think that boost can help.

Re: Direct solver

Posted: Thu Jul 04, 2013 5:28 am
by nicokruithof
thanks for clearing that up.

Re: Direct solver

Posted: Thu Oct 31, 2013 5:59 pm
by Erwin Coumans
The latest SVN trunk of Bullet has various improved quality constraint solvers you can try out:

1) btDantzigSolver
2) btLemkeSolver
3) btNNCGConstraintSolver

Also, there is a btMultiBody Featherstone implementation, useful for chain and tree structures,such as ragdolls, vehicles etc.

The btNNCGConstraintSolver is most similar to the existing btSequentialImpulseConstraintSolver (SI), and with a higher iteration count (500 to 2000) it converges better than SI.

As Dirk mentioned, using a smaller internal time step (for example using stepSimulation(deltatime, 10, 1./240.) and/or switching on double precision can help too.