Quaternion angle constraint

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
Posts: 74
Joined: Sun Jul 08, 2012 11:32 am

Quaternion angle constraint

Post by c0der » Fri Feb 08, 2013 2:54 am


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?

Post Reply