Robotics StackExchange | Archived questions

rviz2 could not display laser scan data when the fix frame is set to odom

Hi,

I'm working on ubuntu18.04 and ROS2 dashing, and I'm running in simulation with gazebo9.

After I launch gazebo and rviz2, every thing seems fine at first, but after I change the fix frame to laser, the LaserScan display shows an error: Could not transform from [laser] to [odom], please see the following picture: image description

And the log error message from rviz2 console is:

[rviz2-1] [ERROR] [rviz2]: Lookup would require extrapolation into the future. Requested time 961.44000 but the latest data is at time 961.42000, when looking up transform from frame [laser] to frame [odom]

Could someone who familiar with this could give me some clue about this problem, because if I cannot set the fix frame to odom, I think it won't possible to mapping. Thanks for advance.

Asked by Phymin on 2020-09-22 20:25:25 UTC

Comments

And you can confirm that the TF tree is connected from the laser to odom?

Asked by JackB on 2020-09-22 22:25:06 UTC

Yes, I think, from the TF tree in rviz there is no error, and I don't know how to show tf tree in ROS2

Asked by Phymin on 2020-09-23 04:24:54 UTC

I am not sure specifically about ROS2, but to print out a pdf of your frame tree run rosrun tf view_frames or rosrun tf2_tools view_frames.py in a terminal.

Asked by JackB on 2020-09-23 07:59:20 UTC

Answers