Skip to content
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

Unable to have a successful test with the "Connecting Nodes over an External Network" example #148

Closed
TSC21 opened this issue Aug 14, 2023 · 3 comments · Fixed by #149
Closed

Comments

@TSC21
Copy link

TSC21 commented Aug 14, 2023

Hi all,

First of all thanks for the great work done with this package and with the documentation provided!

Unfortunately though, following https://docs.vulcanexus.org/en/humble/rst/tutorials/core/deployment/external_locators/external_locators.html, I am unable to get the same results as the ones shown on the example there.

I have two laptops, where one would be host 1 and the other the host 2 as per the setup on the example as well. They can see each other, and I can ping both laptops from inside of each container in each laptop. Though, I cannot get the host 2 container 1 to listen to the talker on host 1 container 1. Even if I run the listener directly on host 2, I cannot listed to the talker on host 1 container 1. If I run the listener in host 1 container 2 or the host 1 itself it can listen to the talker on host 1 container 1. if I start the talker on the host 1 (outside of the container), and I start the listener on host 2 (outside of the container), the listener on host 2 can listen to the talker on host 1, so the LAN network is well setup and the two hosts can "see" each other.

The IP address on the host 1 in the WiFi LAN is 192.168.1.248 and this is its Profiles.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<dds>
    <profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
        <participant profile_name="container0" is_default_profile="true">
            <rtps>
                <!-- External locators for user traffic -->
                <default_external_unicast_locators>
                    <udpv4 externality="1" cost="0" mask="24">
                        <!-- Host 1 external IP -->
                        <address>192.168.1.248</address>
                        <port>11201</port>
                    </udpv4>
                </default_external_unicast_locators>
                <builtin>
                    <!-- External locators for discovery traffic -->
                    <metatraffic_external_unicast_locators>
                        <udpv4 externality="1" cost="0" mask="24">
                            <!-- Host 1 external IP -->
                            <address>192.168.1.248</address>
                            <port>11200</port>
                        </udpv4>
                    </metatraffic_external_unicast_locators>
                    <!-- Locators of remote participants (discovery traffic)-->
                    <initialPeersList>
                        <!-- Container 2 peer-->
                        <locator>
                            <udpv4>
                                <!-- Host 2 external IP -->
                                <address>192.168.1.234</address>
                                <port>11200</port>
                            </udpv4>
                        </locator>
                        <!--
                            Local network DDS default multicast to discover
                            other participants in the same LAN,
                            using External Locators, or not
                        -->
                        <locator>
                            <udpv4>
                                <address>239.255.0.1</address>
                                <port>7400</port>
                            </udpv4>
                        </locator>
                    </initialPeersList>
                </builtin>
            </rtps>
        </participant>
    </profiles>
</dds>

The IP address of host 2 in the WiFi LAN is 192.168.1.234, and this is its Profiles.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<dds>
    <profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
        <participant profile_name="container0" is_default_profile="true">
            <rtps>
                <!-- External locators for user traffic -->
                <default_external_unicast_locators>
                    <udpv4 externality="1" cost="0" mask="24">
                        <!-- Host 1 external IP -->
                        <address>192.168.1.234</address>
                        <port>11201</port>
                    </udpv4>
                </default_external_unicast_locators>
                <builtin>
                    <!-- External locators for discovery traffic -->
                    <metatraffic_external_unicast_locators>
                        <udpv4 externality="1" cost="0" mask="24">
                            <!-- Host 1 external IP -->
                            <address>192.168.1.234</address>
                            <port>11200</port>
                        </udpv4>
                    </metatraffic_external_unicast_locators>
                    <!-- Locators of remote participants (discovery traffic)-->
                    <initialPeersList>
                        <!-- Container 2 peer-->
                        <locator>
                            <udpv4>
                                <!-- Host 2 external IP -->
                                <address>192.168.1.248</address>
                                <port>11200</port>
                            </udpv4>
                        </locator>
                        <!--
                            Local network DDS default multicast to discover
                            other participants in the same LAN,
                            using External Locators, or not
                        -->
                        <locator>
                            <udpv4>
                                <address>239.255.0.1</address>
                                <port>7400</port>
                            </udpv4>
                        </locator>
                    </initialPeersList>
                </builtin>
            </rtps>
        </participant>
    </profiles>
</dds>

Another note is that I have Vulcanexus also installed on both hosts, where one host is running Ubuntu 20.04 with Galactic and the other Ubuntu 22.04 with Humble. And I have, in both, this in .bashrc:

source /opt/ros/<ros_version>/setup.bash
source /opt/vulcanexus/<ros_version>/setup.bash

where <ros_version> is the name of the release. The above source /opt/ros/<ros_version>/setup.bash is probably redundant, but I kept it anyway. I don't think the fact that I have it installed on both machines makes any difference considering I am trying to use the containers.

Any pointers on why I cannot successfully get the nodes to talk to each other? I assume it's something that might be missing or misconfigured on the profile configuration, but I am not sure.

@rsanchez15 @Mario-DL tagging you for visibility.

Thanks in advance for your help!

@Mario-DL
Copy link
Member

Hi @TSC21,

Thanks for the detailed report. I had a look at the configuration file and it looks nice to me.

The problem seems to be that the minimum internal participant ID changed from 1 to 0 between galactic and humble, affecting the discovery.

Please, try it again launching the humble vulcanexus docker with the port mapping 11200-11201:7410-7411/udp instead. If that solves the issue, I will update it in the tutorial.

@TSC21
Copy link
Author

TSC21 commented Aug 16, 2023

@Mario-DL yes that seems to make it work. Thanks for the quick response!

@TSC21 TSC21 closed this as completed Aug 16, 2023
@EduPonz
Copy link

EduPonz commented Aug 17, 2023

For completion, this was changed in eProsima/Fast-DDS#3437, which was first made available in Fast DDS v2.11.0.

@Mario-DL Mario-DL linked a pull request Aug 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants