[ODE] how to debug and fix NAN values

Benoit CHAPEROT b.chaperot at jstarlab.com
Tue Oct 30 06:34:31 MST 2007


Hi,

I have found a bug in my code, and you may have the same bug in your code.
I had one friction coefficient (mu) per Geom. When two geoms collided, I was
averaging their friction coefficients to find the contact's friction
coefficient between the two geoms while creating the contact in the
NearCallBack.
Some geoms had an infinite friction coefficient, others had a finite
friction coefficient.
Infinite friction coefficient are treated as a special case in the ODE code.
When averaging finite and infinite friction coefficients, I was getting near
infinite friction coefficients, which were then not treated as special case
by ODE, and produced NAN values in the solver every now and then.

Benoit

On 10/22/07, ode-request at ode.org <ode-request at ode.org> wrote:
>
>
> Message: 4
> Date: Mon, 22 Oct 2007 16:57:22 +0800
> From: Hampa <hampa at toribash.com>
> Subject: [ODE] how to debug and fix NAN values
> To: "ODE Mailing List ((E-mail))" <ode at ode.org>
> Message-ID: <34ABE95A-16D6-44CC-B16A-1268E4187DCB at toribash.com>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> Hi,
>
> Every now and then my simulation produces NAN values, usually during
> collisions using hi velocity objects.
>
> In the debug build (lastets 0.9 svn checkout) I get asserts in:
> ODE INTERNAL ERROR 1: assertion "bNormalizationResult" failed in
> _dNormalize4() [../../include/ode/odemath.h]
>
> What is the recommended way to debug and fix this kind of problems?
>
> cheers,
> hampa
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ode.org/pipermail/ode/attachments/20071030/2b5102c7/attachment.htm


More information about the ODE mailing list