[ODE] Quaternion/Rotation problem?
David Jung
jungdl at ornl.gov
Wed Apr 24 08:57:02 2002
If I execute this code:
q[1] = 0.00074993; q[2] = 0.000499856; q[3] = 0.000499856; q[0] =
0.999999; // x,y,z,w
dBodySetQuaternion(bodyID, q);
const dReal* R = dBodyGetRotation(bodyID);
dBodySetRotation(bodyID, R);
const dReal* oq = dBodyGetQuaternion(bodyID);
printf("Got back %5.3f %5.3f %5.3f %5.3f\n",oq[1],oq[2],oq[3],oq[0]);
I get:
Got back 0.001 0.000 0.000 1.000
which is not the same Quaternion (and doesn't represent the same
orientation - or even a valid one [shouldn't it be unit length?]).
Is it me or is there something amiss here?
Cheers,
-David.