[ODE] exploding spinning objects
Graham Fyffe
gfyffe at gmail.com
Mon Feb 13 16:28:56 MST 2006
Search the mailing list for "rotational force". This is a physical
phenomenon, but the implementation of it is prone to precision
problems. Many people comment it out in their simulations to gain
stability, at the cost of losing any gyroscopic effects.
- Graham
On 2/13/06, Nagymathe Denes <denes at invictus.hu> wrote:
> Hi,
>
> I have found a solution for the 'accelerating spinning objects' bug that
> came up many times. There was a sort of patch that solved it for freely
> spinning ones, but i think i have figured out the root of it. :o)
> Near the start of dxQuickStepper() in quickstep.cpp, there's a loop for all
> bodies which basically fills I and invI, and does this:
>
> // compute rotational force
> dMULTIPLY0_331 (tmp,I+i*12,body[i]->avel);
> dCROSS (body[i]->tacc,-=,body[i]->avel,tmp);
>
> ...and for even a freely spinning body, this applies a _torque_ created from
> its avel! Even after some investigation, i still found this unnecessary, and
> commented it out. And the good news is that it is. Correct me if i'm wrong,
> but in my environment, everything works just fine without these two lines,
> and on top of it, now even long sticks are perfectly stable! :o)
> Does anyone know why were these needed? If no, i'd like to ask you to test
> this change to see if i'm really right.
>
> Denes
>
> ps. the same may apply to Step and StepFast as these two lines do exist
> there too, but i didn't test them as i only use quickstep.
>
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
More information about the ODE
mailing list