Skip to content

Commit

Permalink
Refs #20108: Fix identation and apply tabs in synced remain sections
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso committed Dec 12, 2023
1 parent d84c044 commit ebbb12e
Showing 1 changed file with 119 additions and 37 deletions.
156 changes: 119 additions & 37 deletions source/Tutorials/Advanced/Discovery-Server/Discovery-Server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ In a new terminal, set the environment variable ``ROS_DISCOVERY_SERVER`` to the
export ROS_DISCOVERY_SERVER=127.0.0.1:11811
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand Down Expand Up @@ -139,7 +139,7 @@ Open a new terminal and set the ``ROS_DISCOVERY_SERVER`` environment variable as
export ROS_DISCOVERY_SERVER=127.0.0.1:11811
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand Down Expand Up @@ -218,7 +218,7 @@ In several terminals, run the following code to establish a communication with r
export ROS_DISCOVERY_SERVER="127.0.0.1:11811;127.0.0.1:11888"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand All @@ -234,7 +234,7 @@ In several terminals, run the following code to establish a communication with r
export ROS_DISCOVERY_SERVER="127.0.0.1:11811;127.0.0.1:11888"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand Down Expand Up @@ -268,7 +268,7 @@ In different terminals, run the following code to establish a communication with
export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand All @@ -284,7 +284,7 @@ In different terminals, run the following code to establish a communication with
export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand Down Expand Up @@ -333,7 +333,7 @@ Now, run each node in a different terminal. Use ``ROS_DISCOVERY_SERVER`` environ
export ROS_DISCOVERY_SERVER="127.0.0.1:11811;127.0.0.1:11888"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker_1
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand All @@ -349,7 +349,7 @@ Now, run each node in a different terminal. Use ``ROS_DISCOVERY_SERVER`` environ
export ROS_DISCOVERY_SERVER="127.0.0.1:11811;127.0.0.1:11888"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener_1
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand All @@ -365,7 +365,7 @@ Now, run each node in a different terminal. Use ``ROS_DISCOVERY_SERVER`` environ
export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker_2
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand All @@ -381,7 +381,7 @@ Now, run each node in a different terminal. Use ``ROS_DISCOVERY_SERVER`` environ
export ROS_DISCOVERY_SERVER=";127.0.0.1:11888"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener_2
.. group-tab:: Windows
.. group-tab:: Windows

.. code-block:: console
Expand Down Expand Up @@ -476,34 +476,83 @@ First of all, instantiate a Discovery Server using `Fast DDS CLI <https://fast-d
Run a talker and a listener that will discover each other through the Server (notice that ``ROS_DISCOVERY_SERVER`` configuration is the same as the one in ``super_client_configuration_file.xml``).

.. code-block:: console
.. tabs::

.. group-tab:: Linux

export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener
.. code-block:: console
.. code-block:: console
export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener
.. group-tab:: Windows

.. code-block:: console
export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker
set ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener
.. tabs::

.. group-tab:: Linux

.. code-block:: console
export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker
.. group-tab:: Windows

.. code-block:: console
set ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker
Then, instantiate a ROS 2 Daemon using the **Super Client** configuration (remember to source ROS 2 installation in every new terminal).

.. code-block:: console
.. tabs::

export FASTRTPS_DEFAULT_PROFILES_FILE=super_client_configuration_file.xml
ros2 daemon stop
ros2 daemon start
ros2 topic list
ros2 node info /talker
ros2 topic info /chatter
ros2 topic echo /chatter
.. group-tab:: Linux

.. code-block:: console
export FASTRTPS_DEFAULT_PROFILES_FILE=super_client_configuration_file.xml
ros2 daemon stop
ros2 daemon start
ros2 topic list
ros2 node info /talker
ros2 topic info /chatter
ros2 topic echo /chatter
.. group-tab:: Windows

.. code-block:: console
set FASTRTPS_DEFAULT_PROFILES_FILE=super_client_configuration_file.xml
ros2 daemon stop
ros2 daemon start
ros2 topic list
ros2 node info /talker
ros2 topic info /chatter
ros2 topic echo /chatter
We can also see the Node's Graph using the ROS 2 tool ``rqt_graph`` as follows (you may need to press the refresh button):

.. code-block:: console
.. tabs::

export FASTRTPS_DEFAULT_PROFILES_FILE=super_client_configuration_file.xml
rqt_graph
.. group-tab:: Linux

.. code-block:: console
export FASTRTPS_DEFAULT_PROFILES_FILE=super_client_configuration_file.xml
rqt_graph
.. group-tab:: Windows

.. code-block:: console
set FASTRTPS_DEFAULT_PROFILES_FILE=super_client_configuration_file.xml
rqt_graph
No Daemon tools
Expand All @@ -521,26 +570,59 @@ First, run a **Server**:
Then, run the talker and listener in separate terminals:

.. code-block:: console
.. tabs::

export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener
.. group-tab:: Linux

.. code-block:: console
.. code-block:: console
export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener
.. group-tab:: Windows

.. code-block:: console
set ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener
.. tabs::

export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker
.. group-tab:: Linux

.. code-block:: console
export ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker
.. group-tab:: Windows

.. code-block:: console
set ROS_DISCOVERY_SERVER="127.0.0.1:11811"
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker
Continue using the ROS 2 CLI with ``--no-daemon`` option with the new configuration.
New nodes will connect with the existing Server and will know every topic.
Exporting ``ROS_DISCOVERY_SERVER`` is not needed as the ROS 2 tools will be configured through the ``FASTRTPS_DEFAULT_PROFILES_FILE``.

.. code-block:: console
.. tabs::

.. group-tab:: Linux

export FASTRTPS_DEFAULT_PROFILES_FILE=super_client_configuration_file.xml
ros2 topic list --no-daemon
ros2 node info /talker --no-daemon --spin-time 2
.. code-block:: console
export FASTRTPS_DEFAULT_PROFILES_FILE=super_client_configuration_file.xml
ros2 topic list --no-daemon
ros2 node info /talker --no-daemon --spin-time 2
.. group-tab:: Windows

.. code-block:: console
set FASTRTPS_DEFAULT_PROFILES_FILE=super_client_configuration_file.xml
ros2 topic list --no-daemon
ros2 node info /talker --no-daemon --spin-time 2
Compare Fast DDS Discovery Server with Simple Discovery Protocol
----------------------------------------------------------------
Expand Down

0 comments on commit ebbb12e

Please sign in to comment.