[ODE] Re: How do you determine the quality of a physics library?

nlin@nlin.net nlin at nlin.net
Thu Mar 14 08:02:02 2002


> How do you say this physics SDK is better than another? And
> that it does its job, that is, the simulations are correct. And how
> do you prove that to someone with little or no background in physics
> simulators. I'm using ODE for simulating wheeled mobots -- it's an
> undergraduate engineering project. I'm close to finishing the project,
> and I'm expecting the faculty panel to ask that question during project
> presentation.

"Correctness" is hard to define, as Russ said - also see the opening
paragraphs of David Baraff's PhD thesis "Dynamic simulation of
non-penetrating rigid bodies", where he candidly admits (p.2) that "we
do not consider the dynamics models used in this thesis to be empirically
correct. That is not to say our dynamics models are ad hoc or deliberately
wrong ... our 'simple' dynamics models are incomplete descriptions of
more 'complicated' dynamic models". The next several paragraphs are a
good description of how simulation relates to the real world. It puts
the whole business of simulation in a good perspective.

Another important aspect is stability. ODE's design tries to reduce
parameter tweaking, since (as I think Russ pointed out in an earlier
message last year) if N bodies each have M tuneable parameters, and if
the stability is very sensitive to the values of the parameters, then
finding a "stable" configuration by tweaking parameters is essentially
a search in M^N dimensional space!

There is also the question of existence of solutions. As far as I know,
ODE is the only freely available simulator to make use of David Stewart's
recent (1998?) time-stepping method, which for the first time in ths
history of rigid body dynamics solved Painleve's paradox and proved
that rigid body dynamics with friction was consistent and that the
time-stepping formulation of the rigid body dynamics problem always
has solutions.

However, I think ODE uses a custom approximation to friction different
than that used by Stewart in his proof, so I'm not sure about the
guranteed existence of consistent results. Russ?

But the whole "existence of solutions" issue is probably mostly
theoretical rather than practical since in practice due to numerical
error and soft constraints you are always drifting into slightly illegal
configurations, so even if for one timestep no consistent solution
could be found because the underlying formulation is mathematically
inconsistent in some cases, this will likely only be a problem for one/a
few timesteps (leading to brief inconsistency/illegality of the system
state, which occurs anyway). But it is nice to know that fundamentally,
with Stewart's formulation, it is always possible to evolve the system in
a way which satisfies rigid body constraints and the Coulumb friction law.

-Norman