[ODE] Bug with angular velocity?

Michal Bacik michal at lonelycatgames.com
Wed Feb 26 08:40:02 2003


> Has someone noticed the problem with body angular velocity, resulting in
> float overflow?
>
> For example, I create a capped cylinder, set zero gravity (no collision or
> falling wanted), and apply some force by dBodyAddForceAtPos.
>
> The body starts to rotate, but the rotation (dxBody::avel) slowly
> raises and
> if something doesn't stop it, it's soon getting to 1e+2, 1e+6,
> 1e+11, 1e+24,
> and then it crashes because of float overflow.
>
> I wonder if someone else has seen this, or it's only my set-up code making
> it (e.g. wrong mass applied...).
>
> - michal


Actually, it's very easy to repro with test_boxstack.cpp example - add
following code in Command function, right after objects are created (line
262):

if(cmd=='c')
   dBodyAddForceAtPos(obj[i].body, .2f, 0, 0, 0, 0, 1);

and press 'c' in demonstration.