[ODE] CFM, ERP, stepsize, bNormalizationResult failed
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Tue Nov 20 19:55:56 MST 2007
It's not possible to simulate "perfectly stiff" joints in ODE, because
it is a solver that will find the system out of sync each step, and each
step try to bring it into sync based on the rules (constraints) you
provide. Something as simple as gravity will pull the system out of
sync. This is just a fact of life with game physics simulations (you get
similar behaviors in PhysX, Havok, et al).
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 * scale, -f * scale, -f * scale);
This ought to stabilize the system without negatively affecting the
simulation too much.
You can do the same thing with linear velocity, too.
ode at thoemsen.ch wrote:
> I'm simulating a 6-wheeled mobile robot with a rather complex suspension
> mechanism (parallel and closed kinematic loops). I get it to work but only with
> a "spongy" behavior. I've been experimenting with the CFM, ERP and simulation
> step parameters. The "hardest" constraints I can impose are: ERP=0.9 and
> CFM=0.001 at a step size of 0.005.
> Even if I set ERP to the default 0.2, I can't get any closer to the default
> value for CFM (9.9*10^-6). This means that the rover cannot be simulated with
> default ERP and CFM because l get an error that "bNormalizationResult" failed.
> Any ideas?
> With the current settings the rover is not stable in its initial state, i.e. the
> suspension is bending under the load of the body even though everything is made
> of rigid bodies. This indicates to me that ERP and CFM are too "soft". How can
> I fix this problem?
> Thanks for any help.
> ODE mailing list
> ODE at ode.org
More information about the ODE