Unconfigured DDS considered harmful to Networks

Hi @Marq_Razz ,

This is the Fast-DDS configuration that I’m currently using with ROS 2 Galactic and Fast-DDS 2.3.3.
It’s made of two slightly different XMLs, one for the robot and one for the laptop.

The advantage of this approach is that the robot can be configured in an extremely generic way, because it does not need to know in advance the IP address of the remote machines it will interact with.
On the other hand on the laptop, where it’s usually easier to interact/change configurations and it is expected that you always know the IP address of the robot you want to communicate with, the IP address is specified.

Robot XML

<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
    <participant profile_name="disable_multicast" is_default_profile="true">
        <rtps>
            <builtin>
                <metatrafficUnicastLocatorList>
                    <locator/>
                </metatrafficUnicastLocatorList>
                <initialPeersList>
                    <locator>
                        <udpv4>
                            <address>127.0.0.1</address>
                        </udpv4>
                    </locator>
                </initialPeersList>
            </builtin>
        </rtps>
    </participant>
</profiles>

Laptop XML (NOTE: $ROBOT_IP must be manually replaced, it’s not an env variable Add support for XML environmental variables parsing [10697] by mauropasse · Pull Request #1517 · eProsima/Fast-DDS · GitHub)

<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
    <participant profile_name="unicast_connection" is_default_profile="true">
        <rtps>
            <builtin>
                <metatrafficUnicastLocatorList>
                    <locator/>
                </metatrafficUnicastLocatorList>
                <initialPeersList>
                    <locator>
                        <udpv4>
                            <address>$ROBOT_IP</address>
                        </udpv4>
                    </locator>
                </initialPeersList>
            </builtin>
        </rtps>
    </participant>
</profiles>

I don’t have the CycloneDDS profile at hand, but it’s relatively similar in the scope.

@wjwwood what about bringing this topic to the Middleware WG next week?

2 Likes