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

Adding ROS 2 introspection as SUPER_CLIENT #380

Open
royito55 opened this issue Jun 6, 2023 · 1 comment
Open

Adding ROS 2 introspection as SUPER_CLIENT #380

royito55 opened this issue Jun 6, 2023 · 1 comment

Comments

@royito55
Copy link

royito55 commented Jun 6, 2023

Hi,

I have managed to connect two robots running a discovery server each by running a DDS router from a 3rd PC. Here is the config YAML:

version: v3.0

participants:

  - name: ROS_2_Domain_0
    kind: simple
    domain: 0

  - name: ROS_2_DS_Client_1
    kind: discovery-server

    discovery-server-guid:
      ros-discovery-server: true
      id: 1

    connection-addresses:
      - discovery-server-guid:
          ros-discovery-server: true
          id: 0
        addresses:
          - domain: 192.168.1.72
            port: 11811

  - name: ROS_2_DS_Client_2
    kind: discovery-server

    discovery-server-guid:
      ros-discovery-server: true
      id: 2

    connection-addresses:
      - discovery-server-guid:
          ros-discovery-server: true
          id: 0
        addresses:
          - domain: 192.168.1.190
            port: 11811

However, I also want to be able to see all of the topics offered by both robots from the 3rd PC, so is there like a super client configuration I can add to it so it can discover all of them? I tried with the default super client XML, but I realize there is no discovery server (DDS router instead) running in this 3rd PC so it makes sense that it doesn't work:

<?xml version="1.0" encoding="UTF-8" ?>
<dds>
    <profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
        <participant profile_name="super_client_profile" is_default_profile="true">
            <rtps>
                <builtin>
                    <discovery_config>
                        <discoveryProtocol>SUPER_CLIENT</discoveryProtocol>
                        <discoveryServersList>
                            <RemoteServer prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41">
                                <metatrafficUnicastLocatorList>
                                    <locator>
                                        <udpv4>
                                            <address>127.0.0.1</address>
                                            <port>11811</port>
                                        </udpv4>
                                    </locator>
                                </metatrafficUnicastLocatorList>
                            </RemoteServer>
                        </discoveryServersList>
                    </discovery_config>
                </builtin>
            </rtps>
        </participant>
    </profiles>
</dds>

I noticed that if I echo a topic in either of the robots, it automatically appears on the 3rd PC. Which is great, but I'd like to see them all from the first time I list the topics.

Here's a diagram to illustrate:

Screenshot from 2023-06-06 09-42-05

@jparisu
Copy link
Contributor

jparisu commented Jun 6, 2023

Hi @royito55

Your configuration file seems fine to your scenario.
What you are experiencing here is a performance feature in DDS Router that makes the router to no create endpoints until there is a DataReader (ROS2 subscription) in the network. This reduces the amount of DDS Entities that are created in the DDS Router application and the traffic it routes, and thus improves the efficiency.

Nevertheless, we have lately seen the necessity to add a configuration feature that allows to disable such feature.
Once this feature is implemented and uploaded we will notify you.

Extra comment

There is no need to use XML configuration in your fastdds discovery application, as it is already a Server, so setting it as SuperClient will have no effect.
Also, XML configuration has no effect in DDS Router (yet, we are working on a new Participant kind).

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

No branches or pull requests

2 participants