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

Get a callback on a frame apparition

asked 2015-10-29 09:18:33 -0600

TomSon gravatar image

Hi everyone, I would like to get a callback when I got a specific frame.

I already test this method but it requires a defaut topic that i don't require:

point_sub_.subscribe(nh_, "scan", 10);
tf_filter_ = new tf::MessageFilter<sensor_msgs::LaserScan>(point_sub_, tf_, "laser", 10);
tf_filter_->registerCallback( boost::bind(&TeleopRoboteq::msgCallback, this, _1) );

Can I subscribe to tf and trigger the message filter like a normal topic (instead of laser in my exemple)?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-10-29 13:25:18 -0600

tfoote gravatar image

I'm not sure what you mean by "triggering the message filter like a normal topic". You can use the MessageFilter for any topic with a Header.

You can also create a tf::MessageFilter with an unused topic and programatically add data to it via it's API.

edit flag offensive delete link more


Actually I don't need any topic beside tf. I have to do a transform when a frame appear. it look like I need a mix between messagefilter and waitfortransform.

TomSon gravatar image TomSon  ( 2015-10-30 03:50:07 -0600 )edit

Question Tools

1 follower


Asked: 2015-10-29 09:18:33 -0600

Seen: 197 times

Last updated: Oct 29 '15