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
172 stars 204 forks source link

Need assistance with using laser_filters with slam_toolbox on ROS2 Foxy #185

Closed Xoltox closed 1 year ago

Xoltox commented 1 year ago

Hi,

I am fairly new to ROS and still learning the ropes - looking for a bit of guidance with laser_filters. I want to filter out laser_scan messages coming from a Rplidar A1 using the LaserScanAngularBoundsFilter. I've taken a look at the examples and the documentation and have created a launch file and configuration file which work well. Once the /scan topic is filtered to /scan_filtered, I simply wish to use it with slam_toolbox.

So here is the current situation -

RViz (and subsequently slam_toolbox as well) are dropping laser_scan messages from the filter and are given me this error - [INFO] [1694107119.733352335] [rviz]: Message Filter dropping message: frame 'laser_frame' at time 1694107136.289 for reason 'Unknown' Despite the error, very few messages are accepted by RViz and occasionaly shown (once every minute?). When using slam_toolbox, the library isn't able to create a map.

SC2

Interestingly setting the fixed frame to 'laser_frame' in RViz does allow me to see the /scan_filtered topic just fine. Still doesn't help with the mapping ofcourse.

SC1

Again, I am new to ROS and would require a bit of assistance or even the right direction to help get through this.

Thanks.

Xoltox commented 1 year ago

I didn't put up an update earlier, so here it is:

For my application I was able to get by using box filters and get the appropriate results I needed. From what I've also understood reading some other threads and the source files, the angular filter seems to add an offset time to the timestamp of the laser scan messages.

Regardless, for now I am able to use multiple filters (and the box filters) without any issues.