Page 1 of 1

Quaternion angle constraint

Posted: Fri Feb 08, 2013 2:54 am
by c0der

I am representing the orientation of a rigid body as a quaternion and the angular velocity as a vector. I am attempting to implement an angle constraint directly from the quaternion without having to store a vector alongside the quaternion in the rigid body class to represent the orientation.

C = Qa - Qb - Qi where Qi is the initial difference in orientation between the bodies
dC/dt = wa - wb which are the angular velocities of the bodies already known

So the Jacobian is [ 0 1 0 -1]

When I get to the bias calculation of bias = beta/dt * C, this will return a quaternion

So -Jv = wb - wa - bias will yield and incompatible equation as we are subtracting a quaternion from a vector. What is the preferred method without having to convert C to a vector at each frame?