Skip to content

Commit 8e9a8da

Browse files
Feature: Fast DDS ROS2_EASY_MODE (#1020)
* Refs #22627: Update CLI docs Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: Update ports parameters Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: Update env. vars. Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: Update dependencies Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: Mention mesh topology Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: Clarify domain with EASY_MODE Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: Review & Line length Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: Review - NIT Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: Review - CLI improvement & minor fixes Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: ROS2_EASY_MODE Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #22627: Revision - Change Link Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com> Signed-off-by: Carlos Ferreira González <carloos.499@gmail.com> --------- Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> Signed-off-by: Carlos Ferreira González <carloos.499@gmail.com> Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
1 parent f0cc847 commit 8e9a8da

File tree

7 files changed

+252
-82
lines changed

7 files changed

+252
-82
lines changed

.github/workflows/reusable-ubuntu-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
- name: Install Python dependencies
113113
uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
114114
with:
115-
packages: vcstool xmlschema
115+
packages: vcstool xmlschema psutil
116116
upgrade: false
117117

118118
- name: Install Fast DDS Docs required python packages

docs/03-exports/aliases-api.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@
737737
.. |PortParameters::offsetd1-qos-api| replace:: :cpp:member:`wire_protocol().port.offsetd1<eprosima::fastdds::rtps::PortParameters::offsetd1>`
738738
.. |PortParameters::offsetd2-qos-api| replace:: :cpp:member:`wire_protocol().port.offsetd2<eprosima::fastdds::rtps::PortParameters::offsetd2>`
739739
.. |PortParameters::offsetd3-qos-api| replace:: :cpp:member:`wire_protocol().port.offsetd3<eprosima::fastdds::rtps::PortParameters::offsetd3>`
740+
.. |PortParameters::offsetd4-qos-api| replace:: :cpp:member:`wire_protocol().port.offsetd4<eprosima::fastdds::rtps::PortParameters::offsetd4>`
740741

741742
.. |WriterResourceLimitsQos-api| replace:: :cpp:class:`WriterResourceLimitsQos<eprosima::fastdds::dds::WriterResourceLimitsQos>`
742743
.. |WriterResourceLimitsQos::matched_subscriber_allocation-api| replace:: :cpp:member:`matched_subscriber_allocation<eprosima::fastdds::dds::WriterResourceLimitsQos::matched_subscriber_allocation>`

docs/fastdds/discovery/discovery_server.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ ease Discovery Server setup and testing.
1616

1717
.. note::
1818

19-
:ref:`DDS Domain <dds_layer_domain>` concept does not apply when enabling the Discovery Server mechanism.
19+
:ref:`DDS Domain <dds_layer_domain>` concept does not apply when enabling the default Discovery Server mechanism,
20+
but it applies when using :ref:`ROS2_EASY_MODE<env_vars_easy_mode>`.
2021

2122
.. contents::
2223
:local:
@@ -50,6 +51,7 @@ In this architecture there are several key concepts to understand:
5051
* A *server* also announces the existence of a new *server* to its known *servers*, and vice versa.
5152
In this way, a new server can connect to every other existing *server* in the network by just knowing the
5253
existence of one of them.
54+
In this way, a mesh topology between servers is created with minimal configuration.
5355
* The discovery information that is redistributed might come from a **direct** *client* connected to the |SERVER|,
5456
or from another *server* that is redirecting the discovery data from **its** *clients*.
5557
* Known *servers* will receive all the information from the **direct** *clients* known by the *server* and the

docs/fastdds/env_vars/env_vars.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,44 @@ The following example shows how to set the address of two remote discovery serve
252252
(that has been initialized with this environment variable previously) if loaded from an environment file using
253253
:ref:`env_vars_fastdds_environment_file`.
254254

255+
.. _env_vars_easy_mode:
256+
257+
``ROS2_EASY_MODE``
258+
------------------
259+
260+
Setting ``ROS2_EASY_MODE`` to an IP value allows a participant to automatically enter the
261+
`Discovery Server Easy Mode <https://docs.vulcanexus.org/en/latest/rst/enhancements/easy_mode/easy_mode.html>`__.
262+
This mode completely disables **multicast communication**, and relies on Discovery Servers for discovery purposes.
263+
264+
With ``ROS2_EASY_MODE`` a new Discovery Server will be automatically spawned locally in the given
265+
:ref:`domain<dds_layer_domain>`, pointing to another Discovery Server located in the specified IP.
266+
If the specified IP belongs to the same host, it will only work in localhost, until another host connects to it.
267+
If there exists a Discovery Server for that domain, the spawn process will be skipped, relying on the existing server
268+
for discovery purposes.
269+
Therefore, only one Discovery Server per host will be present in the domain.
270+
271+
In order for this variable to take effect, the participant must have its
272+
:ref:`discovery protocol<discovery_protocol>` set to |SIMPLE| (default), to automatically enter the
273+
`Discovery Server Easy Mode <https://docs.vulcanexus.org/en/latest/rst/enhancements/easy_mode/easy_mode.html>`__.
274+
If this happens, the participant will be configured as a |SUPER_CLIENT| pointing to the local server.
275+
276+
The following example will configure participants as |SUPER_CLIENT| pointing to a local Discovery Server,
277+
which will try to connect to another Discovery Server located in the host ``10.0.0.1``.
278+
279+
.. code-block:: bash
280+
281+
export ROS2_EASY_MODE=10.0.0.1
282+
283+
The port of the Discovery Server is calculated using the rules explained in the :ref:`listening_locators_defaultPorts`.
284+
The transports configured in this new mode include :ref:`UDP<transport_udp_udp>` unicast for discovery and
285+
:ref:`TCP<transport_tcp_tcp>` and :ref:`Shared Memory<transport_sharedMemory_sharedMemory>` for user data.
286+
287+
A detailed tutorial can be found in the
288+
`Vucanexus Easy Mode Tutorial <https://docs.vulcanexus.org/en/latest/rst/tutorials/core/wifi/easy_mode/easy_mode.html>`__ documentation.
289+
290+
.. warning::
291+
Discovery Server ``ROS2_EASY_MODE`` is not yet available for Windows platforms.
292+
255293
.. _env_vars_ros_super_client:
256294

257295
``ROS_SUPER_CLIENT``

docs/fastdds/transport/listening_locators.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ Well-known ports are calculated using the following predefined rules:
210210
- ``PB`` + ``DG`` * *domainId* + ``offsetd2``
211211
* - User unicast
212212
- ``PB`` + ``DG`` * *domainId* + ``offsetd3`` + ``PG`` * *participantId*
213+
* - Discovery Server (Easy Mode)
214+
- ``PB`` + ``DG`` * *domainId* + ``offsetd4``
213215

214216

215217
The values used in these rules are explained on the following table.
@@ -262,3 +264,7 @@ The default values can be modified using the |WireProtocolConfigQos::port-api| m
262264
- Additional offset
263265
- 11
264266
- |PortParameters::offsetd3-qos-api|
267+
* - ``offsetd4``
268+
- Additional offset
269+
- 2
270+
- |PortParameters::offsetd4-qos-api|

0 commit comments

Comments
 (0)