[ODE] movement force conversion

Jon Watte hplus-ode at mindcontrol.org
Mon Apr 11 15:24:05 MST 2005

> >> new_ang_vel = (new_angle - old_angle) / delta_time;

> JW> Don't divide desired velocity by delta-time, because your 
> JW> desired velocity is not dependent on the time step size. 
> JW> You can instead multiply by a response constant K, which 
> JW> you can tune.

> It is not the time step used for ODE, it is time connected with
> animation (time from last animation update). I use this delta_time b/c
> I want my model to be in animation time domain. However this couse

It doesn't matter. The unit of velocity is radians per second. 
The unit of delta_time is seconds. Thus, your "new_ang_vel" will 
end up with the unit of "radians" which is wrong for a velocity.
You have a type error in your math: this indicates a broken 

> JW> What's the value of Inertia? And if it's the inertia tensor, 
> JW> what reference frame is it in?

> It is inertia given from body which I'm trying to control - it is
> right (I think).

What is the type of the inertia? If it's a scalar, you're probably 
OK; that's just a tuneable. You should remove the division by time 
in the velocity calculation, and try again.

> when I don't use any joints then my model looks like possessed by the
> demon, generaly you can see that it is trying to walk but its fingers,
> and head goes in strange positions (it sometimes hits another model
> which is pretty far away) - it is b/c of some numerical errors?
> Or it should be like that?

It is because of something you do wrong. It could be anything from 
converting quaternions wrong (ODE has quaternions in w,x,y,z order) 
to the pieces having geoms that collide with each other and generate 
penetration contact forces.

> BTW Is ODE FPU safe? I'm using MASM writen function which do a lot on

ODE will not muck with the FPU control register. However, you'd better 
set the control register the way you want it before calling ODE, 
because it will not (re-)set it.


			/ h+

More information about the ODE mailing list