0
$\begingroup$

Rosanswers logo

Hello,

We just switched over to using Indigo, and noticed the warnings about using rospy.Publisher without specifying a queue_size. I've read this and I can see that it's a fabulous idea to specify this value. What's a good value to use, and how do I know if I've picked a reasonable number?

Thanks,

Rick


Originally posted by Rick Armstrong on ROS Answers with karma: 567 on 2014-08-15

Post score: 10

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The queue size is a balance between latency and completeness. If your usage only wants the latest data a small queue size is appropriate. If your application would rather have more complete information a larger queue size is preferred.

Note it will only be an issue if your topic backs up. Another consideration is if the publisher will be pushing multiple messages close together make sure the queue is big enough to hold the whole batch if you don't want losses.


Originally posted by tfoote with karma: 58457 on 2014-08-16

This answer was ACCEPTED on the original site

Post score: 11


Original comments

Comment by Rick Armstrong on 2014-08-17:
Thanks Tully,

Rick

Comment by Paddre on 2017-07-22:
Are there any performance or efficiency concerns connected to the queue size? I.e. does a smaller queue size save memory or is there no gain of a small queue size over a large queue size?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.