[ROS2] Configure TCP communication for cloud endpoint
Hi,
I am trying to configure the default rmw_fastrtps middleware in ROS2 to accept messages from a eProsima FastDDS producer via TCP.
The communication between a local eProsima FastDDS producer and a ROS2 node based on the RTPS (UDP) protocol works fine (tested with osrf/ros2 docker image). The idea behind switching to a TCP based DDS communication is that the ROS2 application should run in a public cloud environment that can accept DDS messages from eProsima FastDDS participants.
I could successfully test the producer to cloud communication with two FastDDS participants (local and cloud) according to the documentation: https://fast-dds.docs.eprosima.com/en...
When trying to modify the rmw_fastrtps middleware for accepting TCP connections (compare https://github.com/ros2/rmw_fastrtps) I get following exception when starting the ROS2 executable:
[XMLPARSER Error] Error adding the transport tcp_transport_1. There is other transport with the same id -> Function insertTransportById
[XMLPARSER Error] Error adding profile 'TCPParticipant' from file 'DEFAULT_FASTRTPS_PROFILES.xml' -> Function extractParticipantProfile
terminate called after throwing an instance of 'eprosima::fastcdr::exception::NotEnoughMemoryException' what(): Not enough memory in the buffer stream
DEFAULT_FASTRTPS_PROFILES.xml
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<transport_descriptors>
<transport_descriptor>
<transport_id>tcp_transport_1</transport_id>
<type>TCPv4</type>
<sendBufferSize>9216</sendBufferSize>
<receiveBufferSize>9216</receiveBufferSize>
<listening_ports>
<port>7400</port>
</listening_ports>
<wan_addr>172.17.0.2</wan_addr>
</transport_descriptor>
</transport_descriptors>
<participant profile_name="TCPParticipant">
<rtps>
<userTransports>
<transport_id>tcp_transport_1</transport_id>
</userTransports>
<useBuiltinTransports>false</useBuiltinTransports>
</rtps>
</participant>
</profiles>
Changing the ID did not help.
I could not find any examples if a TCP based communication is even possible. Even in the rclpy documentation I couldn’t find any hints that the TCP transport could be configured programmatically.
Is this possible? What other option can be chosen when the ROS2 participant should run in a cloud environment?
Hi, did this end-up working for you?
I am running into the same issue. Communication between native FastDDS applications (https://github.com/eProsima/Fast-DDS/...) seems to be working, but not in ROS2. I even tried this on the ROS2 Foxy release.
Any pointers? Thanks.
Hi, sorry for the late reply. I have given up finding a solution. My assumption was that the client libraries are abstracting too much from the actual middleware implementation.