0
$\begingroup$

I am trying to make my first setup to start mapping with slam_toolbox. I'm using a raspberry pi 4 to connect my hardware, it's running ROS2 humble and ubuntu server 22.04, everything runs on the raspberry except slam_toolbox and rviz, I have those 2 running on a laptop that also runs ubuntu and ros2 humble, on both I have changed the rmw to cyclone dds.

From slam_toolbox I get the message that it's dropping the scan because the queue is full and because the timestamp of the scan is earlier than all the data in the transform cache.

My rqt tree is: enter image description here

My rqt graph is: enter image description here

I am running slam_toolbox online_async_launch.py with the slam_toolbox params:

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

The code I used to start with is example 2 of ROS2 controllers demo, I updated the robot description to the dimensions that I have and added the lidar to it. Also added the BASE_FOOTPRINT LINK:

<joint name="base_footprint_joint" type="fixed">
    <parent link="base_link"/>
    <child link="base_footprint"/>
    <origin xyz="0 0 0" rpy="0 0 0"/>
</joint>

<link name="base_footprint">
</link>

In rviz I can drive around the robot without problems using teleop_twist_keyboard, it shows the odom and I can visualize the /scan topic. It won't show any map, it indicated no map is received.

So from the rqt tree it's clear the map to odom tf is missing, but I haven't been able to figure out why.

So my question is can you help me with how to connect odom frame with the map frame? (I assume this is the issue in my case)

Edit: added slam_toolbox log, topic list and node list.

The log of the slam_toolbox terminal:

[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [async_slam_toolbox_node-1]: process started with pid [3377]
[async_slam_toolbox_node-1] [INFO] [1719825127.393624883] [slam_toolbox]: Node using stack size 40000000
[async_slam_toolbox_node-1] [INFO] [1719825127.598319606] [slam_toolbox]: Using solver plugin solver_plugins::CeresSolver
[async_slam_toolbox_node-1] [INFO] [1719825127.599310125] [slam_toolbox]: CeresSolver: Using SCHUR_JACOBI preconditioner.
[async_slam_toolbox_node-1] [INFO] [1719825127.881712297] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825127.751 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825128.073352758] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825127.943 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825128.261359592] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825128.134 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825128.449885627] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825128.322 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825128.644339914] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825128.514 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825128.833789900] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825128.706 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825129.033316536] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825128.898 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825129.234329461] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825129.089 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825129.600903556] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825129.469 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825129.802746237] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825129.661 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825129.984439357] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825129.853 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825130.185729648] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825130.045 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825130.554337073] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825130.425 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825130.745479629] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825130.616 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825130.937142899] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825130.808 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825131.138368455] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825131.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825131.518887101] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825131.380 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825132.663872930] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825132.527 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825132.851738494] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825132.719 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825133.037557247] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825132.910 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825133.238586399] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825133.102 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825133.621243482] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825133.482 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825133.802449399] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825133.674 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825133.997679358] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825133.866 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825134.186252024] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825134.057 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825134.377857809] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825134.245 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825134.567401758] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825134.437 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825134.758336505] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825134.629 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825134.959723428] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825134.821 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825135.167953301] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825135.012 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825135.525439514] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825135.392 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825135.716103825] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825135.584 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825135.908600633] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825135.776 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825136.109964227] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825135.968 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[async_slam_toolbox_node-1] [INFO] [1719825136.484343026] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825136.347 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825136.669316759] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825136.539 for reason 'discarding message because the queue is full'
[async_slam_toolbox_node-1] [INFO] [1719825136.866567614] [slam_toolbox]: Message Filter dropping message: frame 'scan' at time 1719825136.731 for reason 'discarding message because the queue is full'

The topic list:

/clicked_point
/diffbot_base_controller/cmd_vel_unstamped
/diffbot_base_controller/odom
/diffbot_base_controller/transition_event
/dynamic_joint_states
/goal_pose
/initialpose
/joint_state_broadcaster/transition_event
/joint_states
/map
/map_metadata
/map_updates
/parameter_events
/pose 
/robot_description
/rosout
/scan
/slam_toolbox/feedback
/slam_toolbox/graph_visualization
/slam_toolbox/scan_visualization
/slam_toolbox/update
/tf
/tf_static

The node list:

/camsense_x1_node
/controller_manager
/diffbot_base_controller
/joint_state_broadcaster
/robot_state_publisher
/rviz
/slam_toolbox
/transform_listener_impl_565276a05730
/transform_listener_impl_5dc4ea62e1e0

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

$\endgroup$
6
  • $\begingroup$ What do your logs say? Please post them explicitly $\endgroup$ Commented Jun 30 at 23:02
  • $\begingroup$ I added the slam_toolbox log and topic/node list, if there is any other log I should add please let me know $\endgroup$
    – Henk
    Commented Jul 1 at 9:55
  • $\begingroup$ It seems pretty clear what the error is here: the message filter is rejecting to send messages to SLAM Toolbox's message callback due to not having transforms it requires at a timestamp it deems reasonable. Please look into your TF tree, laser scan timestamps, and use_sim_time settings. $\endgroup$ Commented Jul 1 at 17:34
  • $\begingroup$ To exclude a TF tree issue I tried a known working example which is known as articubot_one, which is also based on the ros controllers example 2. I replaced the hardware with mock components and used my lidar package, this gave equal result in all test which make me believe the TF tree isn't the main issue for me. I compared the timestamp of the /scan echo with the /tf echo as far I can compare these are equal in the seconds timestamp. Setting the use_sim_time to true for slam_toolbox made the timestamp message from slam_toolbox disappear, but the full queue message stayed. $\endgroup$
    – Henk
    Commented Jul 2 at 15:22
  • 1
    $\begingroup$ I was able to figure it out, after changing to a scanner to odom package to provide the odom I found it had issues working with my lidar package. Digging into that I found some errors in the lidar package with regard to data formats. After addressing this everything started to work and is mapping very well. $\endgroup$
    – Henk
    Commented Jul 8 at 10:19

0

Your Answer

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

Browse other questions tagged or ask your own question.