Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

a question about angle_in_limit #24

Open
bonne658 opened this issue Jun 13, 2018 · 2 comments
Open

a question about angle_in_limit #24

bonne658 opened this issue Jun 13, 2018 · 2 comments

Comments

@bonne658
Copy link

the function angle_in_limit in utils.py is:

def angle_in_limit(angle):
    # To limit the angle in -pi/2 - pi/2
    limit_degree = 5
    while angle >= np.pi / 2:
        angle -= np.pi
    while angle < -np.pi / 2:
        angle += np.pi
    if abs(angle + np.pi / 2) < limit_degree / 180 * np.pi:
        angle = np.pi / 2
    return angle

However, what does the last condition mean? when -95 < angle < -85(in degree), angle = 90?

@ansabsheikh9
Copy link

hi @bonne658 you could use this function inorder to limit the angle,
#5 (comment)
def limit_period(val, offset=0.5, period=np.pi):
return val - np.floor(val / period + offset) * period
period= 2*np.pi to limit angle to [-pi, pi].

@lonlonago
Copy link

@ansabsheikh9 hello , why set rz = -ry - np.pi / 2 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants