0
$\begingroup$

Rosanswers logo

I have a single publisher that publishes messages at high frequency (1800 Hz), and a subscriber in another node. I realized that the messages are not always processed sequentially. I verified this by doing the following: in the callback function, I output a warning every time the seq number of the processed message is lower than the seq number of the message processed in the previous call of the callback.

My question: is there a way to force a subscriber to process the incoming messages exactly in the order of the seq numbers in their header? (up to now I thought this would be the case by default with a single subscriber/publisher system, but apparently it isn't...)

Any help is greatly appreciated!


Originally posted by philippp625 on ROS Answers with karma: 21 on 2013-08-17

Post score: 1


Original comments

Comment by philippp625 on 2013-08-19:
I just realized that my problem only exists if I use a tf::MessageFilter when subscribing. Nevertheless, I don't understand why the messages are not processed in the order of their time stamps, since they all have the same frame_id, so the transforms should be available for older messages first.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The message filter is specifically designed to cache and potentially return messages when they're ready and doesn't keep the order internally. You could write a specialization which would return them only in the incoming order.


Originally posted by tfoote with karma: 58457 on 2017-12-05

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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