ros-perception / laser_filters

Assorted filters designed to operate on 2D planar laser scanners, which use the sensor_msgs/LaserScan type.
BSD 3-Clause "New" or "Revised" License
161 stars 199 forks source link

Would it be possible to chose with what to replace 'error values' for LaserScanBoxFilter? #165

Open cantolini opened 1 year ago

cantolini commented 1 year ago

When using the LaserScanBoxFilter, we don't have a choice on the replacement of the values inside the filtered box. With this type of filter, the values are replaced by NaN. For my application, I would like to be able to have them replaced by something else. This can already be done for other filters such as the LaserScanRangeFilter with the upper/lower_replacement_value.

So is there a way we could be able to have the choice of the replacement value for the LaserScanBoxFilter filter too?

(I am using ROS2 Galactic)

jonbinney commented 1 year ago

Seems like a reasonable feature to add but I'm short on time - could you submit a PR that adds it? To do this you'd need to:

The default value for the parameter should be NaN so that the default behavior doesn't change for anyone currently using the filter.