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

First you need to understand that TCP and RTPS are not exactly the same thing. It's like asking why you would use AC voltage instead of a USB plug.

Go look at the diagrams at https://en.wikipedia.org/wiki/OSI_model before continuing to read this...

UDP and and TCP are transport protocols (layer 4 in the OSI model), and RTPS is probably layer 5.

The cool thing with the OSI model is that if you really needed to, you could swap out lower layers as long as they provide the same functionality. For example IPoAC (https://en.wikipedia.org/wiki/IP_over_Avian_Carriers) swaps out the data link layer with pigeons (yes. you read that right.).

Fastdds includes a few different "transport" methods: UDP, TCP, or Shared memory. UDP transport is compatible with other DDS/RTPS vendors as UDP is specified as part of the RTPS protocol. TCP transport and shared memory transport are not part of the RTPS specification (Though I wish they were..) and therefore not compatible with other DDS/RTPS vendors.

So I think bottom line to answer your question: FastDDS uses UDP unless configured otherwise because that's what the RTPS specification defines.