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

Revision history [back]

click to hide/show revision 1
initial version

I think something in your conclusion does not match what is happening (or should be happening). First, if no one is subscribing over the network, then nothing should be happening when you publish, i.e. if network bandwidth is wasted somewhere, there must be some connection between a publisher and subscriber (rviz counts!). This is already somewhat implicitly in the core code as if there are no connections, there is no where to send to. I would also highly assume that there is no marshalling when no subscribers are present.

The publisher.getNumSubscribers() check should thus be useless - _unless_ there are some costly computations going on to create the actual message. Point Clouds from the Kinect are a good example. However, AFAIK the openni driver already does this. Now, the Kinect seems to be a somewhat special case. At least in our observation it seems that producing registered RGB point clouds for some reason is way more costly then XYZ point clouds or images alone. This does not seem to be a ROS problem, though. This might appear as if the network is clogged.