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

ROS2 migration (foxy) #101

Closed hangst closed 3 years ago

hangst commented 3 years ago

Ported according to changes in filters::FilterBase and filters::FilterChain, with working examples and tests.

[==========] Running 6 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 6 tests from ScanToScanFilterChain
[ RUN      ] ScanToScanFilterChain.BadConfiguration
[       OK ] ScanToScanFilterChain.BadConfiguration (13 ms)
[ RUN      ] ScanToScanFilterChain.IntensityFilter
********** SCAN **********
0 - 2000: 10
2000 - 4000: 0
4000 - 6000: 0
6000 - 8000: 0
8000 - 10000: 0
10000 - 12000: 0
12000 - 14000: 0
14000 - 16000: 0
16000 - 18000: 0
18000 - 20000: 0
20000 - 22000: 0
22000 - 24000: 0
24000 - 26000: 0
26000 - 28000: 0
28000 - 30000: 0
30000 - 32000: 0
32000 - 34000: 0
34000 - 36000: 0
36000 - 38000: 0
38000 - 40000: 0
40000 - 42000: 0
42000 - 44000: 0
44000 - 46000: 0
46000 - 48000: 0
[       OK ] ScanToScanFilterChain.IntensityFilter (6 ms)
[ RUN      ] ScanToScanFilterChain.InterpFilter
[       OK ] ScanToScanFilterChain.InterpFilter (6 ms)
[ RUN      ] ScanToScanFilterChain.ShadowFilter
[       OK ] ScanToScanFilterChain.ShadowFilter (5 ms)
[ RUN      ] ScanToScanFilterChain.ArrayFilter
[INFO] [1604546752.158335593] [array_filter_chain]: LaserArrayFilter cleaning and reallocating due to larger scan size
[       OK ] ScanToScanFilterChain.ArrayFilter (7 ms)
[ RUN      ] ScanToScanFilterChain.MaskFilter
[INFO] [1604546752.163838103] [mask_filter_chain]: LaserScanMaskFilter: laser: 2 directions will be masked.
[       OK ] ScanToScanFilterChain.MaskFilter (3 ms)
[----------] 6 tests from ScanToScanFilterChain (40 ms total)

[----------] Global test environment tear-down
[==========] 6 tests from 1 test case ran. (40 ms total)
[  PASSED  ] 6 tests.
jonbinney commented 3 years ago

Whoa thats a lot of changes. Thanks for doing this! I haven't been following the ros2 branch super closely - what ros2 distro was it working on before?

hangst commented 3 years ago

The last commits were 2+ years ago, so I guess it was targeted at Ardent? I couldn't get it work with Dashing and Foxy.

jonbinney commented 3 years ago

@hangst sorry I forgot about this for a bit; I've merged it. Thanks!

hangst commented 3 years ago

Great, thanks!