[ODE] Better understanding about simulating surfaces

Jean de Largentaye jean at largentaye.org
Wed Aug 16 07:35:08 MST 2006


hm. Variable timesteps in ODE cause much pain, woe and gnashing of
teeth (and in some instances, raining frogs). It's possible, but not
trivial.
My uneducated guess is that your odd behaviour will be somewhat
lessened (disappear?) by using a fixed time step.
I've got to put this in the FAQ. I'll put a stupid stub with the weak
hope that someone more knowledgeable could fill it up with correct
instructions.

John, the Variable Timestep Warning Gnome

On 8/15/06, Jeff Kershner <jeff at jeffkershner.com> wrote:
> This is from the following code running at 75Hz:
>
> const double MAX_STEP = 0.005;
>
> while (elapsedTime > 0.0)
> {
>         const double step = min(MAX_STEP, elapsedTime);
>         elapsedTime -= MAX_STEP;
>         dWorldStep(m_World, step);
> }
>
> My step size seems to be 0.005 or 0.003 at ever iteration...  Is that
> acceptable?
>
> -----Original Message-----
> From: Megan Fox [mailto:shalinor at gmail.com]
> Sent: Tuesday, August 15, 2006 1:37 PM
> To: Jeff Kershner
> Cc: ode at q12.org
> Subject: Re: [ODE] Better understanding about simulating surfaces
>
> Make sure your step size is small (at most 0.01) to reduce bounciness.
>  Given the speeds at which your pool balls are likely travelling, I'd
> probably try and even smaller step size than that... shouldn't matter
> terribly much if all you're simulating is the pool table + balls.
>
> On 8/15/06, Jeff Kershner <jeff at jeffkershner.com> wrote:
> >
> >
> >
> >
> > I am interested in simulating something like a pool ball bouncing off the
> > ground.  The ball is very dense and when it bounces it should be a very
> > short bounce and lay to rest relatively quickly.  Right now I am playing
> > with the parameters in the NearCallback function and I am getting all
> kinds
> > of huge bounces.
> >
> >
> >
> > How can I get this kind of example to work?
> >
> >
> >
> > Thanks,
> >
> > /jk
> > _______________________________________________
> > ODE mailing list
> > ODE at q12.org
> > http://q12.org/mailman/listinfo/ode
> >
> >
> >
>
>
> --
> -Megan Fox
> Idyllon, LLC
> http://shalinor.circustent.us/megan/resume/
>
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>


More information about the ODE mailing list