Skip to content

High latency in TF propagation  #359

@Myzhar

Description

@Myzhar

I'm porting the Stereolabs ZED 3D camera package to ROS2 and I cannot work with TF because of the high latency.
I'm sure that the TF messages propagates because I can see them using the ros2 topic and the ros2 run tf2_ros tf2_echo CLI commands... but Rviz receives them with many seconds of latency (sometimes I see frame axis move in Rviz after 2 or 3 three seconds after I stopped the node).

I thought that it was a problem with our node until I made a test with the "dummy robot" example and I figured out that the latency is a general problem:

  • Run the example:
    $ ros2 launch dummy_robot_bringup dummy_robot_bringup.launch.py
  • Open $ rviz2
  • Set the fixed frame to world
  • Add a TF plugin viewer. You will see the robot link moving
  • Add a LaserScan plugin and subscribe to /scan

At this point you will see the simulated laser scan on the oscillating link of the robot and you will notice how it is rendered in late respect to its reference frame.
Furthermore you will notice a lot of errors
Could not transform from [single_rrbot_hokuyo_link] to [world] in the LaserScan plugin
and
[ERROR] [rviz2]: Lookup would require extrapolation into the future. Requested time 1538495387.01342 but the latest data is at time 1538495386.98954, when looking up transform from frame [single_rrbot_hokuyo_link] to frame [world]
in the console where RVIZ2 has been executed

image

I read that a solution was provided for a similar issue and I updated ROS2 and Rviz2 to the latest version of the master branch, but the issue is still present.
I also tried to change RMW, but each of the three available options have the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwaiting on upstreamwaiting on a change in an upstream dependency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions