0
$\begingroup$

Rosanswers logo

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_toolbox/issues/169. 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.


Originally posted by pfedom on ROS Answers with karma: 74 on 2020-07-21

Post score: 3

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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


Originally posted by pfedom with karma: 74 on 2020-07-23

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by surfertas on 2020-07-23:
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.

Comment by pfedom on 2020-07-23:
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.

Comment by Shneider1m7 on 2021-03-05:
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.

Comment by sisaha9 on 2021-04-19:
@Shneider1m7 did you figure out what was the issue? I am facing the same problem right now

$\endgroup$
0
$\begingroup$

Rosanswers logo

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

Originally posted by Spectre with karma: 51 on 2021-03-03

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by guidout on 2023-06-24:
@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...

Comment by phil123456 on 2023-08-07:
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 ?

Comment by guidout on 2023-08-07:
what do you mean those are robot parts? map and odom are not robot parts...

Comment by phil123456 on 2023-08-07:
odometers are stuck to your robot wheels and as for map, well indeed makes no sense so far for me either

Comment by guidout on 2023-08-07:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.