ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

too fast tf broadcasting

asked 2021-04-15 09:37:28 -0600

gab27 gravatar image

updated 2021-04-15 10:58:48 -0600

Hi

I would like to check some condition in a specific coordinate frame. Therefore I am adding a frame to a tf tree in a for loop and rotate the frame each timestep slightly.

I got the following warning: Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame rotating_frame at time 1537.741000 according to authority unknown_publisher

So is this procedure bad practice, or how can I solve that?

I am using Ubuntu 20.04, ros1 melodic.

Edit: I set the the timestamp of a transform each time new before I publish: transform.header.stamp = ros::Time::now();. Maybe the for loop is faster and ros::Time::now() not so precise?

Thanks

edit retag flag offensive close merge delete

Comments

Publishing fast is not a problem.

Publishing TF frames with the same timestamp is not a good idea.

It's possible that's the reason you're getting that warning.

gvdhoorn gravatar image gvdhoorn  ( 2021-04-15 10:31:58 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-04-15 12:08:43 -0600

tfoote gravatar image

That error means that you are publishing data with the same timestamp as something previously published.

Repeated calls to time now are not expected to be the same if you're on wall time. However if you're inside simulated time it's relatively easy to loop faster than the clock updates. Whatever your time source is may be lower resolution. For example gazebo's default physics updates which drive the clock runs at 1kHz which looks a lot like your timestamp significant figures.

Publishing at super high rates incurs a lot of overhead for marginally little benefit unless you have a very high characteristic frequency of the transform, however physical objects are very uncommon to have natural frequencies anywhere near 1kHz.

Tf implements spherical linear interpolation so if you simply publish the rotation a couple times per revolution it can use the timestamps to interpolate between them even more accurately than a sampled solution if you can make sure that linear interpolation is a good assumption between each of your data points.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-04-15 09:37:28 -0600

Seen: 682 times

Last updated: Apr 15 '21