Closed juanjqo closed 4 years ago
Hello, @juanjqo
If you test the following code using a debugger, you'll see that the axis and angle are being calculated correctly.
r = DQ([0.5068154, -0.8591303, 0.0555768, -0.0440969])
r = normalize(r)
axis = r.rotation_axis()
angle = r.rotation_angle()
However, the print function is indeed malfunctioning. I'll check it and come back to you.
@mmmarinho Thanks for your answer!
Yes, indeed, the axis and angle are being calculated correctly. My bad, the bug is related with the printing function.
I realize that you closed the issue (Unexpected behavior when printing DQs [BUG]#18). I updated to the last version: 20.4.0.11 However, the printing bug is still present.
from dqrobotics import*
r = DQ([0.5068154, -0.8591303, 0.0555768, -0.0440969])
r = normalize(r)
axis = r.rotation_axis()
angle = r.rotation_angle()
print('r', vec4(r))
print('axis: ', vec4(axis))
print('angle: ', angle)
print('r', r)
print('axis: ', axis)
Output:
r [ 0.50681539 -0.85913028 0.0555768 -0.0440969 ]
axis: [ 0. -0.99660772 0.06447016 -0.05115325]
angle: 2.0786195489067434
r 0
axis: 0
Process finished with exit code 0
Cheers!
@juanjqo
Thank you for the message. Locally, it is working. I'll try to figure out what is wrong.
Thanks again for the report, @juanjqo.
Fixed in dqrobotics/cpp@dd72ae8, available in Python since d5595266.
Please update to dqrobotics-20.4.0.18
and let me know if something is malfunctioning.
@mmmarinho Thank you!
I updated to the last version (dqrobotics-20.4.0.17) using:
python3 -m pip install --user dqrobotics
It is working now! :D
Hi @mmmarinho! I am having some problems using the rotation_axis() method. Would you give me a hand? I appreciate your support.
Bug description
Code
Output
Expected behavior
Expected output (Matlab)
Matlab Output
Environment: