[ODE] vector has zero size

Alex Green alexg at acfr.usyd.edu.au
Wed Oct 18 04:10:39 MST 2006

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])))
	reset all my stuff
	create everything again;
	rewind one test (ie do the one that failed from the beginning);
	return true;
else return false;

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