5yler / metatron

Autonomous Power Racing Series Racecar - ROS Metapackage
4 stars 2 forks source link

Filter random sunlight noise from laser scans #7

Closed 5yler closed 7 years ago

5yler commented 7 years ago

SUNLIGHT IS A PROBLEM.

image

IS THIS THE SOLUTION? ONLY ONE WAY TO FIND OUT!

5yler commented 7 years ago

The sunlight interference is actually more of a problem for localization and planning than the reactive controller. Assuming that the noise is randomly distributed, the directional integral in the reactive steering script will even out the noise. However, the noise interferes with navigation by adding obstacles to the costmap when there are none, and rendering the car unable to move.

5yler commented 7 years ago

Relevant:

image

ok_ranges = []
tolerance = 0.25
for i in xrange(len(ranges)):
    if i == 0 or i == len(ranges)-1:
        ok_ranges.append(ranges[i])
    else:
        if abs(ranges[i] - ranges[i-1]) < tolerance or abs(ranges[i] - ranges[i+1]) < tolerance:
            ok_ranges.append(ranges[i])
        else:
            ok_ranges.append(inf)
5yler commented 7 years ago

image

5yler commented 7 years ago

Have a working implementation of this up and running as a laser scan filter in the new scan_filters package. Example output:

image

The red points are points in the original scan that get thrown out by the filter.

image

See the LaserScanSunlightFilter implementation in scan_sunlight_filter.h.

5yler commented 7 years ago

This might need a little more testing and parameter tweaking to get optimal performance, but other than that it's done.