DLu/navigation_layers — pull request #8 by MattDerry (2014-07-31 00:33:02+00:00)
Title: Hydro

Hi David,

We got the range_sensor_layer working pretty quickly this afternoon, but I ran across a behavior that was unexpected. Our range sensors put out a range value > max_range when no obstacle is detected. Intuitively, I expected this to clear the occupied cells up to max_range at least, but instead it just ignored these readings. The result was a lot of ghost occupied cells in open space. This pull request is a fix for that. I made it a configuration parameter (boolean clear_on_max_reading, default false) so that by default it works as you programmed it, but now it also works much better for our case too. I think it could be a useful addition to the layer.

It basically works by checking if the incoming range message is above the max_range, and if so, tell the update cell command for each update to replace the sensor_model probability with 0, out to max_range.

All in all, this is a great addition that solves a problem we have long had. Thank you for the effort.