Ask Your Question

[ROS2] TF2 broadcasting very slow

asked 2018-09-14 08:06:40 -0500

Myzhar gravatar image

updated 2018-09-19 10:47:34 -0500


I have a node that broadcasts dynamic TF2 transforms (30 Hz ) and a robot_state_publisher that broadcasts the static TF2 from an URDF file.

The problem is that in Rviz I notice a very slow propagation of the Transforms and using the command ros2 run tf2_ros tf2_echo I indeed receive TF2 at about 1Hz that is a really low frequency.

For many links the TF propagation cannot be calculated at all.

What can be the problem?

Thank you Walter

UPDATE I noticed that the command works well for "static frames" but cannot connect "static frames" to "dynamic frames".

Considering the TF chain:

zed_left_camera_frame -> zed_camera_center -> base_link -> odom -> map

if I run the command $ ros2 run tf2_ros tf2_monitor zed_left_camera_frame map I get this broken chain:

ros2 run tf2_ros tf2_monitor zed_left_camera_frame map
Waiting for transform chain to become available between zed_left_camera_frame and map 

RESULTS: for zed_left_camera_frame to map
Chain is: zed_left_camera_frame -> zed_camera_center -> base_link
Net delay     avg = 0.00394501: max = 0.0212562

Frame: base_link, published by <no authority available>, Average Delay: 0.0107858, Max Delay: 0.0123577

All Broadcasters:
Node: <no authority available> 61.1384 Hz, Average Delay: 0.0105982 Max Delay: 0.0123577

It seems that the remaining chain base_link -> odom -> map cannot be resolved and I cannot find the reason.

The weird thing is that $ ros2 run tf2_ros tf2_echo zed_left_camera_frame map 30 gives a correct result

How can I understand the cause of the problem?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-09-18 04:30:02 -0500

tfoote gravatar image

There was an issue with incoming queue processing in rviz that sounds similar to your problem recently fixed here:

edit flag offensive delete link more


I updated my ROS2 sources to latest master, but I continue to see latency in TF propagation in Rviz2 and furthermore when trying to get a transform from a static frame to a dynamic frame it is not available even if I can see it using the tf2_echo command

Myzhar gravatar image Myzhar  ( 2018-09-18 08:51:40 -0500 )edit

answered 2018-09-14 09:56:24 -0500

dhood gravatar image

The 1Hz for tf2_echo is to be expended (that's the frequency at which it looks up transforms). What's the frequency of your robot_state_publisher?

For rviz, at least in past versions of ROS 2, I have gotten better reception of messages using Connext or Opensplice as a ROS Middleware instead of the default FastRTPS (because of its default communication settings), though this may not be necessary anymore on the latest development branches of ROS 2. You could try changing the middleware and check if that makes a difference, see

edit flag offensive delete link more


I will try to change RMW. I had just planned to try it. The problem with robot_state_publisher is that I searched in the source code and it seems that the publishing frequency is fixed to 1 Hz:

Myzhar gravatar image Myzhar  ( 2018-09-14 10:40:20 -0500 )edit

Nothing. I changed RMW, but strange things happens.

The command $ ros2 run tf2_ros tf2_echo map base_link 30 generates a good output and I can see transform changing realtime.

The command $ ros2 run tf2_ros tf2_monitor map base_link waits for the transform without success...

Myzhar gravatar image Myzhar  ( 2018-09-18 03:43:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-09-14 08:06:40 -0500

Seen: 823 times

Last updated: Sep 19 '18