[ODE] Bug with angular velocity?
Shiva Danis
shivadanis at sympatico.ca
Wed Feb 26 09:17:01 2003
Hi,
if you read section 11.12 in ODE documentation it mentions a problem with
displacement of rotation axis in long thin objects. I have had this problem
myself with the CCylinder. Someone solved my problem by suggesting the
application of an angular drag which is basicly to multiply the angular
velocity of the object by 0.99 on each step or whatever value fits your
needs.
shiva danis
----- Original Message -----
From: Michal Bacik <michal@lonelycatgames.com>
To: ODE mailing list <ode@q12.org>
Sent: Wednesday, February 26, 2003 10:40 AM
Subject: RE: [ODE] Bug with angular velocity?
> > 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.
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>