Skip to content

Commit a8aca7a

Browse files
committed
Handle-nan-ranges-in-invalidity-condition
1 parent a038ce1 commit a8aca7a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ros2_numpy/laser_scan.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def laserscan_to_array(
5151
if remove_invalid_ranges:
5252
indices_invalid_range = (
5353
np.isinf(ranges)
54+
| np.isnan(ranges)
5455
| (ranges < scan.range_min)
5556
| (ranges > scan.range_max)
5657
)

0 commit comments

Comments
 (0)