You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dq1 and dq2 are normalized, if we use the function below in dq1 and dq2, it returns:
'Rotation part is normalized'
'The dual part is normalized'
def is_dual_quaternion_normalized(dual_quaternion):
tolerance = 1e-15
# Check the rotation part
if abs(dual_quaternion.q_r.norm - 1) > tolerance:
print("Rotation part is not normalized")
else:
print("Rotation part is normalized")
# Check the dual part
part1 = dual_quaternion.q_r * dual_quaternion.q_d.conjugate
part2 = dual_quaternion.q_d*dual_quaternion.q_r.conjugate
if abs(sum(part1 + part2)) > tolerance:
print("Dual part is not normalized")
else:
print("Dual part is normalized")
The text was updated successfully, but these errors were encountered:
I have tested the is_normalized() function with two normalized dual quaternions, dq1 and dq2, but it only returns False. The two dual quaternions:
dq1 = DualQuaternion(-0.19846574648301676, -0.003727645110356892, 0.019714514040105935, 0.9799024390575996) + (-0.26885821157532125, 20.377681310377717, -3.2778468461642998, 0.0890116940545257)e>
dq2 = DualQuaternion(-0.19815311910261352, -0.004011949502977785, 0.019765922709431866, 0.9799635472559859) + (-0.2819718824973357, 20.36564434954993, -3.2589343810704126, 0.09209339883505874)e>
dq1 and dq2 are normalized, if we use the function below in dq1 and dq2, it returns:
'Rotation part is normalized'
'The dual part is normalized'
The text was updated successfully, but these errors were encountered: