ros/ros_comm — pull request #383 by forouher (2014-04-01 13:34:53+00:00)
Title: Topic/Connection statistic measurements

These patches add an enhancement to roscpp and rospy that monitors some metrics (period, traffic, message delay, dropped messages) over every ROS connection and periodically sends out aggregated statistics data over a common topic /statistics.

The rationale behind this is that it is currently hard to measure these things without actually subscribing to the topics. E.g., if you want to know at which frequency your Kinect camera publishes images, you have to check with "rostopic hz /foo". But that will create quite a noticable load on the system and in any case might show a misleading number. These patches add a method to measure those things in a lightweight way for the whole system.

I've extended rqt_graph to annotate the edges of the ROS graph with the statistics measured:

![stats_viewer](https://cloud.githubusercontent.com/assets/676900/2579279/776bbb50-b99f-11e3-9eb8-a5451d611c08.png)

For backward compatibility these statistics are disabled by default. They can be enabled via "rosparam set enable_statistics true".

I believe this enhancement might of useful to the ROS community at large. If there are any questions, concerns, remarks, feel free to share them.

cheers
Dariush