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

Subscribe to tf (e.g. tf callback)

asked 2013-05-28 09:41:42 -0500

ebeowulf gravatar image

I'm playing around with the openni_skeletal tracker, which posts all of its position data only to /tf. Now I want to access that tf data like I would access a different sensor stream. I want to write a callback function that is only activated when there is new skeletal data to process. Is it possible?

I know that the traditional route for accessing tf is to write a listener that regularly polls tf, but I'd rather not have to write the synchronization code myself when the tf messages I'm interested in are published more or less at the same time.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-05-30 11:23:12 -0500

tfoote gravatar image

What you want to do is possible. Just subscribe to the /tf topic. You will have to do your own filtering on when the new skeleton data is included in the topic vs other things on the topic.

I'll note that if you subscribe to the raw topic you will have to write the synchronization code yourself. If you use the listener it will do all of that for you. If you're just going to be streaming data the above approach might work w/o synchronization.

edit flag offensive delete link more

Comments

I'd hoped for a solution that would let me subscribe directly to a particular transform, but this seems straightforward. Thanks!

ebeowulf gravatar image ebeowulf  ( 2013-05-30 11:47:16 -0500 )edit

hijack this post and I want to post a question here: how do you use tf listener to retrieve the location from the "/tf" topic that I publish (using the diffDrive_puglin?)?

Gazer gravatar image Gazer  ( 2013-05-30 13:04:19 -0500 )edit
1

@Gazer this is a Q&A forum not a discussion board. Please ask your own question so that others can find it more easily. Also please be a little bit more descriptive in your question.

tfoote gravatar image tfoote  ( 2013-05-30 13:10:57 -0500 )edit

Question Tools

Stats

Asked: 2013-05-28 09:41:42 -0500

Seen: 2,282 times

Last updated: May 30 '13