I made a subscriber which reads LIDAR data from rosbag-play. I use C++(roscpp).
But when I do rosbag-play with normal speed, subscriber's callback function cannot catch up with
LIDAR stream speed, then subscriber's queue become easily full, and many data is dropped and algorithm doesn't work properly.
So I have to control the speed of rosbag-play, and to decide appropriate speed, I need to know whether subscriber is dropping data or not.
How can I detect that ?
(Making queue-size very big is not my choice, because it's just a matter of time until the queue gets full...)
(I googled about this question and expected someone already answered, but I could not find any concrete solutions)
Thank you for your time, in advance.
---
Best regards,
Nanoha.
↧