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

Slam_toolbox message filter dropping message

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

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

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_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: 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 flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

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

pfedom gravatar image

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

edit flag offensive delete link more

Comments

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 -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.

pfedom gravatar image pfedom  ( 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.

Shneider1m7 gravatar image Shneider1m7  ( 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

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

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

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.

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

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

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

[4] https://www.robotandchisel.com/2020/08/19/slam-in-ros2/

...

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'],   
)
ld.add_action(node_tf2_fp2laser)

## 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'], 
)
ld.add_action(node_tf2_fp2map)

## 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'],
)
ld.add_action(node_tf2_fp2odom)


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

Comments

@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 -0500 )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 -0500 )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 -0500 )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 -0500 )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 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 7,645 times

Last updated: Jul 23 '20