[ODE] Non-deterministic behavior (tri-mesh Collisions?)

Josh Welber josh at largeanimal.com
Sun Aug 24 08:59:02 2003


Shaul--
thanks for the quick reply -- I was hoping to hear this (that it is a bug 
in our code, not ODE). In any event, to answer your questions:

-we have tested on XP and win2K same behavior on both
-we are not using directX (although we might).  We have integrated ODE into 
the Torque engine and that are using its OpenGL version (it can do either 
DX 8 or openGL, but the OpenGL support seems better)
-the non-deterministic result seems to come as the result of a collision 
between the ground (a trimesh) and a sphere (or maybe any object, not sure).
-no random numbers.

My suspicion is that something about either the way the contact joints are 
created by us (in the callback function for those) or the way the 
collisions are detected inside ODE is causing this.  I know that the 
initial state each time is the same.

So, if you have any thoughts on how one might, inadvertently and 
non-obvoiusly, create non-deterministic behavior when creating contacts 
from collision information would be good to hear it.

-josh

At 08:41 AM 8/24/2003 -0700, you wrote:
>A long long time ago, ( in a galaxy far far away? )
>there was a long discussion on stuff like this in the
>context of floating point arithmetic and how to save
>floating points to a file/load it from it.
>
>I don't know if that is your problem, but you should
>check it out.
>
>Apart from that: are you using some random number
>anywhere in there? is it non deterministic on all of
>your computers/OSs?
>Do you use directX ? there is something with floating
>point resolution in there as well.
>
>I asked if ODE is deterministic once (regarding the
>faststep, thinking that the regular solver is
>deterministic.. and by my tests it is) and got an
>explicit answer that it is.
>
>So, to summarize: it's probably a bug in your code :-|
>
>Shaul
>
>
>--- Josh Welber <josh@largeanimal.com> wrote:
> > Does anyone have experience with ODE giving
> > non-deterministic
> > results?  What I mean is specifically this:  We have
> > a simulation where you
> > shoot a ball out over a terrain and it starts
> > rolling from there.  The only
> > user input is the direction/spin/force that the ball
> > is launched with --
> > and all these are set with discrete controls. The
> > collisions in this case
> > are all between spheres and triMesh.  We have found
> > that the ball does not
> > in a deterministic manner -- but rather bounces
> > oddly sometimes, sometimes
> > acts as expected.  This is sometimes worse if there
> > is friction in the
> > collision contact, but even for frictionless
> > collisions it still reacts in
> > a non-deterministic way.  Does anyone have any ideas
> > about this one, seen
> > this behavior themselves?  I saw the posting
> > regarding friction causing
> > unexpected results -- this is a different problem.
> >
> > thanks
> >
> >
> >
> > Josh Welber
> > partner/tech wrangler
> > Large Animal Games
> > http://www.largeanimal.com
> > t: 212.989.4312
> > f: 305.489.5790
> >
> >
> > _______________________________________________
> > ODE mailing list
> > ODE@q12.org
> > http://q12.org/mailman/listinfo/ode
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>http://sitebuilder.yahoo.com

Josh Welber
partner/tech wrangler
Large Animal Games
http://www.largeanimal.com
t: 212.989.4312
f: 305.489.5790