Commit e53e0b92 authored by Niklas Yann Wettengel's avatar Niklas Yann Wettengel
Browse files

add range_min param

parent ca0fa84f
/homer_mapping/size: 35 # size of one edge of the map in m. map is quadratic
/homer_mapping/resolution: 0.03 # meter per cell
/homer_mapping/scan/range_min: 0.1
#map config values
/homer_mapping/backside_checking: false # Enable checking to avoid matching front- and backside of obstacles, e.g. walls. Useful when creating high resolution maps
/homer_mapping/obstacle_borders: true # Leaves a small border around obstacles unchanged when inserting a laser scan. Improves stability of generated map
......
......@@ -195,9 +195,12 @@ void OccupancyMap::insertLaserData(
rangeMeasurement.sensorPos.x = getLaserTransform(laserData->header.frame_id).getOrigin().getX();
rangeMeasurement.sensorPos.y = getLaserTransform(laserData->header.frame_id).getOrigin().getY();
float param_range_min = 0.0;
ros::param::getCached("/homer_mapping/scan/range_min", param_range_min);
for (unsigned int i = 0; i < laserData->ranges.size(); i++)
{
if ((laserData->ranges[i] >= laserData->range_min)
if ((laserData->ranges[i] >= max(laserData->range_min, param_range_min))
&& (laserData->ranges[i] <= laserData->range_max))
{
// if we're at the end of an errorneous segment, interpolate
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment