0
$\begingroup$

Rosanswers logo

Is there support for topic msg queues to allow blocking reads rather then callbacks. I would like to synchronize two queues. Drive one by call back and wait on the other if a msg is not available. How would you sync two independent queues?


Originally posted by rnunziata on ROS Answers with karma: 713 on 2013-09-23

Post score: 0


Original comments

Comment by 130s on 2013-09-24:
@rnunziata Mark the "check" sign at the answer if you're satisfied with it, instead of "closing".

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If your question is actually about message synchronization, then please check message_filters.

The TimeSynchronizer filter can subscribe to several topics simultaneously and will call back a single function with messages from all the topics as its arguments. This method will work only when the time stamps of all the messages are exactly same.

To synchronize the messages from sensors that are not synchronized in hardware, e.g. camera and laser, you may need to use ApproximateTime policy.

Regarding message queues you can find some information here: roscpp/Overview/Callbacks and spinning.


Originally posted by Boris with karma: 3060 on 2013-09-23

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by rnunziata on 2013-09-24:
Thanks a lot....still have much to learn

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.