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 can't answer this question generally, but I will talk about what we do, which seems to be working pretty good for us.

  1. We use both diagnostics AND rosout:
    • We use diagnostics to represent the current state of a node. We have other nodes that subscribe to diagnostics, and conditionally react.
    • We use rosout to represent events such as connection time-outs, state transitions, etc. This is mainly used to trace code paths post-execution from bag files.
    • This way anybody can subscribe to diagnostics to view the current state of everything (ie handy to explain why a driver or node isn't working) while still being able to log every event that occurs in a node.
  2. If every node is publishing both rosout and diagnostics, then no matter what you do you'll have a node subscribing to every other node to watch for diagnostics or rosout (or even both). With DDS, that will produce a socket connection to every other node (though just a few sockets per node inter-connection, regardless of number of topics).