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

Notification when tf topic is subscribed to?

asked 2014-07-09 19:07:35 -0500

mpthompson gravatar image

I'm working on camera based visual odometry node that publishes /tf transforms when fiducial tags are present within a camera image. As the image process is somewhat computationally heavy, I would only like to process images only when there is a subscriber that cares about the transforms from my node. The ImageTransport infrastructure provides a connectCallback mechanism for accomplishing this where client nodes subscribe to an image. However, I don't see there is a similar connect callback mechanism for the TransformBroadcaster which I'm using to send transforms. I presume this is because there is no way to tell when transforms a subscriber to /tf really cares about.

Is there a recommended way of accomplishing this? I presume I could create a service that clients can use to manually enable/disable image processing, but I was hoping for something a bit more automatic.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-09 19:57:29 -0500

allenh1 gravatar image

How about you make the odometry transform a service? This way, it would only run when the service is called.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-07-09 19:07:35 -0500

Seen: 108 times

Last updated: Jul 09 '14