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

Roscpp Publisher not publishing all messages

asked 2012-05-22 21:51:22 -0500

David Lu gravatar image

I have a node that is publishing a lot of messages (approximately 135 per second). It should be publishing more. Every time I publish a message, I print out a debug line, and the number of debug lines exceeds the number of messages received. The messages received have sequential header.seq numbers.

This is using a roscpp node on one computer. The publishing takes place in a callback.

Why would some of the messages not get published?

edit retag flag offensive close merge delete



If there are sequential numbers my guess would be that some queue in the publisher overruns. Do you see any messages when you switch the loggers to DEBUG?

dornhege gravatar image dornhege  ( 2012-05-23 00:11:19 -0500 )edit

How big are your buffers (subscriber and publisher)?

Lorenz gravatar image Lorenz  ( 2012-05-23 01:00:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-05-23 05:24:42 -0500

David Lu gravatar image

Both of you are right. I only had the queue size set to one, which is seemingly obvious.

In my defense, I checked the constructor for the roscpp Publisher and didn't see a queue size parameter. It's in advertise. D'oh.

edit flag offensive delete link more

Question Tools


Asked: 2012-05-22 21:51:22 -0500

Seen: 935 times

Last updated: May 23 '12