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

[slam_toolbox]: Message Filter dropping message: for reason 'discarding message because the queue is full'

asked 2021-10-25 10:40:57 -0500

JehanJay gravatar image

updated 2021-10-26 12:09:56 -0500

Hi everyone,

I am using slam_toolbox (in ROS2 Galactic) to generate a map of an environment using Ros2 bag files of recorded Odometry and Laser Scan data. However, when starting the slam toolbox via ros2 launch slam_toolbox online_sync_launch.py I get the following error.

[sync_slam_toolbox_node-1] [INFO] [1635173765.135318248] [slam_toolbox]: Message Filter dropping message: frame 'laser_frame' at time 1626324749.677 for reason 'discarding message because the queue is full'

Device information: - OS: Ubuntu - OS version: 20.04 - CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz x 8 - GPU Nvidia: GeForce MX130 - Memory : 8GB

Moreover, I have used the default configuration of the slam toolbox as below, and warnings are shown here:

image description

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

Clearly, RVIZ2 warnings are caused by the slam-toolbox which is not functioning as messages are getting discarded because the queue is full. Additionally, the rqt-graph looks like this:

image description

I suspect my issue is with my slam configuration. Has anyone seen this type of error before? I feel like I'm missing something easy.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2021-10-25 16:13:52 -0500

updated 2021-10-25 16:14:47 -0500

Does your rosbag have the full TF tree? That's message filters saying that it didn't call the callback with the sensor data because there wasn't a tranform available when it queued or anytime after that point. The queue expires old messages that weren't able to be transformed.

Edit: from your screen shot, you don't have the odom -> base link transform, that could be what's causing it, easily.

I suppose it could also be the case that you're on such a low compute platform that you're not able to process the SLAM system in time before things are being thrown out, but given you lack any map at all in your screen shot, I think its more likely that you're missing a complete TF tree. And I think if you were on an RPi or something very small, you would have mentioned that in the question ;-)

edit flag offensive delete link more

Comments

Yes, the problem was due to not having the complete TF tree. Translating all the Odom messages to TF solved the issue for me.

JehanJay gravatar image JehanJay  ( 2021-11-10 02:24:03 -0500 )edit

Howdy! I'm having the same problem. I know I have to create a odom -> base link transform, but I'm not sure how. I just switched to a physical robot from gazebo, so the transformation was being created by one of the gazebo plugins. If you don't mind me asking, how were you able to accomplish this?

ericnasanta gravatar image ericnasanta  ( 2021-11-17 09:51:08 -0500 )edit

@ericnasanta , I created a script to translate all the /odom messages and write/publish them in /tf topic. If you're using a rosbag file or ros2bag file for live mapping you could run this translation script while playing the bag file to get the complete TF tree. Or else you could create a newer bag file with additional /tf topic with all the translated /odom messages. Either way, you get the same complete TF tree that is required for the slam toolbox to execute its operation. Use this link to perform the /odom-/f translation. If you're using Ros2, the script is a bit different but the idea is almost the same :)

JehanJay gravatar image JehanJay  ( 2021-11-21 07:00:52 -0500 )edit

Thanks for the help!

ericnasanta gravatar image ericnasanta  ( 2021-11-22 10:03:43 -0500 )edit
1

answered 2023-03-24 04:37:08 -0500

Praveen Nellihela gravatar image

updated 2023-03-24 04:38:00 -0500

I had the same issue and managed to fix it running static_transform_publisher:

ros2 run tf2_ros static_transform_publisher "0" "0" "0" "0" "0" "0" "map" "scan"

Adding it to a launch file could also help if you want to bring it up everytime:

import launch
from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():

    return LaunchDescription([
        Node(
            package='tf2_ros',
            namespace = 'scan_to_map',
            executable='static_transform_publisher',
            arguments= ["0", "0", "0", "0", "0", "0", "map", "scan"]
        )
    ])

Don't forget to add your slam_toolbox online_sync_launch.py inside the launch file.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-10-25 10:40:57 -0500

Seen: 13,027 times

Last updated: Mar 24 '23