I believe I've found a bug in angles... if I call:
from = 1.04700021
to = 1.04700027
left_limit = 1.047
right_limit = -2.147
result = shortest_angular_distance_with_limits(from, to, left_limit, right_limit, shortest_angle)
I get
shortest_angle = -6.28318525
result = 0
Where the shortest_angle should be a small decimal number. So I guess its calculating the angle all the way around the unit circle, instead of the small sliver of distance between the two positions (my application is the effort-based position controller in ros_control).
I believe I've found a bug in angles... if I call:
I get
Where the shortest_angle should be a small decimal number. So I guess its calculating the angle all the way around the unit circle, instead of the small sliver of distance between the two positions (my application is the effort-based position controller in ros_control).