Skip to content

Commit

Permalink
Handle-nan-ranges-in-invalidity-condition
Browse files Browse the repository at this point in the history
  • Loading branch information
aseelam1996 committed Nov 11, 2024
1 parent a038ce1 commit a8aca7a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ros2_numpy/laser_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def laserscan_to_array(
if remove_invalid_ranges:
indices_invalid_range = (
np.isinf(ranges)
| np.isnan(ranges)
| (ranges < scan.range_min)
| (ranges > scan.range_max)
)
Expand Down

0 comments on commit a8aca7a

Please sign in to comment.