[ODE] Relation between mass, gravity and step size
Nate W
coding at natew.com
Tue Sep 10 10:27:01 2002
On Tue, 10 Sep 2002, Michael Merz wrote:
> 1. If I change just the sWorldStep the mass (or/and the gravity) seem to
> change as well. Why and how is it changing?
I don't think it should change... are you certain that the scene is being
rendered at exactly the rate that your WorldStep parameter indicates? If
the dWorldStep time is less than the rendering frame rate, things appear
to slow down - I can see how that might look like reduced gravity.
> 2. To construct a real world model I need to simulate the gravitational
> force of the earth. What's the unit of mass? If I set dWorldSetGravity
> (world,0,0,-9.81) in the example test_buggy it does not look real at all.
Units are arbitrary. What matters is the relationships between units, for
example if you use -9.8 for gravity then you should ensure that all of
your length dimensions are in meters.
> 3. Is there a possibility to give objects properties such as elasticity or
> surface condition?
Not that I know of. You can make joints somewhat elastic with "large"
values of CFM (like 0.1), but that may not give the effects you're looking
for.
> 4. The 'jittering' and the 'explosions' that happens sometimes is not
> avoidable, isn't it? Where does it come from? How can it be reduced?
See section 10 of the documentation, especially 10.4:
http://q12.org/ode/ode-latest-userguide.html#ref80
I find that tuning the global CFM is usually enough to avoid explosions.
Very low values (e.g. 0.00001) make very 'rigid' simulations, which tend
to jitter and explode. Higher values like 0.001 are more forgiving, but
may introduce a bit of unwanted elasticity. When I create something with
ODE I usually play with the CFM a little bit to see how rigid I can make
it before it misbehaves. ERP can also be reduced to increase stability.
It's also important not to have motors that try to drive joints past their
limits or that press bodies into each other - it seems to me that both of
those will almost certainly cause jitter.
I hope this helps!
--
Nate Waddoups
Redmond WA USA
http://www.natew.com