calculating dual quaternion from two vectors

14 Ansichten (letzte 30 Tage)
Dany
Dany am 30 Okt. 2014
Bearbeitet: Matt J am 17 Jan. 2016
hi, i have two points (vectors) and i would like to calculate the rotation between them using quaternions. as i understand quaternion only give me the rotation, there fore if there is a translation between the two points as well the results i would get for the rotation angles are not good. i have read that to represent a rotation and translation using quaternion i need to uses the dual quaternion. i know how to calculate a quaternion between two points and then extract the rotation angles:
p1 = [1,0,0]; p2 = [0,1,0];
u = cross(p1,p2)/norm(cross(p1,p2));
alpha = acos(dot(p1,p2)/(norm(p1)*norm(p2)));
q = [cos(alpha/2), sin(alpha/2)*u(1), sin(alpha/2)*u(2), sin(alpha/2)*u(3)]
[roll, pitch, yaw] = quat2angle(q,'XYZ')
the question is how do i calculate a dual quaternion between two points?
thank you for your help.

Akzeptierte Antwort

Matt J
Matt J am 30 Okt. 2014
Bearbeitet: Matt J am 17 Jan. 2016
I think you've under-posed your problem. There is no unique rotation and translation relating just two points. Given only 2 points p1 and p2, you can always just say that they are related by translation p2-p1 and zero rotation.
On the other hand, if you have 2 groups of points each group with 3 or more non-colinear points, then a quaternion-based solver for the roto-translation between them is here,
  1 Kommentar
Matt J
Matt J am 1 Nov. 2014
Dany commented:
you are right. i do have several points in each data set, there fore i could use the solver in the link you provided. thank you

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by