eProsima / Fast-DDS-monitor

eProsima Fast DDS Monitor is a graphical desktop application aimed at monitoring DDS environments deployed using the eProsima Fast DDS library. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
GNU General Public License v3.0
40 stars 10 forks source link

Question on use of Monitor as a post processing tool #147

Closed adamoskaranikas closed 2 years ago

adamoskaranikas commented 2 years ago

Hi, thank you for the nicely deployed real-time tools within the monitor. I was wondering if there is a way i could use this monitor on recordings of a ros2 network running (i.e. how you can post process rclcpp performance info using ros2 trace-analysis). I'm most interested in the latency between dataWriters and dataReaders. If i could get this in some CTF trace format then it'd be possible to match the DDS performance information with the ROS2 information to create a holistic performance analysis.

I guess what I'm asking is, is there a way I can record the information that the monitor uses in real time without having to open the GUI? edit: If i was to record a rosbag of my system, would i still be able to get the same info from the monitor as if the system was running in real time?

Any thoughts or ideas would be greatly appreciated!

jparisu commented 2 years ago

Hi @adamoskaranikas , I will answer your questions separately:

First of all, the Monitor has an exporting data feature documented here: https://fast-dds-monitor.readthedocs.io/en/latest/rst/user_manual/export_data.html . You could export the data to a .csv. But I do not think this is what you are looking for.

I guess what I'm asking is, is there a way I can record the information that the monitor uses in real time without having to open the GUI?

YES! Actually, the Fast DDS Monitor is a GUI application that runs above the Fast DDS Statistics Backend (https://github.com/eProsima/Fast-DDS-statistics-backend). This is a library that manages a backend database (the database where the Monitor obtains the data) that offers a useful API to work directly with the statistical data received from your network. Following the documentation of this library https://fast-dds-statistics-backend.readthedocs.io/en/latest/ you could build your own application, getting callbacks with new data stored and asking to the database for the specific data required.

If i was to record a rosbag of my system, would i still be able to get the same info from the monitor as if the system was running in real time?

This is a very interesting question. I have to say that we have not proven that specific use case, but we are almost certain that it will work. I could not find the design documentation of the rosbag, but as long as it creates the same entities that it has recorded, the Monitor (and the Statistics Backend) will work as if they were collecting data from a real scenario. However, you must take care when using rosbag to configure Fast DDS with its specific configurations in order to publish statistics. Those are:

I assume you fulfill most of those cases if you are already receiving data in your monitor). Check the following example on how to execute ROS2 with statistics: https://fast-dds-monitor.readthedocs.io/en/latest/rst/ros/galactic/galactic.html#galactic


If you have further questions regarding this use case, do not hesitate to ask. We we will also appreciate any feedback or information that you get when trying to use it with rosbag. Any feedback from our users is always welcomed.

adamoskaranikas commented 2 years ago

Ok awesome, it will take me some time to familiarize with the backend API, but in the meantime I tried out running some rosbags with the monitor active. The issue seems that when the bag recorded the entity creations it must not have kept the owner information (DomainParticipant), because when replaying the bag (which was recorded before building with FASTDDS_STATISTICS=ON, everything is under the Bag's node/Participant as Datawriters. I'll try recording bags with more ros configuration how you mention and let you know.

Thanks for the detailed response though, it's super helpful!