0
$\begingroup$

Rosanswers logo

Let's suppose node A subscribe the topic published by node B. Node A do many caculatations for the subscribed data, it will take a lot of time. However, node B publish topic too fast and assume we can not change the publish rate. So many data published by node B can not be subscribed on time. These data will be lost.

So is there any method to buffer the subscribed topic?


Originally posted by somebodyus on ROS Answers with karma: 113 on 2014-11-27

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

One easy way is to increase queue size of subscriber.

ros::Subscriber sub = n.subscribe("topic_name", 1000, subscriber_callback);  //  queue size is 1000

Originally posted by bvbdort with karma: 3034 on 2014-11-27

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by somebodyus on 2014-12-01:
How to do that using command? I can not modify the source file.

Comment by bvbdort on 2014-12-02:
You should change in source code. I dont think its possible from command line.

$\endgroup$

Your Answer

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