Force subscriber to process messages in the right order
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!
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.