RTPS vs TCP (Foxy)
Hi!
I have a question, why FastDDS uses RTPS even for qos_reliability=reliable instead of use TCP? What are advantages to use RTPS?
Thank you
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Hi!
I have a question, why FastDDS uses RTPS even for qos_reliability=reliable instead of use TCP? What are advantages to use RTPS?
Thank you
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...) 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.
Thank you so much for your very informative answer, I learned a lot. Have a good day and thank you again!
Asked: 2021-10-07 08:24:53 -0500
Seen: 94 times
Last updated: Oct 07 '21
rviz2 does not show the images published on the topic
[ROS2][foxy][launch] Restart node every time it exits - launch file
Bad performance of ROS2 via Wifi
ROS2 windows installation failure
What exactly does ros2 topic hz display
How to run a single node as root [ROS2]
ROS2 async_send_request callback