Hi, I would like to announce the sensor_filters package (both Melodic and Noetic release are pending in the next sync of these distros).
The package provides simple nodes and nodelets that more or less just configure and spin a
filters::FilterQueue, subscribe to an input topic and publish the result. I know it’s easy to write such node(let)s, but this package is a convenience in case you do not have special needs for the filter queue. I was actually quite surprised there wasn’t any convenience package providing this functionality except for LaserScan…
If you do not know about the filters framework, it is a
C++-only super-efficient way to postprocess sensor data. It uses no inter-process communication and no (de)serialization - all filters are loaded as dynamic libraries and a reference to the sensor data is passed to each filter, which may alter it, and then sent to the next filter.
Example configuration for filtering a LaserScan topic:
output_queue_size: 1 scan_filter_chain: - name: intensity type: laser_filters/LaserScanIntensityFilter params: lower_threshold: 8000 upper_threshold: 100000 invert: false filter_override_range: true filter_override_intensity: false - name: shadows type: laser_filters/ScanShadowsFilter params: min_angle: 10 max_angle: 170 neighbors: 20 window: 0
<launch> <node pkg="sensor_filters" type="laserscan_filter_chain" output="screen" name="laser_filter"> <remap from="~input" to="base_scan" /> <remap from="~output" to="base_scan_filtered" /> <rosparam command="load" file="$(dirname)/filter.yaml" /> </node> </launch>
Any comments welcome!