# Slam_toolbox message filter dropping message

Hi guys,

I am trying to start mapping with slam_toolbox. (Ubuntu 18.04 with Eloquent) When starting the online async node (or sync, I tested both) this message gets spammed and no map is produced:

[slam_toolbox-1] [INFO] [slam_toolbox]: Message Filter dropping message: frame 'base_scan' at time 1594996830.893 for reason 'Unknown'


I am publishing my daser data to base_scan and my TF-Tree looks like this: odom -> base_fooprint -> base_link -> base_scan. My Odom msg is published by the wheels with frame_id: odom and child_frame_id: base_footprint.

I don't know if this is important but just to have everything in: I am filtering my lasermessage with an own node so it produces only 180° scan instead of 270°. I am replacing the unneccesary points with NAN.

In Rviz my TF looks clean, instead of map with the warning: No transform from [map] to [base_link]

My slam_toolbox yaml file (the rest is untouched but I think it should be all default):

slam_toolbox:
ros__parameters:

# Plugin params
solver_plugin: solver_plugins::CeresSolver
ceres_linear_solver: SPARSE_NORMAL_CHOLESKY
ceres_preconditioner: SCHUR_JACOBI
ceres_trust_strategy: LEVENBERG_MARQUARDT
ceres_loss_function: None

# ROS Parameters
odom_frame: odom
map_frame: map
base_frame: base_footprint
scan_topic: /scan
mode: mapping #localization


Dont know if this issue is related: https://github.com/SteveMacenski/slam.... I am not using a bridge but the error output seems to be the same.

Thanks in advance. If you need any more information just let me know and i will update the question.

edit retag close merge delete

Sort by » oldest newest most voted

Got it. My odometry transform was missing the timestamp. Adding it got the slam working !

more

Adding a bit more details with regards to your solution would be helpful for future viewers. (e.g. where and how did you add the missing timestamp.) Thanks.

( 2020-07-23 02:41:15 -0500 )edit
1

The transform from odom to base_footprint (wheel_odometry frame_id to child_frame_id) was missing the header.stamp part. I just missed it when I created the tf-broadcaster. Adding it to the tf-broadcaster gave me seconds and nanoseconds in the transform message and the slam was working.

I hope this is well explained. If you need more information just comment again please.

( 2020-07-23 02:58:49 -0500 )edit

Hey @pfedom I'm facing a similar problem when i launch slam toolbox online sync, I got "no map received warning" in rviz and "[rivz]: Message Filter dropping message: frame 'base_scan' at time 1594996830.893 for reason 'Unknown' " I didn't get what you did.

( 2021-03-05 09:23:20 -0500 )edit

@Shneider1m7 did you figure out what was the issue? I am facing the same problem right now

( 2021-04-19 17:32:24 -0500 )edit

Sorry if I'm necro-ing an old post, but I stumbled-upon this same error when getting started with ROS2 (as a complete newbie) and this and the OP's link to the SLAM Toolbox github issues page are literally the only places online mentioning this error message.

This post didn't solve my problems completely, but it did lead me to the proper solution so I figure I'll leave my 2-cents for the next person seeking a solution.

Rather than a full robot I was strictly working with a SLAMTech RPLidar A1M8 LIDAR sensor. I was simply trying to feed data from that sensor to slam_toolbox, and to view it in RViz. I was also trying to get this to work with ROS2 as opposed to ROS1.

The simple answer to my problem (hinted-at by the OP, @pfedom), was that I needed to read the instructions and add several instances of the tf2_ros package to my Python launch file. I created static transform publishers as per Link [1] below.

To understand why I needed to do this I went through Link [2] which led to Link [3].

The only real obstacle was understanding the similarities between ROS1 and ROS2, both of which I'm still very new to at time of writing. Once I understood how ROS2 launch files work I was able to follow Link [4] to get SLAM Toolbox working with RViz and to develop a simple launch file for a custom "launch everything" package.

[1] https://docs.ros.org/en/foxy/Tutorials/tf2.html

[2] https://wiki.ros.org/navigation/Tutorials/RobotSetup

...

It's crude, but I simply added these three static transform publishers to my launch file (which is a combination of one provided by an existing RPLidar ROS2 fork and Link [4]) and ceased having errors completely:

## Somewhere higher-up...
ld = LaunchDescription()

#### tf2 static transforms

## tf2 - base_footprint to laser
node_tf2_fp2laser = Node(
name='tf2_ros_fp_laser',
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0.0', '0.0', '0.0', 'base_footprint', 'laser'],
)

## tf2 - base_footprint to map
node_tf2_fp2map = Node(
name='tf2_ros_fp_map',
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0.0', '0.0', '0.0', 'base_footprint', 'map'],
)

## tf2 - base_footprint to odom
node_tf2_fp2odom = Node(
name='tf2_ros_fp_odom',
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0.0', '0.0', '0.0', 'base_footprint', 'odom'],
)

## Later, at the end...
return ld

more