-
Notifications
You must be signed in to change notification settings - Fork 800
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ROS2 Foxy Communication across multiple local users [10599] #1750
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 |
`rtapi_app` runs as root, which breaks shm-based discovery. eProsima/Fast-DDS#1750
`rtapi_app` runs as root, which breaks shm-based discovery. eProsima/Fast-DDS#1750
`rtapi_app` runs as root, which breaks shm-based discovery. eProsima/Fast-DDS#1750
`rtapi_app` runs as root, which breaks shm-based discovery. eProsima/Fast-DDS#1750
`rtapi_app` runs as root, which breaks shm-based discovery. eProsima/Fast-DDS#1750
`rtapi_app` runs as root, which breaks shm-based discovery. eProsima/Fast-DDS#1750
`rtapi_app` runs as root, which breaks shm-based discovery. eProsima/Fast-DDS#1750
@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 |
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. |
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. |
@EduPonz I also started the ros2 daemon as sudo. Still could not see nodes and topics started as sudo through the discovery server |
Hi @tiany44 , When you say you cannot see the topics/nodes, do you mean using |
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 |
@MiguelCompany any chance we can have your fixes in the next release? |
@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 |
Both of my clients use the same super client configuration. Without sudo, |
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. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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.
The text was updated successfully, but these errors were encountered: