[rviz2] Lookup would require extrapolation into the future
Hi,
I've got a ydlidar X4 publishing in /scan and I would like to display a map while I'm moving it around (by hand).
I use ros2_laser_scan_matcher to calculate odometry data and publish the odom/base_link tf.
I've a laser_frame and base_link that are basicaly attached together.
Everything is runing on the same computer.
Once I run rviz2, everything works as expected with base_link or laser_frame as fixed frame. But if I use odom as fixed frame, I can't display the /scan data anymore. However, I can still correctly display the odom and base_link frames' position. I get the following error :
[ERROR] [1680210915.546343593] [rviz2]: Lookup would require extrapolation into the future. Requested time 1680210915,336426 but the latest data is at time 1680210915,212826, when looking up transform from frame [laser_frame] to frame [odom]
There is always ~0.1s gap.
Edit: There are some rate differences but I don't know if they're acceptable or not.
user@ROS:~/ros2_ws$ ros2 topic hz /scan
average rate: 8.155
min: 0.118s max: 0.128s std dev: 0.00305s window: 10
average rate: 8.148
min: 0.118s max: 0.128s std dev: 0.00235s window: 19
average rate: 8.141
min: 0.115s max: 0.130s std dev: 0.00348s window: 28
^Cuser@ROS:~/ros2_ws$ ros2 topic hz /tf
average rate: 8.613
min: 0.066s max: 0.151s std dev: 0.02656s window: 10
average rate: 8.500
min: 0.066s max: 0.153s std dev: 0.02444s window: 19
^Cuser@ROS:~/ros2_ws$ ros2 topic hz /
/clicked_point /rosout
/goal_pose /scan
/initialpose /tf
/odom /tf_static
/parameter_events /ydlidar_ros2_driver_node/transition_event
user@ROS:~/ros2_ws$ ros2 topic hz /tf_static
^Cuser@ROS:~/ros2_ws$ ros2 topic hz /odom
average rate: 8.168
min: 0.083s max: 0.166s std dev: 0.02188s window: 10
average rate: 8.078
min: 0.083s max: 0.166s std dev: 0.02518s window: 18
^Cuser@ROS:~/ros2_ws$