I am trying to implement a publish and subscribe hello world program for communication between 2 devices using eclipse cyclone DDS protocol, I am able to do it when devices are connected in the same network but when devices are in a different network there is no communication happening. As per my understanding, it's because of the default DDS domain but how do I change it? I followed https://github.com/eclipse-cyclonedds/cyclonedds Here there's a mention to make use of an XML file, but I am not understanding how to use it or where to use the file. Any suggestion would be of much help, thank you!
Can DDS protocol be used to communicate between devices connected to different networks?How?
1.9k Views Asked by phoenix At
1
There are 1 best solutions below
Related Questions in DATA-DISTRIBUTION-SERVICE
- PCIe integration with ePRosima FastDDS layer of ROS2 humble as custom transport
- FastDDS Publisher and Subscriber won't match in demo code
- CMake Eorror When Building Simulink DDS Blockset Example Model shapesdemo
- FastDDS server only for certain topics
- Is there any way to temporarily stop fastDDS from sending or receiving topic messages?
- Changed ROS2 environment variable FASTDDS_BUILTIN_TRANSPORTS to LARGE_DATA but now the topic is not listed in ROS2 topic list
- How to generate FastDDS message files from a .idl file that imports structs from others .idl files
- Error while arming cube orange plus using ros2 which runs on a companion computer?
- Why Wireshark is not displaying RTPS sub-messages in the 'Info' column?
- Interfacing ROS2 with Ethenet/IP
- How to deserialize multiple "XCDR_AUTO" format .dat files in one folder?
- In a Qt signal-slot programm,The slot function was not executed after sent
- Configure dds in config file to work with 2 network interfaces
- what is exactly a discovered publisher in FastDDS?
- How to filter nested union in rti dds
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Cyclone DDS looks at the value of the
CYCLONEDDS_URIenvironment variable to find its configuration file. What you can do is make an XML file somewhere on your computer and put its path in that environment variable. E.g., on Linux:or on Windows (“cmd”, I don’t know how to do it in powershell):
Windows is a bit tricky with the quotes, this seems to work fine. Then, when you start your application, Cyclone DDS will read that file and apply the settings in it. Of course you also need to know what to put in it.
For that, it is useful to know a few things about the networks you are using. In one network, it all works without any configuration because the UDP/IP multicast works semi-magically in a single network. If there are multiple networks, there is a router in between and those routers are often configured not to route multicast traffic.
That means you basically have two options:
For (2), something like:
should work (obviously with the ip-of-node-1 &c. replaced with the correct addresses/hostnames). Setting “AllowMulticast” to false simply disables all use of multicast. If multicast doesn’t work reliably with all nodes, assuming it works can give a broken system. So at this stage, it is definitely easier to just not use it.
The “ParticipantIndex” has to do with the UDP port numbers it uses. With multicast, multiple processes on a single machine can all use the same UDP port number for receiving the discovery packets, and so there is this agreed-upon port number for discovery that makes everything work without any configuration (port number 7400 for domain id 0). That in turn allows it to use random port numbers for receiving unicast traffic.
With unicast, however, each process needs to have its own unique port number, and that in turn means the other processes need to know to which port numbers to send the data to. Setting the “ParticipantIndex” to auto forces it use predictable port numbers so that the processes can find each other.