Disable multicast and Enable unicast for cyclone dds

asked 2023-02-16 07:25:55 -0500

RahulMN gravatar image

updated 2023-02-16 07:28:40 -0500

Hi Everyone,

For security reasons, I want to disable the multi-cast on my cyclone DDS and enable uni-cast to setup communication with ROS2. I have used the below information on my xml file where I have disabled multicast and set my laptop's IP as the peer address to communicate over that network.

    <CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
<Domain Id="any">
    <General>
        <Interfaces>
            <NetworkInterface autodetermine="true" priority="default" multicast="false" />
        </Interfaces>
        <AllowMulticast>false</AllowMulticast>
        <MaxMessageSize>65500B</MaxMessageSize>
    </General>
    <Discovery>
        <Peers>
            <Peer Address="192.168.0.111" />
        </Peers>
    </Discovery>
    <Internal>
        <Watermarks>
            <WhcHigh>500kB</WhcHigh>
        </Watermarks>
    </Internal>
    <Tracing>
        <Verbosity>finest</Verbosity>
        <OutputFile>cdds.log.${CYCLONEDDS_PID}</OutputFile>
    </Tracing>
</Domain>

</cyclonedds>

Now, with this configuration file, I ran the demo_nodes_cpp talker and listener on different terminals with CYCLONEDDS_URI variable being the path of the above xml file, even with that my listener node was not able to subscribe the talker node.

I'm I missing something on my configuration setup?

My system specs: Ubuntu 22.04 with ROS2 Humble.

edit retag flag offensive close merge delete