jdlangs / RobotOS.jl

Julia interface to ROS (Robot Operating System)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Queue Size of 1

josh0tt opened this issue · comments

With a queue size of 1 it appears that the messages are being stored in a buffer and the buffer will continue to fill up so instead of taking in the most recent message we begin reading in older messages first, even though newer ones are available.

From my understanding, that is not the intended behavior of ROS. In my case, I only really care about the latest measurement, so I had the queue size set to 1 so that I would never receive an old measurement if a newer one existed (as described here).

My current workaround is to add a check to see if the time that the message was received was greater than some threshold (meaning the message was too old) and if that is the case then I just ignore the message and read the next one. Not a long term general solution.