[ODE] Acceleration on angular velocity

slipch slipch <slipch at gsc-game.kiev.ua>
Tue Jan 21 02:58:02 2003


Hello Ivan,

Monday, January 20, 2003, 9:16:13 PM, you wrote:

IB> HI, I need help.

IB> I have dBody. I want to apply torque to it. This torque will increase angular velocity of this body - body will be rotating faster and faster. What will this acceleration be? Is there a way to
IB> ask ode, what acceleration of angular velocity will some torque produce? Right now, I measure acceleration :-(

IB> thanx,ivan

M=I*b;  =>   b=I'*M;

Where b - acceleration of angular velocity (vector),
      M - accumulative torque applied to the body (vector),
      I - inertia tensor of the body (matrix 3x3 from dMass parameter)
          of the body)
      I'- inverse matrix I

It must looks something like:

void dBodyAngAccelFromTorqu(const dBodyID body, dReal* ang_accel, const dReal* torque){
      dMass m;
      dMatrix3 invI;
      dBodyGetMass(body,&m);
      dInvertPDMatrix (m.I, invI, 3);
      dMULTIPLY1_333(ang_accel,invI, torque);
      }
      
,where torque is  accumulative torque.

If there is no other torque applied and no contacts you mast get right
angular acceleration.

-- 
Best regards,
 slipch                            mailto:slipch@gsc-game.kiev.ua