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

rospy subscriber queue

asked 2012-03-26 23:14:10 -0600

apalomer gravatar image

Hello, I'm writing an ekf by myself as a project in a lecture and I thing I have a problem with the queue of the callback function to update the odometry. The thing is that I subscribe the topic odom as:

 rospy.Subscriber("odom", Odometry, odometryUpdate)

but it does not has queue. I've checked this tutorial to see if there is any option of adding a queue in rospy, but I can not find it. Is it possible to add a queue? If so, how can it be done?

if it is not possible to add a queue I would like to give more than just one parameter to the function odometryUpadte (the call back function). How can I do this?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-03-27 01:52:06 -0600

michikarg gravatar image

You can check the API here:

There you can see that you can define a queue size for you subscriber.

Hope that helps

edit flag offensive delete link more

answered 2014-03-27 07:31:05 -0600

lucasw gravatar image

Use queue_size (in hydro at least):

rospy.Subscriber("joy", Joy, callback, queue_size=1)
edit flag offensive delete link more

Question Tools


Asked: 2012-03-26 23:14:10 -0600

Seen: 13,787 times

Last updated: Mar 27 '14