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

waitForMessage functionality for TimeSyncronizer

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

dk gravatar image

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

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

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 gravatar image dk  ( 2011-09-23 00:50:27 -0500 )edit

Question Tools

Stats

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

Seen: 904 times

Last updated: Sep 16 '11