[ODE] CFM, ERP, stepsize, bNormalizationResult failed

Daniel K. O. danielko.listas at gmail.com
Tue Nov 20 21:30:42 MST 2007

Jon Watte (ODE) escreveu:
> However, you should be able to use tighter constraints (0.9 and 0.0001, 
> say) if you apply rotational dampening to each body each step. Try this, 
> for each body, for each step:
>   float const *f = dBodyGetAVel(body);
>   scale = get_body_scalar_mass(body) * 0.01;
>   dBodyAddTorque(body, -f[0] * scale, -f[1] * scale, -f[2] * scale);
> This ought to stabilize the system without negatively affecting the 
> simulation too much.
> You can do the same thing with linear velocity, too.

Proposal: two new utility functions.

dAngularDamp(dBodyID body, dReal scale);
dLinearDamp(dBodyID body, dReal scale);

A patch is on the way, as soon as we agree with a good naming.

Daniel K. O.
"The only way to succeed is to build success yourself"

More information about the ODE mailing list