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?
Originally posted by Giza on ROS Answers with karma: 43 on 2014-10-16
Post score: 0
Original comments
Comment by ahendrix on 2014-10-16:
How much lag are you seeing? How are you measuring it?
Comment by BennyRe on 2014-10-17:
Does it also lag if you display the pointcloud in RViz?
Comment by Giza on 2014-10-17:
@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.
Comment by Giza on 2014-10-17:
@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.