Software Archive
Read-only legacy content
Annonces
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

HandModule: Obtaining a middle quaternion between joints

jarikus
Débutant
1 066 Visites

I need show the phalange of thumb finger.

I have rotation value (Quaternion) for joints see attached picture. But my graphics 3D engine (Ogre3D) allow set the graphics object only by position of center and rotation.

Center position of phalange I getting so:

thumbPhalanget->setPosition( (JointA.x+JointB.x)/2, (JointA.y+JointB.y)/2, (JointA.z+JointB.z)/2 );

Question: But how to get the rotation in center of phalange? In other words, how get quaternion for center phalange if I have quaternions of joints?

thumbPhalanget->setRotation( ? );

Thanks

0 Compliments
4 Réponses
jarikus
Débutant
1 066 Visites

Qualification: The Havok Physics engine allow set objects position in same maner by set position central point and set rotation. Therefore this question is actual non only for Ogre3D engine.

0 Compliments
jarikus
Débutant
1 066 Visites

I found the solution, but I not test it yet. http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors

This solution uses coordinates of joint for getting the quaternion.

0 Compliments
Xusheng_L_Intel
Employé
1 066 Visites

The rotation value of "thumb joint B" is the rotation of the bone between "thumb joint A" and "thumb joint B". Please let me know if you still have issue. Thanks!

0 Compliments
jarikus
Débutant
1 066 Visites

> David Lu (Intel)  

Thanks, you are right. I did not understand it, because I was confused with convert the RealSense world coordinate to Ogre3D world coordinate. For now I start understanding ;)

0 Compliments
Répondre