1.1. Monitor Tutorial with ROS 2 Jazzy¶
This section shows how to install and deploy some ROS 2 Jazzy nodes in order to monitor them with Fast DDS Monitor.
1.1.1. Installation¶
First of all, follow the Fast DDS Monitor on Linux or the Fast DDS Monitor on Windows on this documentation to install Fast DDS Monitor. Additionally, make sure to also have a ROS 2 Jazzy installation available.
1.1.2. Execution¶
We are going to recreate a simple DDS network with one talker
and one listener
from ROS 2 demo nodes.
1.1.2.1. Execute Fast DDS Monitor¶
Initiate Fast DDS Monitor by running the executable file created in the installation process.
Once Fast DDS Monitor is launched, start a monitor in domain 0
(default domain).

1.1.2.2. Execute ROS 2 demo nodes with statistics¶
To execute ROS 2 nodes with statistics two aspects of the configuration must be taken into account:
The middleware used must be Fast DDS, the default choice (can also be set through an environment variable).
In order to activate the publication of statistical data, Fast DDS requires an environment variable specifying the specific kinds of statistical data to be reported.
To execute each of the nodes, run the following commands in different terminals:
export FASTDDS_STATISTICS="HISTORY_LATENCY_TOPIC;NETWORK_LATENCY_TOPIC;\
PUBLICATION_THROUGHPUT_TOPIC;SUBSCRIPTION_THROUGHPUT_TOPIC;RTPS_SENT_TOPIC;\
RTPS_LOST_TOPIC;HEARTBEAT_COUNT_TOPIC;ACKNACK_COUNT_TOPIC;NACKFRAG_COUNT_TOPIC;\
GAP_COUNT_TOPIC;DATA_COUNT_TOPIC;RESENT_DATAS_TOPIC;SAMPLE_DATAS_TOPIC;\
PDP_PACKETS_TOPIC;EDP_PACKETS_TOPIC;DISCOVERY_TOPIC;PHYSICAL_DATA_TOPIC;\
MONITOR_SERVICE_TOPIC"
ros2 run demo_nodes_cpp listener
export FASTDDS_STATISTICS="HISTORY_LATENCY_TOPIC;NETWORK_LATENCY_TOPIC;\
PUBLICATION_THROUGHPUT_TOPIC;SUBSCRIPTION_THROUGHPUT_TOPIC;RTPS_SENT_TOPIC;\
RTPS_LOST_TOPIC;HEARTBEAT_COUNT_TOPIC;ACKNACK_COUNT_TOPIC;NACKFRAG_COUNT_TOPIC;\
GAP_COUNT_TOPIC;DATA_COUNT_TOPIC;RESENT_DATAS_TOPIC;SAMPLE_DATAS_TOPIC;\
PDP_PACKETS_TOPIC;EDP_PACKETS_TOPIC;DISCOVERY_TOPIC;PHYSICAL_DATA_TOPIC;\
MONITOR_SERVICE_TOPIC"
ros2 run demo_nodes_cpp talker
Remember to source your ROS 2 installation
before every ros2
command.
1.1.2.3. Monitoring network¶
Now one should see in the DDS Panel two new Participants.

1.1.2.3.1. Domain View¶
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,
rt/chatter
, relates two entities, a DataWriter and a DataReader: this is the Topic that is being
used to exchange information.

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
rt/chatter
Topic, we can easily see the entities exchanging information.

Additionally, 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. Note that for ROS 2 topics, the IDL representation is demangled by default (can be undone in View->Revert ROS 2 Demangling).

1.1.2.3.2. Alias¶
Participants in ROS 2 are named /
by default.
In order to differentiate them one could change the alias of the Participant (see Change entity alias). 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 talker
would be the one with a chatter
writer, and the listener
the one with a
chatter
reader. Since we’re not going to be using this Tab anymore, click on the X to return to the
New Tab
view.

1.1.2.3.3. Statistical data¶
To show statistical data about the communication between the talker
and the listener
,
open the Chart View and follow the steps to Create Dynamic Series Chart and plot this statistical data
in a real time chart.

1.1.2.3.4. Introspect metatraffic topics¶
Fast DDS Monitor filters by default the topics used for sharing metatraffic and the endpoints related to them
so the user can inspect their network easily.
These topics are the ones that ROS 2 uses for discovery and configuration purposes, such as ros_discovery_info
,
as well as those used by Fast DDS to report statistical data.
In order to see these topics in the monitor, click View->Show Metatraffic menu button (see Hide/Show Metatraffic). Now, these topics are shown in the logical panel, and also the Readers and Writers associated to them under their respective Participants.

1.1.3. Video Tutorial¶
There is a video tutorial going through the steps described in this section.