[ODE] Newbie Question on Numerical Integration Method

David Black dblack at fastmail.fm
Tue Jun 7 14:37:50 MST 2005


[oops, didnt go to list first time... Is there a good reason the 
reply-to is not set to the list? It keeps catching me out:-(]

Hi,

>
> The ODE solver uses a first-order forward integrator; it cannot switch 
> methods (as doing the LCP solver to a higher order would be 
> significantly harder...)
>

I dont think this is necaserily true... Depending how you set things up. 
There is nothing stopping the LCP solver being invoked each time it is 
necasery to compute d/dx in the integrator. From my own 
experimentation(not with ODE), I have found that doing this leads to big 
improvments in certain kinds of simulation (pendulums and ragdolls 
without lots of damping for example).

Of course there is a cost to using a higher order integrator, but 
sometimes it is worth it(even for game like scenarios). The cost 
shouldnt be as big as it has been in the past as well since ODE has 
moved to an iterative solver(quickstep), which would allow warm starting.

As for implimentation, surely that is just a case of modifying the 
stepping code in quickstep.cpp(and adding some tempory storage). 
Assuming of course you dont want to update the contact set at each 
substep...

David

Jon Watte (ODE) wrote:

>
> The ODE solver uses a first-order forward integrator; it cannot switch 
> methods (as doing the LCP solver to a higher order would be 
> significantly harder...)
>
> If you have "wiggle" on resting bodies, the first thing to look at is 
> your time step. You should be using a fixed time step, and step enough 
> times to catch up to real time, but no more. The reason for this is 
> that bodies "resting" in ODE really are continually falling into the 
> ground, and getting a penalty force applied that pushes them out. If 
> the time step varies, they fall different lengths each timestep, and 
> get different forces applied, which ends up causing instability.
>
> There's a discussion about fixed time step implementation at 
> http://www.mindcontrol.org/~hplus/graphics/game_loop.html
>
> Another thing most people do is add dampening for both regular inertia 
> and rotational inertia. Each time step, get the velocity and angular 
> velocity for each object, and add a small "drag" force/torque counter 
> to the current movement; typically on the order of one percent of the 
> current velocity.
>
> The last thing to do is to realize that ODE is a system designed to 
> give you believable simulations for computer games, not 
> engineering-quality simulations of arbitrarily complex scenes. If 
> that's your goal, you want to use more complex, often offline methods.
>
> Cheers,
>
>             / h+
>
>
> James wrote:
>
>> Hi,
>> Some strange things are happening with my simulation and an 
>> engineering friend of mine suggested that it may be because my 
>> simulator is using Euler's method for stepwise numerical integration. 
>> He suggested I look into switching to another method, such as 
>> Runge-Kutta.
>> I'm not an engineer and, alas, I don't precisely know what he's 
>> suggesting. I am wondering though, which method does ODE use by 
>> default? Is there a way to switch methods? Can this be the cause of 
>> weird behaviour such as accelerated 'wiggle' of bodies that should to 
>> be static?
>> Thanks in advance,
>> James
>> _______________________________________________
>> ODE mailing list
>> ODE at q12.org
>> http://q12.org/mailman/listinfo/ode
>>
>>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list