Simplifying_Lidar.md
Author: Aiden Dumas
def preprocessor(all_ranges):
ranges = [float[(‘inf’)] * 20
ranges _index = 0
index = -9
sum = 0
batch = 0
actual = 0
for i in range(360):
curr = all_ranges[index]
if curr != float(‘inf” and not isnan(curr):
sum += curr
actual += 1
batch += 1
index += 1
if batch == 18:
if actual != 0:
ranges[ranges_index] = sum/actual
ranges_index += 1
sum = 0
batch = 0
actual = 0
return rangesLast updated
Was this helpful?
