Robotics StackExchange | Archived questions

rospy.wait_for_message change queue size

Hi,

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.waitformessage API has no parameter to change the queue size, or flush the queue. https://docs.ros.org/diamondback/api/rospy/html/rospy.client-module.html

Also for the camera plugin I haven't found a configuration parameter to change the queue size .. http://gazebosim.org/tutorials?tut=ros_gzplugins#Camera

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.

BR

Asked by Eisenhorn on 2019-05-06 05:03:19 UTC

Comments

Answers