Ask Your Question

TF Listener for static transforms exclusively

asked 2016-11-12 10:15:34 -0600

spmaniato gravatar image

updated 2016-11-12 11:03:53 -0600

Is there a way to listen to only the static transforms in a TF tree (e.g. base_link --> base_laser_link) without instantiating an entire tf::TransformListener object, which "receives and buffers all coordinate frames that are broadcasted in the system" ? Can tf::MessageFilters be used for something like that?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-11-12 10:25:29 -0600

NEngelhard gravatar image

updated 2016-11-12 21:26:51 -0600

The static transformations are published on /tf_static, so just listen to them. But as you care about bandwidth, you should have a look at the tf2_ros buffer_server. This node listens to /tf and /tf_static and runs an action server that you can use to get transformations so that your node does not listen to /tf(_static) but only asks the buffer_server if it needs a transformation.

edit flag offensive delete link more


Thanks for the quick reply! I'll take a look and get back to you with any follow-up questions :-)

spmaniato gravatar image spmaniato  ( 2016-11-12 10:52:36 -0600 )edit

OK, so it looks like your answer makes total sense. But I'll have to migrate to tf2_ros from tf (which I should have done ages ago anyway ...) Thanks again

spmaniato gravatar image spmaniato  ( 2016-11-12 11:03:16 -0600 )edit

Moving from tf to tf2 is rather easy. In tf there isn't even a concept of a static transform.

NEngelhard gravatar image NEngelhard  ( 2016-11-12 11:14:48 -0600 )edit

Additional question: I have a tf2_ros::Buffer tf_buffer_ and ask for trafos with tf_buffer_.lookupTransform(). How can I be sure a transformation is from /tf_static?

mherrmann gravatar image mherrmann  ( 2018-07-25 03:27:21 -0600 )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



Asked: 2016-11-12 10:15:34 -0600

Seen: 881 times

Last updated: Nov 12 '16