ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Publisher Subscriber Overview gives a good explanation on this:
When you create a publisher
ros::Publisher advertise(const std::string& topic, uint32_t queue_size, bool latch = false);
The queue_size there is the publisher/outgoing message queue (B) .. If you are publishing faster than roscpp can send the messages over the wire, roscpp will start dropping OLD messages.
When you create a subscriber
ros::Subscriber subscribe(const std::string& topic, uint32_t queue_size, <callback, which may involve multiple arguments>, const ros::TransportHints& transport_hints = ros::TransportHints());
The queue_size there is the incoming message/subscriber queue (C) size roscpp will use for your callback. If messages are arriving too fast and you are unable to keep up, roscpp will start throwing away OLD messages.
------------.
I believe that everything is FIFO. When queue is full, the oldest message will be thrown away.
------------.
From reading "publish() behavior and queueing" from the link that I put. What I understand is :
2 | No.2 Revision |
Publisher Subscriber Overview gives a good explanation on this:
When you create a publisher
ros::Publisher advertise(const std::string& topic, uint32_t queue_size, bool latch = false);
The queue_size there is the publisher/outgoing message queue (B) .. If you are publishing faster than roscpp can send the messages over the wire, roscpp will start dropping OLD messages.
When you create a subscriber
ros::Subscriber subscribe(const std::string& topic, uint32_t queue_size, <callback, which may involve multiple arguments>, const ros::TransportHints& transport_hints = ros::TransportHints());
The queue_size there is the incoming message/subscriber queue (C) size roscpp will use for your callback. If messages are arriving too fast and you are unable to keep up, roscpp will start throwing away OLD messages.
------------.
I believe that everything is FIFO. When queue is full, the oldest message will be thrown away.
------------.
From reading "publish() behavior and queueing" from the link that I put. What I understand is :
-----------.
That is what I know, feel free to give any correction/ addition.
3 | No.3 Revision |
Publisher Subscriber Overview gives a good explanation on this:
When you create a publisher
ros::Publisher advertise(const std::string& topic, uint32_t queue_size, bool latch = false);
The queue_size there is the publisher/outgoing message queue (B) .. If you are publishing faster than roscpp can send the messages over the wire, roscpp will start dropping OLD messages.
When you create a subscriber
ros::Subscriber subscribe(const std::string& topic, uint32_t queue_size, <callback, which may involve multiple arguments>, const ros::TransportHints& transport_hints = ros::TransportHints());
The queue_size there is the incoming message/subscriber queue (C) size roscpp will use for your callback. If messages are arriving too fast and you are unable to keep up, up (e.g. you do not spin/ the rate of spin is slow ), roscpp will start throwing away OLD messages.
------------.
I believe that everything is FIFO. When queue is full, the oldest message will be thrown away.
------------.
From reading "publish() behavior and queueing" from the link that I put. What I understand is :
-----------.
That is what I know, feel free to give any correction/ addition.