File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -348,4 +348,25 @@ The obstacles within the coverage of LiDAR can be observed. The private function
348348 """
349349
350350 return (self .params.MIN_RANGE_M <= distance_m <= self .params.MAX_RANGE_M )
351+ ```
352+
353+ For normalizing an angle of scan point data, the following private functions are implemented.
354+ ``` python
355+ def _normalize_angle_until_2pi (self , angle_rad ):
356+ """
357+ Private function to normalize sensing angle between 0 and 360 deg
358+ angle_rad: Sensing angle[rad]
359+ """
360+
361+ if 0.0 > angle_rad: return (angle_rad + np.pi * 2.0 )
362+ else : return angle_rad
363+
364+ def _normalize_angle_pi_2_pi (self , angle_rad ):
365+ """
366+ Private function to normalize sensing angle between -180 and 180 deg
367+ angle_rad: Sensing angle[rad]
368+ """
369+
370+ if angle_rad > np.pi: return (angle_rad - np.pi * 2.0 )
371+ else : return angle_rad
351372```
You can’t perform that action at this time.
0 commit comments