[ODE] Damned Euler Angles
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Thu Apr 6 20:42:46 MST 2006
ODE has functions to convert to and from Euler angles, so you can just
use those functions. I seem to recall having done that in some distant
past (but then, I'm old enough that that might just be a figment of too
much whiskey).
I e:
convert current R to euler
convert desired quaternion to R to euler
subtract the two (as "vectors")
add negative constant times euler angles as torque
apply dampening based on current angular velocity
Not perfect (Euler angles are not spherically invariant) but good enough.
Cheers,
/ h+
Mark Fournier wrote:
> the torque accumulated forces (tacc in the body struct) are in euler angles,
> which means that I have to base them on the difference between target euler
> angles and current euler angles (yes, I hate euler angles too, but I'm not
> being given a choice here.) I'm trying to derive the angles from the body's
> R matrix, but I noticed that the At vector used to derive the X angle (the
> third row of R) is not a unit vector, which is very strange. This means that
More information about the ODE
mailing list