Subscriber data not up to date
I have written a subscriber to one of the image topics and I have set my buffer to 1 using:
subscriber =rospy.Subscriber("/camera/rgb/image_mono/compressed",CompressedImage, callback, queue_size=1)
However my subscriber still lags behind. Any idea what might be causing this? Am I setting the queue size correctly?
How much lag are you seeing? How are you measuring it?
Does it also lag if you display the pointcloud in RViz?
@ahendrix Its about 5 to 10 seconds of lag. Basically when I look at the screen it shows images of things that happened 5 to 10 swconds ago.
@BennyRe I tried it on on image_view and theres no lag but that is because I do a lot of processing on the image before I display it (cv2.imshow) . Now I cannot process at the rate that the publisher is publishing and so what I want to do is drop any messages that arrive while I am processing.