An alternative way to normalize angles to (-pi, pi] #260
luckykk273
started this conversation in
General
Replies: 1 comment 2 replies
-
|
Hi @luckykk273 , thanks for the advice. Would you be willing to open a pull request? edit: btw. there is numpy.fmod. I would suggest to use it then. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
In
norm_angle, the%operator is used to do modulo on floating numbers to normalize angles to (-pi, pi].I know
norm_angleis well tested intest_norm_angleintest/test_rotations.py.From my point of view, it'd be better not using
%operator for two reasons:math.fmod, it is mentioned:In other language(e.g. C/C++), it is not allowed to use
%operator for floating numbers.Here is the modified version I have already tested:
The above mentioned is my suggestion and you could take into consieration. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions