I'm using a cheap 2D lidar with poor ambient light resistance to map an outdoor environment. This means I get small artifacts near the robots that show up in the map ie a stray set of sparse points that look like small islands with the 2d costmap enabled. I'd like to filter these points out so they don't interfere with the robot's navigation. I've thought of some ways to do this (ie by point density in moving window, or by removing points with distant nearest neighbours, testing only points within a certain radius of the robot since that's where they always show up). Where in the code is best to add this functionality?
I'm using a cheap 2D lidar with poor ambient light resistance to map an outdoor environment. This means I get small artifacts near the robots that show up in the map ie a stray set of sparse points that look like small islands with the 2d costmap enabled. I'd like to filter these points out so they don't interfere with the robot's navigation. I've thought of some ways to do this (ie by point density in moving window, or by removing points with distant nearest neighbours, testing only points within a certain radius of the robot since that's where they always show up). Where in the code is best to add this functionality?