[ODE] Aceeleration of angular velocity

Ivan Bolcina ivan.bolcina at volja.net
Wed Feb 26 07:30:02 2003


Hi.
I don't have body positioned in space. I just have "a body". Kind of
abstract. So I know body has mass and dimension. This is not linked to any
global variables. I assume that whenever I apply some torque on one of its
axes, it will start spining faster and faster around this axis. Since it
will be spinig, it is spining with some angular velocity. Since this angular
velocity changes, there is angular acceleration. Now, now to write this. I
would prefer it in this form

float GetAngularAccelerationAroundXAxis(dBodyID body,float torque);
float GetAngularAccelerationAroundYAxis(dBodyID body,float torque);
float GetAngularAccelerationAroundZAxis(dBodyID body,float torque);

I need this for my AI processing. It is strange to me that nobody ever
needed this. How else can you know what torque to apply or what the response
will be? Do you measure it, or what?

Best regards,ivan


----- Original Message -----
From: "slipch" <slipch@gsc-game.kiev.ua>
To: <ODE@q12.org>
Sent: Monday, February 24, 2003 12:44 PM
Subject: Re: [ODE] Slipch -> Aceeleration of angular velocity


> Hello Ivan,
>
> Monday, February 24, 2003, 10:30:13 AM, you wrote:
>
> IB> It compiles now. DLL problem it was. But how to use it? Which are in
and which out parameters. Say, If I put 1000 Nm on X axis, what will
acceleraon of angular velocity around this axis be?
>
>
>
> IB> Hi! Me again.
> IB> Function wont compile.
> IB> What to do?
>
> IB> bye,ivan
>
> >> void dBodyAngAccelFromTorqu(const dBodyID body, dReal* ang_accel, const
> IB> dReal* torque){
> >>       dMass m;
> >>       dMatrix3 invI;
> >>       dBodyGetMass(body,&m);
> >>       dInvertPDMatrix (m.I, invI, 3);
> >>       dMULTIPLY1_333(ang_accel,invI, torque);
> >>       }
>
> It seems this is not completely right. It would be right if m.I was in
> global coordinates, but it is in local body coordinates indeed. You
> have to convert invI or m.I to global coordinates
> R=dBodyGetRotation(body);
> dMULTIPLY2_333(invI1,invI,R);
> dMULTIPLY1_333(local_invI,R,invI1);
>
> Pass torque as
> dVector3 torqu={1000,0,0};
> and get  ang_accel as three reals.
>
> I have not ever use it and never check it.
> So there is no warranty that is right.
>
>
>
>
> --
> Best regards,
>  slipch                            mailto:slipch@gsc-game.kiev.ua
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode