[ODE] vector has zero size

Wouter Mollemans wouter.mollemans at gmail.com
Wed Oct 18 05:20:23 MST 2006


Thx I will try to use your solution, but this is of course only a work 
around.  Does anyone has an idea what causes these infinite values?

Is it the collision detection algorithm? I noticed that the collision 
algorithm (dCollide()) frequently reports a NaN value for the position 
value of the first contact (contact[0]).


Alex Green wrote:
> Apporx once every 12000 simulations I get the same error. The error can 
> be detected. I run a function called 'checkPhysicsForError()' per frame. 
> It works as follows:
> 
> bool checkPhysicsForError(void){
> dReal *pos = (dReal*) dBodyGetPosition(bodyID of one of my boxes);
> if(!(pos[0]==pos[0]) || !(_finite(pos[0])))
> {
>     dWorldDestroy(world);
>     reset all my stuff
>     create everything again;
>     rewind one test (ie do the one that failed from the beginning);
>     return true;
> }
> else return false;
> }
> 
> Notes:
> pos[0] == pos[0] checks for NAN (not a number);
> _finite() is windows, is there a cross platform check?
> 
> Cheers -alex
> 
> Wouter Mollemans wrote:
>> After some debugging, I noted that some of the collision points are 
>> lying at infinity. This causes dNormalize4() to go nuts. Has anyone 
>> seen this problem before and do you know what causes this effect?
>>
>> Greetz
>> Wouter
>>> Hi,
>>>
>>> In my simulator I try to fit two rigid objects into eachother (a 
>>> little bit like a 3D puzzle).  The rigid objects are trimeshes 
>>> (around 4000 triangles) and all my joint are of the type contact. 
>>> Sometimes this works nicely, but mostly I get following message: "ODE 
>>> message 2 : vector has zero size" emmtted by dNormalize4(). 
>>> Consequently the velocity becomes Nan and my simulation is ruined.
>>>
>>> Is there a solution? Is there a maximum number of triangles that can 
>>> be used or what is the source of the error?
>>>
>>> Thanks
>>> Greetz
>>> Wouter
>>>
>>>
>>> -- 
>>> _______________________________________________
>>> ODE mailing list
>>> ODE at q12.org
>>> http://q12.org/mailman/listinfo/ode
>>>
>>>   
>>
>> _______________________________________________
>> ODE mailing list
>> ODE at q12.org
>> http://q12.org/mailman/listinfo/ode
>>
> 


More information about the ODE mailing list