rate of subscribing
can i change the rate of subscribing or publishing?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
topic_tools/throttle can subscribe to a topic and republish it at a different rate or bandwidth. I don't think there's a way to do it directly in a subscriber.
You can use a client/server node pair (and a queue/buffer in the server node) to avoid lag build up. For example, if you are gathering camera images in a node and publishing them slightly faster than a subscriber node can display them, lag will build up over time. Take this difference to an extreme and it is essentially how a high speed camera is used. If you implement the client/server + queue, the node collecting camera images will still gather frames faster than the display node can show them, but you can pick keyframes out of the queue to eliminate any lag up to that point.
I was unaware of the topic_tools/throttle solution. That sounds like it would accomplish what I described above, but you would need to know a priori the processing rate of the display node, right?
You can use the ros::Rate to specify the frequency that you would like to loop at
Asked: 2014-04-16 19:59:29 -0500
Seen: 1,215 times
Last updated: Jul 13 '14
Subscribing to topic throw compilation error
Publishing and subscribing to a topic in different threads
Subscribe and publish velocity [closed]
What is the preferable way to share states among multiple nodes in ROS?
Are there somebodies use OpenCV2.2 with ROS ?
Strange behavior of takeoff in AR Drone simulator if launch file is separated.
Does python cv_bridge perform a copy?
Using openCV in ROS to stream images from AR-Drone
rqt-image-view datatype mismatch
cv_bridge returns error during cvimage to rosimage conversion