[ODE] Angular velocity of a body around a given axis

Nate W coding at natew.com
Wed Jan 30 01:21:01 2002


I want to give my 'robots' a sense of balance.  I think I'm 90% of the way
there, but I'm stuck on a linear algebra problem...  I'm writing a
function that takes a dBodyID, and a vector representing an axis relative
to the body, and it needs to return the angular velocity of the body
around that axis.

I figure I should start by multiplying the givel axis by the body's
rotation matrix, to get the axis in world coordinates.  

Is there a function in ODE (odemath.h) to do that multiplication?  I sorta
get the impression that there is, but I'm not sure what to make of the
function names.  My best guess is that dMULTIPLY0_331 (globalaxis,
rotationmatrix, localaxis) would do it, but I have little confidence in
that guess.
 
And then the part I have no idea how to approach - with the transformed
axis, and the vector returned from dBodyGetAngularVel, can I get the
body's rotation around the axis?  If so, how?

Any suggestions would be greatly appreciated!

Thanks,


Nate Waddoups
Redmond WA USA
http://www.natew.com