[ODE] Stability problems

Matthews, Steve USA swmatthe at nps.navy.mil
Wed Feb 19 09:02:01 2003


Try making your world step time consistent and much smaller, regardless of visual FPS, by using code like:

***********
   int i;

   const static double WORLD_STEP_TIME = 0.0001;
   int numWorldSteps = (int)(systemTimeSinceLastFrame/WORLD_STEP_TIME);


   for (i=0; i < numWorldSteps; i++)
   {
      collide();
      worldStep(WORLD_STEP_TIME);
      emptyContactGroup();
   }

   double leftoverWorldStepTime = 
         systemTimeSinceLastFrame - numWorldSteps * WORLD_STEP_TIME;

   collide();
   worldStep(leftoverWorldStepTime);

   emptyContactGroup();
**********
  (Sorry the code is not ODE syntax, but this is what I'm using, and it's pretty close)

This will ensure that the step time in your world is consistent and SMALL.  There are numerous posts in the archives that cover these stability (of the physics world) issues.

   Hope it helps!

Bootshine

-----Original Message-----
From: Tobias Thorsen [mailto:tobias@chaseace.com]
Sent: Wednesday, February 19, 2003 12:28 AM
To: ode@q12.org
Subject: Re: [ODE] Stability problems


hmm...
I am using variable step sizes... but it happens even if my system runs a
stable 60fps. The step size will never be larger than 1/30.

Tobias

----- Original Message -----
From: "Clint Brewer" <clint@haptek.com>
To: "Tobias Thorsen" <tobias@chaseace.com>
Sent: Wednesday, February 19, 2003 9:23 AM
Subject: Re: [ODE] Stability problems


> hi Tobias,
> I had wierd things happening before I set up ode to be "stepped" at a
> constant interval. Things would look just fine, then all of a sudden
> things would start bouncing for apparently no reason.
>
> but this wasn't exploding like you describe, so probably not the same
> problem.
> -c
>
>
> Tobias Thorsen wrote:
>
> > Hi there
> >
> > I'm havning some stability problems here. I am running a pretty simple
> > system but sometimes everything just explodes. >From one frame to the
> > other my  dynamic models are blasted of to infinity!
> > I would expect this sort of behaviour if the framerate is low and
> > things get entangled in deep collisions, but thats not really the
> > case. Infact it tend to happen when everything is stable, and models
> > are falling freely, or resting on the ground.
> > I am about to make a hack where i preserve positions of models, detect
> > if they are moved away to infinity and move them back if thats the
> > case. Before i do that, is there anyone who has found silimar
> > behaviour with ODE?
> >
> >
> > Thanks
> > Tobias
>
>
>

_______________________________________________
ODE mailing list
ODE@q12.org
http://q12.org/mailman/listinfo/ode