ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Slam_toolbox message filter dropping message

asked 2020-07-21 17:18:36 -0600

pfedom gravatar image

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):


    # Plugin params
    solver_plugin: solver_plugins::CeresSolver
    ceres_linear_solver: SPARSE_NORMAL_CHOLESKY
    ceres_preconditioner: SCHUR_JACOBI   
    ceres_trust_strategy: LEVENBERG_MARQUARDT
    ceres_dogleg_type: TRADITIONAL_DOGLEG
    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: 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 flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2020-07-23 02:13:01 -0600

pfedom gravatar image

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

edit flag offensive delete link 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.

surfertas gravatar image surfertas  ( 2020-07-23 02:41:15 -0600 )edit

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.

pfedom gravatar image pfedom  ( 2020-07-23 02:58:49 -0600 )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.

Shneider1m7 gravatar image Shneider1m7  ( 2021-03-05 09:23:20 -0600 )edit

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

sisaha9 gravatar image sisaha9  ( 2021-04-19 17:32:24 -0600 )edit

answered 2021-03-03 13:18:47 -0600

Spectre gravatar image

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.






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(
    arguments=['0', '0', '0', '0.0', '0.0', '0.0', 'base_footprint', 'laser'],   

## tf2 - base_footprint to map
node_tf2_fp2map = Node(
    arguments=['0', '0', '0', '0.0', '0.0', '0.0', 'base_footprint', 'map'], 

## tf2 - base_footprint to odom
node_tf2_fp2odom = Node(
    arguments=['0', '0', '0', '0.0', '0.0', '0.0', 'base_footprint', 'odom'],

## Later, at the end...
return ld
edit flag offensive delete link more


@Spectre i don't understand why you added a static transform between base_footprint and map and odom. it's only static if the robot doesn't ever move. do you mind explaining? maybe i'm missing something...

guidout gravatar image guidout  ( 2023-06-24 19:14:42 -0600 )edit

because it could change through time, these are transformation matrices describing frames of references between robot parts,

now the question remains, why EVERYBODY stumble upon the same issues and NOTHING related to this is explained in the tutorials and WHY is there no default values used instead of not functioning at all ?

phil123456 gravatar image phil123456  ( 2023-08-07 14:11:39 -0600 )edit

what do you mean those are robot parts? map and odom are not robot parts...

guidout gravatar image guidout  ( 2023-08-07 17:49:09 -0600 )edit

odometers are stuck to your robot wheels and as for map, well indeed makes no sense so far for me either

phil123456 gravatar image phil123456  ( 2023-08-07 17:52:48 -0600 )edit

mm...odom might be stuck on the robot but it's definitely not static.Otherwise why would you even bother to calculate odometry? BTW, after months of me banging my head on this stupid thing, I finally tried a different DDS, cyclone dds, and all my problem disappeared.

guidout gravatar image guidout  ( 2023-08-07 20:41:34 -0600 )edit

Question Tools

1 follower


Asked: 2020-07-21 17:18:36 -0600

Seen: 7,039 times

Last updated: Jul 23 '20