ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I've answered this on your ros_comm issue but for anyone who gets here later this behavior is a result of ROS using TCP for interprocess communication by default. Specifically the behavior above is the result of Nagle's algorithm.
To eliminate the latency one can supply ros::TransportHints to the subscriber on creation. Specifically specifying ros::TransportHints::tcpNoDelay will turn off Nagle's algorithm.
For a more in-depth explanation of TCP_NODELAY and its effect on the network stack I would encourage reading through this blog post