rospy.wait_for_message change queue size

asked 2019-05-06 05:03:19 -0500

Eisenhorn gravatar image


I am grabbing images from a topic published by a camera plugin in gazebo. The problem is, that the camera topic has a queue size of 2 (according to rviz). So whenever I get an image it is the oldest of the two on the topic and not of interest.

The rospy.wait_for_message API has no parameter to change the queue size, or flush the queue.

Also for the camera plugin I haven't found a configuration parameter to change the queue size ..

A workaround of course would be to grab an image 2 times from the topic and discarding the first message. But this isn't really elegant.

I guess it has to come out to change the queue size on the plugin side, so any hint is really appreciated.


edit retag flag offensive close merge delete