ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Extracted from here:

template<class M>
ros::Subscriber subscribe(const std::string& topic, uint32_t queue_size, 
<callback, which may involve multiple arguments>, const ros::TransportHints&
transport_hints = ros::TransportHints());

You can set the queue size for receiving the messages, if you have a queue size of 1, you will only store the latest message