[ODE] Re: Problem with rotating spheres

Bjoern Mahn bjoern.mahn at ais.fraunhofer.de
Tue Apr 1 05:26:01 2003


Hi,

> It's
> due to the fact that you are simulating an undamped system with a first
> order, fixed time step integrator. That means that small errors (even on
> the order of floating point representation roundoff) will compound over
> time.

Hmmm, can "small" rounding-error cause this heavy instability? 

> The time step you're using also affects how much error builds up ov r
> time. If you use a smaller time step in dWorldStep(world,delta) then the
> error builds up more slowly. In the test I ran, with time step = 0.01, the
> sphere began rolling off to infinity after 2 oscillations; with 0.005, 4
> oscillations; with 0.001, > 9.

Yes, but there would be the same phenomenom if there was an error in 
calculating sphere rotations, won't it?

> To create a stable appearing simulation, you need to damp the system, i.e.
> remove energy from it. You might look into surface friction, but I doubt
> that will be the complete solution. 

No, the friction is dInfinity and a friction=0 will not dump energy but will 
let the sphere rotate on its place.

> A simple solution might be to apply a
> force proportional to the big sphere's velocity opposing its motion. 

Hmm, but my aim is a most possible physically correct simulation. Somehow I 
don't believe in setting slips or removing energy "by hand". I'm sure, there 
is a better possibility.

> You
> might look in the archives for a previous discussion about slowing down a
> sphere rolling on a surface like grass.

OK, good idea. Thanks!

 Björn.