voxelnet icon indicating copy to clipboard operation
voxelnet copied to clipboard

a question about angle_in_limit

Open bonne658 opened this issue 7 years ago • 2 comments

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?

bonne658 avatar Jun 13 '18 01:06 bonne658

hi @bonne658 you could use this function inorder to limit the angle, https://github.com/qianguih/voxelnet/issues/5#issuecomment-396180481 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].

ansabsheikh9 avatar Aug 27 '18 09:08 ansabsheikh9

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

lonlonago avatar Nov 15 '19 07:11 lonlonago