Ask Your Question
1

waitForMessage functionality for TimeSyncronizer

asked 2011-09-05 10:02:36 -0600

dk gravatar image

updated 2014-01-28 17:10:21 -0600

ngrennan gravatar image

Hi

I am interested to get new sensor values (published to a topic) while in a service callback. For a single topic I was able to do this using ros::topic::waitForMessage. Unfortunately I am actually looking for a pair of images + camera information (4 topics in total) that I synchronize using message_filters::TimeSyncronizer. Is there a way to wait (block) for the next synchronized set while in a service callback?

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2011-09-16 09:22:27 -0600

Wim gravatar image

There is no 'shortcut' such as ros::topic::waitForMessage for the message time synchronizer. You'll have to construct your own mechanism where you connect to the topics from the service callback, and monitor the callback of the time synchronizer.

edit flag offensive delete link more

Comments

I tried this but it did not work. The callback (given to TimeSyncronizer) does not get called while the service callback is active. Looking at the implementation of waitForMessage it seems I need to specify a different CallbackQueue, but I could not figure out how to do this for TimeSynchronizer. dk ( 2011-09-23 00:50:27 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2011-09-05 10:02:36 -0600

Seen: 364 times

Last updated: Sep 16 '11