[ODE] Changing simulation step size

SJS ode at pulsecode.net
Thu Aug 11 21:22:19 MST 2005


> > 2) Right now at every timestep I add an amount of torque to
> each joint.
> > Does this value need to be scaled somehow or will it remain the same
> > irregardless of step size?
>
> I think you mean "irregarding" or perhaps "regardless".
>
> No, it won't remain the same. The impulse added is force times duration
> (or torque times duration).

If you're adding an impulse of torque or force, no, it won't remain the
same-- impulse height will scale inversely with timestep (half time step
yields twice impulse height; dt/10 -> impulse height*10, etc.), but I think
that wasn't the question.

If you're really using torque, ideally (real physics, integrator that mimics
continuous time) you SHOULD be able to keep it the same even when your step
size changes, but for ODE it will probably need some adjustment because of
discrete time steps (use of euler integrator makes this even more likely,
but even with the best integrator the numerical integration wouldn't be
perfect).  The exact amount (and sign) of adjustment unfortunately will
probably be very dependent on the particular simulation (joint arrangement,
current joint orientation).  You may be able to compensate within some
reasonable range of time steps (maybe a factor of 2 or 3), but the deviation
will become larger as the ratio of time steps gets larger.

SJS



More information about the ODE mailing list