Is there a way to know how many messages are left in a Subscriber's queue, or if it is empty?
I've been digging in the documentation, source code and googling in general and can't seem to find an answer to this. I'm currently experimenting with mapping algorithms and have to run several experiments on the same data due to random sampling. For that purpose, I've created some ROSBags that, after all the important movement and sensor messages have been sent, sends a Bool message to signal the end of the simulation. Most of my nodes shutdown after receiving this message so that everything is reset for the next experiment. (I've created a wrapper for roslaunch that shuts down after the critical nodes are dead). The thing is, one of the nodes might still have some messages in the queue to be handled by the callbacks, and I would like for it to shut down only after the queue is empty.