flight dynamics quaternion

tprk77
Posts: 1
Joined: Tue Mar 22, 2011 12:56 am

flight dynamics quaternion

Post by tprk77 »

Hello everyone,

I'm using Bullet as part of ROS (Robotic Operating System), and I have a question about using quaternions. I have a gyroscope which is able to send various data over a serial link. I'm interested in receiving a quaternion from the device to measure the robot's orientation, however, I'm running into problems...

The gyroscope frame:
X is north, Y is east, Z is down

The robot frame:
X is east, Y is north, Z is up
(basically the UTM coordinate system)


My first thought is to find the transform from the robot frame to the gyroscope frame, and then use that to modify the quaternion. It's easy enough to find the transform matrix:

btMatrix3x3 m(0,1,0,1,0,0,0,0,-1);
btTransform gyro_to_robot(m);

And then wouldn't it just be...?

q_robot = gyro_to_robot * q_gyro;

Am I on the right track? Am I missing something? I've tried it, but I can't get it to work. Any help is greatly appreciated.