1.1. Galactic¶
This section shows how to install and deploy some ROS 2 Galactic nodes in order to monitor them with Fast DDS Monitor.
1.1.1. Installation¶
First of all, follow the Fast DDS Monitor on Linux on this documentation to install Fast DDS Monitor.
Fast DDS is not installed by default in the ROS 2 Galactic release. Thus, first required step is to download Fast DDS and compile it with statistics.
1.1.1.1. Installation from sources¶
Follow the ROS 2 galactic installation from sources documentation
Fast DDS is downloaded within the rest of the packages.
The only consideration here is to compile fastrtps
library with the Statistics Module activated.
When compiling with colcon, the following arguments must be provided:
colcon build --symlink-install --cmake-args -DFASTDDS_STATISTICS=ON
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, set through an environment variable.
In order to activate the publication of statistical data, Fast DDS requires an environment variable specifying those kinds of statistical data to be reported.
To execute each of the nodes, run the following commands in different terminals:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
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"
ros2 run demo_nodes_cpp listener
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
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"
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. 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).
The talker
would be the one with one writer, and the listener
the one with a reader.
1.1.2.3.2. Physical data¶
In order to see the information of the host and the physical context where every node is running, go to the Explorer Panel and activate the Physical Panel. There, the host, user and process of each node are displayed.
1.1.2.3.3. Statistical data¶
To show statistical data about the communication between the talker
and the listener
,
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.