[ODE] vector has zero size
Wouter Mollemans
wouter.mollemans at gmail.com
Thu Oct 19 00:53:24 MST 2006
I think that the source of my problem and that of mister John Rieffel
could be exactly the same.
I copied the forum message of mister Rieffel here bellow.
Greetings
Wouter
>>John Rieffel wrote:
> Hi Folks,
>
> since switching from ODE 0.5 to 0.7, I've been encountering the
> following error continuously dumped to my screen, but only when
> collisions are enabled in my system:
>
> ODE Message 2: vector has zero size in dNormalize4()
>
> This seems to occur whenever two parallel flat surfaces collide
> (most often one of those surfaces is the floor). Capped cylinders,
> for instance, produce no errors when colliding with each other, but
> do when they lay flat on the floor. Switching from cylinders to
> boxes doesn't change anything.
>
> This occurs with MAX_CONTACTS set to 20, and at all step sizes i've
> tested, from 0.1 to 0.005.
>
> My nearcallback is copied verbatim from the boxstack example, as is
> the code which produces my cylinders.
>
> any suggestions?
>
> John Rieffel
> Cornell University
Bram Stolk wrote:
> Wouter Mollemans wrote:
>> TIMESTEP: 0.001 (but even with 0.0001, i have this problem)
>> ERP : 0.01
>
> Sounds like a very low ERP to me.
> Such a value would mean that only a very small fraction of the
> error is corrected.
>
> Bram
>
>> CFM : 0.07
>> OBJECTS: trimeshes (approx 4000 triangles)
>>
>> Greetings
>> Wouter
>>
>> Hampus Soderstrom wrote:
>>> Hi Wouter,
>>>
>>> I meant you should try different ERP and CFM values, not making them
>>> smaller.
>>>
>>> What timestep are you running? Lowering that can help too.
>>>
>>> Are you using any ball joints or angular motors, thoose can be unstable
>>> aswell if you have a wide range in their stops.
>>>
>>> /Hampa
>>>
>>> On 18 Oct 2006, at 10:12 PM, Wouter Mollemans wrote:
>>>
>>>> I don't think the problem arises from performing simulations with
>>>> small ERP or CFM values. To clarify:
>>>> after i call the nearcallback function and perfrom dCollide(), the
>>>> position of most contact points is completely correct. Only for a few
>>>> (most often only for one point) a NaN position value is returned. So I
>>>> don't think that simulation goes wrong.
>>>>
>>>> Best regards
>>>> Wouter
>>>>
>>>> Hampus Soderstrom wrote:
>>>>> Hi,
>>>>> I think the best way to get rid of this is to fine tune ERP and CFM
>>>>> values.
>>>>> If it is a case of exploding simulation that causes this, adding
>>>>> damping and making sure the mass of objects isn't to small can also
>>>>> help.
>>>>> /Hampa
>>>>> On 18 Oct 2006, at 8:20 PM, Wouter Mollemans wrote:
>>>>>> 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
>>>>>>>>
>>>>>> _______________________________________________
>>>>>> 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