Ask Your Question
0

Get a callback on a frame apparition

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

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
0

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

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

Comments

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 -0500 )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

1 follower

Stats

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

Seen: 47 times

Last updated: Oct 29 '15