[ODE] Couple of problems with reaching an acceptable stability.

Jon Watte hplus-ode at mindcontrol.org
Thu Apr 7 16:55:03 MST 2005


I suggest you add the following three things:

1) Use a fixed step size. If more real time elapsed than your step time 
   while you're rendering, step again. A good number to start out with 
   is 0.01 (for 10 milliseconds).
   http://www.mindcontrol.org/~hplus/graphics/game_loop.html tells you 
   how to make sure things don't run too slow or too fast (don't do any 
   interpolation for now; just ignore that bit).

2) Turn on damping. I believe someone added this to ODE proper, but I 
   don't know if it was actually included in the API (on CVS). If not, 
   go to the Wiki and look for code, or just call dBodyAddForce() with 
   -0.02 times the velocity, and dBodyAddTorque() with -0.02 times the 
   angular velocity, as a starting point, each step.

3) Turn on auto-disable (sleeping), so that bodies go to sleep if they 
   haven't moved for a little while.

Cheers,

			/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Vast
Sent: Thursday, April 07, 2005 4:42 PM
To: ode at q12.org
Subject: [ODE] Couple of problems with reaching an acceptable stability.


Hey everyone!

Ok, I am using ode and everything is fine, except for the bodies
disturbingly penetrating each other, jittering all the time, and
falling over (box stacks) instead of being steady.

As far as i understand, if the stepsize  is less, the collision
detection would detect collision sooner, if not right away, and
everything would be fine. If i set the stepsize to 0.00001, lol,
everything runs too slowly. But not framerate wise, just the physics
simulation.
If I set the stepsize to something low, my collision becomes a lot
more accurate, and thats what I would want.

Is it possible to have a constant collision detection check?
What could i do to fix this? Because, penetration of surfaces is
unexceptable... in my case anyway.

Also, what tricks does everyone here use to achieve their best
stability, because I am starting to get really really sad, since I
can't reach anything that I would release with my engine.

I didnt even go into joints yet, lol, can't imagine the pain =)

Also, what does everyone here do to stop the jittering? I mean, I
stack about 10 cubes, each one is 0.5 gl-units high/wide/tall, under
different angles (just the y axis angles, y is my vertical axis).
After about 10 cubes, I can see the medium-sized tower starting to
move sideways, just slightly, making it pretty strange.
Oh yes, in my engine, 1 gl-unit is about 1 meter. I set the gravity to
2.5 to simulate the 'normal' gravity, of earth that is. Seems to do
the job pretty well.

Anyway, if everyone could share their stabilization tips, I would
GREATELY appreciate it.

Thanks!
Tim
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list