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

Refs #22575: Update the monitor tutorial #234

Merged
merged 8 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
62 changes: 41 additions & 21 deletions docs/rst/tutorials/tools/fastdds_monitor/fastdds_monitor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ ROS 2 network statistics inspection with ROS 2 Monitor
Background
----------

Vulcanexus integrates `ROS 2 Monitor <https://fast-dds-monitor.readthedocs.io/en/latest/>`_, which is a useful tool for monitoring and studying a ROS 2 network as ROS 2 relies on the `DDS specification <https://www.omg.org/spec/DDS/1.4/About-DDS/>`_ to communicate the different nodes.
The automatic discovery of entities in a local network enables to easily identify the different running Participants, their Endpoints, the Topics that each of them is using, and even the network interfaces they are employing to communicate with one another.
Additionally, it is possible to receive statistical data from every endpoint in the network leveraging the `ROS 2 Statistics Module <https://fast-dds.docs.eprosima.com/en/latest/fastdds/statistics/statistics.html>`_.
This data is very useful to analyze the DDS network performance and seek possible communication problems in it.
Vulcanexus integrates the `ROS 2 Monitor <https://fast-dds-monitor.readthedocs.io/en/latest/>`_, a powerful tool for monitoring and studying ROS 2 networks. Since ROS 2 relies on the `DDS specification <https://www.omg.org/spec/DDS/1.4/About-DDS/>`_ for communication between nodes, this tool simplifies the process of observing network activity.
With automatic entity discovery within a local network, users can easily identify active Participants, their Endpoints, the Topics they utilize, and even the network interfaces used for communication.
Moreover, the `ROS 2 Statistics Module <https://fast-dds.docs.eprosima.com/en/latest/fastdds/statistics/statistics.html>`_ enables the collection of statistical data from every endpoint in the network. This data is very useful for analyzing the DDS network performance and diagnosing possible communication issues.

This tutorial provides step-by-step instructions to use Vulcanexus for monitoring a ROS 2 talker/listener demo.

Expand All @@ -29,7 +28,7 @@ Also, remember to source the environment in every terminal in this tutorial.
source /opt/vulcanexus/jazzy/setup.bash

Launch ROS 2 Monitor
-----------------------
--------------------

Initiate *ROS 2 Monitor* running the following command:

Expand All @@ -39,7 +38,7 @@ Initiate *ROS 2 Monitor* running the following command:

Once *ROS 2 Monitor* is launched, start a monitor in domain :code:`0` (default domain).

.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/init_domain.png
.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/Init_domain.png
:align: center

Execute ROS 2 demo nodes with statistics
Expand Down Expand Up @@ -74,34 +73,55 @@ Monitoring network

Now, the two new Participants are visible in the *ROS 2 Monitor*'s DDS Panel.

.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/participants.png
.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/Participants.png
:align: center

Alias
^^^^^
Domain View
^^^^^^^^^^^

Participants in ROS 2 are named :code:`/` by default.
In order to differentiate them, it is possible to change the Participant's aliases within the *ROS 2 Monitor*.
In this case, the :code:`vulcanexus-jazzy-talker` Participant would be the one with a writer, and the :code:`vulcanexus-jazzy-listener` Participant would be the one with a reader.
To easily inspect the structure of the DDS network created, open the *Domain View* in the Main Panel.
In this tab, we can see a graph describing the structure of our network: our single Host contains our single User,
which in turn contains both our Processes, each containing a number of DataReaders and DataWriters. We can see a
number of Topics, presented as vertical gray lines, related to the code of the listener and talker. Only one of them,
:code:`rt/chatter`, relates two entities, a DataWriter and a DataReader: this is the Topic that is being
used to exchange information.

.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/Domain_Graph.png
:align: center

The *Domain View* allows us to access different possibilities. By pressing *right-click* on top of the Topic name, we can
find several options, such as filtering the graph by the Topic (selecting *Filter topic graph*). Clicking on the
:code:`rt/chatter` Topic, we can easily see the entities exchanging information.

.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/alias.png
.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/Topic_filter.png
:align: center

Physical data
^^^^^^^^^^^^^
Additionally, we can access the we can access the IDL representation of any of the Topics, by pressing right-click over
the Topic name, and choosing *Data type IDL view*. This opens a new Tab with the required information, which can be
copied and pasted.

In order to see the information of the host and the physical context where every node is running, go to the Explorer Pane and activate the Physical Panel.
There, the host, user and process of each node are displayed.
.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/IDL_img_jazzy.png
:align: center

Alias
^^^^^

Participants in ROS 2 are named :code:`/` by default.
In order to differentiate them, it is possible to change the Participant's aliases within the *ROS 2 Monitor*. This can
be done either from the Explorer Panel, or from the Domain View panel, by pressing *righ click* on top of the
entity. The :code:`talker` would be the one with a :code:`chatter` DataWriter, and the :code:`listener` the one with a
:code:`chatter` DataReader. Since we're not going to be using this Tab anymore, click on the *X* to return to the
:code:`New Tab` view.

.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/physical.png
.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/Alias_new.png
:align: center

Statistical data
^^^^^^^^^^^^^^^^

To show statistical data about the communication between the :code:`vulcanexus-jazzy-talker` and the :code:`vulcanexus-jazzy-listener`, follow the steps to `create dynamic series chart <https://fast-dds-monitor.readthedocs.io/en/latest/rst/getting_started/tutorial.html#tutorial-create-dynamic-series>`_.
To show statistical data about the communication between the :code:`talker` and the :code:`listener`, follow the steps to `create dynamic series chart <https://fast-dds-monitor.readthedocs.io/en/latest/rst/getting_started/tutorial.html#tutorial-create-dynamic-series>`_.

.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/statistics.png
.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/Statistics.png
:align: center

Introspect metatraffic topics
Expand All @@ -113,5 +133,5 @@ These topics are the ones that ROS 2 uses for discovery and configuration purpos
In order to see these topics in the monitor, click *View->Show Metatraffic* menu button.
Now, these topics are shown in the logical panel. Furthermore, the Readers and Writers associated to them are now listed under their respective Participants.

.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/metatraffic.png
.. figure:: /rst/figures/tutorials/tools/monitor_screenshots/Metatraffic.png
:align: center