ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Do topic msg queues allow blocking reads.

asked 2013-09-23 05:45:32 -0600

rnunziata gravatar image

updated 2013-09-23 07:05:57 -0600

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?

edit retag flag offensive close merge delete


@rnunziata Mark the "check" sign at the answer if you're satisfied with it, instead of "closing".

130s gravatar image 130s  ( 2013-09-24 03:06:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-09-23 17:59:21 -0600

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.

edit flag offensive delete link more


Thanks a lot....still have much to learn

rnunziata gravatar image rnunziata  ( 2013-09-24 02:16:41 -0600 )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


Asked: 2013-09-23 05:45:32 -0600

Seen: 207 times

Last updated: Sep 23 '13