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

ROS doesn't have any convenience functions for measuring latency, but it's relatively simple to get a decent latency measurement by comparing the timestamp in the header with the current time.

The accuracy of this measurement will depend on:

  • latency between the header timestamp and actual message transmission
  • the actual network latency
  • queuing latency on the receiving computer
  • any clock offset between the sending and receiving computer
  • maybe a few other factors

If you're trying to measure packet latency there's really no substitute for understanding how much latency and jitter your system can tolerate, and doing your research.