Replies: 12 comments
-
We were able to reproduce the issue regarding the communication between multiple users. However, we didn't find any difference with the network connection up or down. Since Foxy, FastDDS includes a shared memory transport that is active by default, meaning that if two processes are on the same host, they will choose this transport over the other alternatives. However, shared memory segments are limited by user permissions, just like files, and this is intended for security reasons: you don't want a user having access to other user's data. So right now FastDDS does not support shared memory transport on multi-user environments. We are looking for alternatives to detect multi user scenarios and disable shared memory or somehow support the scenario. Meanwhile, if UDP transport is enough for your use case, you can disable shared memory transport. This can be done in ROS2 Foxy through XML configuration. Create an XML file disabling the builtin transports and adding a custom UDP transport:
Set the environment variable |
Beta Was this translation helpful? Give feedback.
-
@IkerLuengo I also run into the same issue. Only I am using a super client config with the discovery server <?xml version="1.0" encoding="UTF-8" ?>
<dds>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<transport_descriptors>
<transport_descriptor>
<transport_id>UdpTransport</transport_id>
<type>UDPv4</type>
</transport_descriptor>
</transport_descriptors>
<participant profile_name="super_client_profile" is_default_profile="true">
<userTransports>
<transport_id>UdpTransport</transport_id>
</userTransports>
<useBuiltinTransports>false</useBuiltinTransports>
<rtps>
<userTransports>
<transport_id>UdpTransport</transport_id>
</userTransports>
<useBuiltinTransports>false</useBuiltinTransports>
<builtin>
<discovery_config>
<discoveryProtocol>SUPER_CLIENT</discoveryProtocol>
<discoveryServersList>
<RemoteServer prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41">
<metatrafficUnicastLocatorList>
<locator>
<udpv4>
<address>10.x.x.x</address>
<port>11811</port>
</udpv4>
</locator>
</metatrafficUnicastLocatorList>
</RemoteServer>
</discoveryServersList>
</discovery_config>
</builtin>
</rtps>
</participant>
</profiles>
</dds> This configuration did not work. Any suggestions |
Beta Was this translation helpful? Give feedback.
-
Hi @tiany44 , First of all, are you also using different users? Else, please consider opening a separate issue. Looking at the remote Server GUID, I'm assuming you are instantiating the server with the CLI and id 0, i.e. |
Beta Was this translation helpful? Give feedback.
-
Yes, I am using different users. My discovery server works well. I just cannot see nodes/topic started by sudo
Correct
Inside a VPN hence the 10.x.x.x
This is a mistake from trying which configuration would not result in an error. Within rtps, the server configuration also needs to be inside My main issue is that I do not know a way off configuring the super client to not use shared memory and use UDP instead (locally). I believe this should solve the issue where separate users on the same machine and even different machines do not see each other. Correct? While I understand why shared memory is the main issue for users on the same machine, I do not understand why I cannot see the nodes/topics started by sudo on a separate machine given that I am using a discovery server. |
Beta Was this translation helpful? Give feedback.
-
@EduPonz I also started the ros2 daemon as sudo. Still could not see nodes and topics started as sudo through the discovery server |
Beta Was this translation helpful? Give feedback.
-
Hi @tiany44 , When you say you cannot see the topics/nodes, do you mean using |
Beta Was this translation helpful? Give feedback.
-
Hello @EduPonz With the discovery server running, I connect my laptop to the vpn and run The node on the robot has to do stuff with input and output devices and launching the node without sudo will not work as expected. sudo su
source ros2_foxy/ros2-linux/setup/bash
source Documents/Nodes/my_node/install/setup.bash
ros2 daemon start # sometimes this is successful meaning the daemon was not automatically started
ros2 run my_node my_node With From my laptop, the This behaviour can be tested by running the demo_nodes_cpp listener and talker as sudo from different machines connecting to the same discovery server |
Beta Was this translation helpful? Give feedback.
-
@EduPonz were you able to reproduce this behaviour? Also, how soon can we expect version 2.6.0 and this PR merged? |
Beta Was this translation helpful? Give feedback.
-
@MiguelCompany any chance we can have your fixes in the next release? |
Beta Was this translation helpful? Give feedback.
-
@tiany44 I don't think it will make it to the next release, but it should be possible to workaround the issue with the XML files provided along the comments. I think there may be another unrelated issue here. Maybe the communication from the |
Beta Was this translation helpful? Give feedback.
-
Both of my clients use the same super client configuration. Without sudo, |
Beta Was this translation helpful? Give feedback.
-
eProsima/Fast-DDS-docs#497 introduced a note stating this caveat related to SHM communications. I am labelling this as an enhancement and moving to the corresponding forum discussion according to Fast DDS CONTRIBUTING guidelines. |
Beta Was this translation helpful? Give feedback.
-
When starting nodes as multiple users on a single machine (e.g. some as root others as normal users) communication only succeeds if there is no network connection.
As soon as the machine is connected to a network, topics from other local users can not be seen. Without a network connection topics are visible. Other machines can see topics of all users (beside different local ones of course).
Issue came up here.
Beta Was this translation helpful? Give feedback.
All reactions