Direct solver

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
nicokruithof
Posts: 4
Joined: Sat Jun 09, 2012 8:34 am

Direct solver

Post 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?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Direct solver

Post 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
nicokruithof
Posts: 4
Joined: Sat Jun 09, 2012 8:34 am

Re: Direct solver

Post 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?
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: Direct solver

Post 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.
nicokruithof
Posts: 4
Joined: Sat Jun 09, 2012 8:34 am

Re: Direct solver

Post by nicokruithof »

thanks for clearing that up.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Direct solver

Post 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.
Post Reply