Latency doesn't change when switching TCP to UDP in TransportHints
I have tried changing the topics ros uses when doing the simple C++ publisher and subscriber. From what I understand, UDP should be faster in terms of latency and I wanted to test by how much, compared to TCP. After running the test, it doesn't seem to be different. Here is a picture of the results that I got when sending 89 characters using different settings in TransportHints. I was wondering why this is the case.
Some information on how I tested latency: Using the seconds in the terminals I found the difference for 200 samples for each topics.
Asked by VTH2018 on 2019-02-26 13:18:20 UTC
Comments
Two comments:
Asked by gvdhoorn on 2019-02-26 13:39:24 UTC
Just to add; if you're testing both nodes on the same computer, you likely won't see any substantial difference between TCP and UDP because the messages are sent locally, and aren't actually sent over the network cable.
Asked by ahendrix on 2019-02-26 14:43:20 UTC