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

Duplicate tf tree operations offline in C++?

asked 2017-03-28 12:54:31 -0500

lucasw gravatar image

updated 2020-11-21 12:15:36 -0500

What is the most expedient way to duplicate the sort of information the tf tree provides but without having to sendTransform or do lookups on a tf listener object? One big thing I don't require is any time stamping, I just want to build a tree, query it, then I would change it and query again and only get results for that most recent transform hierarchy.

I want to build up a transform tree using the same information (and ideally the same data types) I'd otherwise put into a sendTransform and then be able to query it for what the transform from X to Y is and get the same return value datatypes.

Could I use the listener object, but insert transforms directly into it that are immediately available for lookup without have to broadcast them?

The main concern is speed which requires parallelism, I want to create and use any number of trees simultaneously with no sharing between them, and no delay before transforms are available after defining frame relationships.

I know I can figure out something for myself probably any of several different ways using any of several different matrix operation libraries, datatypes and so on, and wrap the whole thing in tf-like interface, but I'd prefer a general and already available approach that is as close to tf as possible.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-03-28 14:11:12 -0500

tfoote gravatar image

You can create a bare BufferCore class. And use it's API (setTransform and lookupTransform. If you don't care about timestamps, set the static parameter to true when setting the transform and it won't build a time history.

You can also use the tf2_ros::Buffer class if you want the templated transform methods.

That too won't hit the network unless you instanciate a TransformListener

You can make as many of these as you want and they should be threadsafe.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-03-28 12:54:31 -0500

Seen: 668 times

Last updated: Mar 28 '17