-
Notifications
You must be signed in to change notification settings - Fork 117
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
Can't use shared memory transport with initialPeersList or discovery server. #676
Comments
Hi @sergmister, The problem is that you're removing the builtin transports (one UDP and one SHM) and only adding an SHM transport while at the same time wanting to use a UDP transport. What you want to achieve is the default behaviour actually, since by default participants have both an SHM and a UDP transport, and they will use SHM with remote entities that are on the same machine. I'd say the more flexible option is to use Discovery Server. Let's say you have:
You could deploy a discovery server in for instance Machine A, and have all the nodes connecting to it as clients
If you then want to use the ROS 2 CLI (
|
I believe I was not clear enough, I can get communication working between nodes with a discovery server, but only over UDP. I need to use custom transports to reduce the the maxMessageSize of the UDP transport to 1400 otherwise large messages like images will be dropped, see here. Thus, I was testing the following profile with the discovery server on the same machine:
Communication works (both nodes on the same docker container), but through my tests (just a publisher and subscriber sending large arrays), this has 20x lower max bandwidth than with just shared memory without the discovery server, clearly showing that communication is going via UDP instead of shared memory as the docs say should happen. Removing the UDP transport, no communication or discovery works (If shared memory transport works this seems like it should work). My question remains, how to use shared memory transport with the discovery server or initialPeersList? |
Hi @sergmister , Would it be possible for you to provide a reproducer? Just a docker file or compose and the instructions you use to run it would be enough. |
Steps to reproduce: Put a file in current directory named
In each terminal you open, make sure to run: Start the container by running: Start the discover server with: Run docker exec to open another terminal and first reload the ROS daemon: In another terminal run: Now, comment out the |
Hi @sergmister |
Bug report
I am trying to setup FastDDS to use shared memory transport for communication within a computer and UDP transport between computers, which should be possible according to the docs here. However, due to limitations with multicast traffic in my network, I either need to configure an initialPeersList or a discovery server to allow nodes across machines to discover each other. However, with either of these two enabled, shared memory transport does not work.
Required Info:
osrf/ros2:nightly-rmw-nonfree
Docker image.Steps to reproduce issue
fastdds-profile.xml
One terminal:
ros2 topic pub -r 5 /test std_msgs/String "{data: hi}"
Another terminal:
ros2 topic echo /test
With the above profile, the nodes will not be able to communicate (tested on ROS Humble and Rolling), but commenting out everything under
<builtin>
will make things work as expected.The text was updated successfully, but these errors were encountered: