Achllle / dual_quaternions_ros

Dual Quaternion conversions from/to ROS messages
MIT License
31 stars 7 forks source link

is_unit() only checks real part of DQ #37

Closed Achllle closed 4 years ago

Achllle commented 4 years ago

A dual quaternion sigma = p+eq is unit if, when multiplied with its quaternion_conjugate(), results in 1.

In the current definition of us_unit, it just checks if the norm of the real part (q_r) of the DQ has norm 1 which I think is incorrect.

Achllle commented 4 years ago

This can also be checked by verifying that the following two conditions are true:

||p||^2 = p0^2 + p1^2 +p2^2 + p3^2 = 1
p0 q0 + p.q = p0q0 + p1q1 + p2q2 + p3q3 = 0