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

tf max_cache_time

asked 2014-11-06 14:52:42 -0600

2ROS0 gravatar image

Hi,

The tf transform listener object constructor takes a value for the max_cache_time; say 10 seconds for instance..

tf::TransformListener tf(ros::Duration(10));

What is the use of this cache? And what are the pros and cons of increasing or decreasing the number?

Does this imply that if I add a value of 5, I am expecting to use 5 second old tf data somewhere? And does this have any effect on the duration for the waitForTransform function?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-11-07 03:29:54 -0600

tfoote gravatar image

The max_cache_time parameterizes how long of a history to store for each transform. In general it will determine how much memory is used storing the older data. A longer cache will have low overhead as long as you don't query far into the past very often.

The length of the cache determines how old a timestamp you can query, once the cache has been filled.

It will not have an effect on waitForTransform as waitForTransform only goes forward not backwards. (It assumes new data will be newer.)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-11-06 14:52:42 -0600

Seen: 452 times

Last updated: Nov 07 '14