Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

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

Closed
adamoskaranikas opened this issue Feb 21, 2022 · 2 comments
Closed

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

adamoskaranikas opened this issue Feb 21, 2022 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@adamoskaranikas
Copy link

adamoskaranikas commented Feb 21, 2022

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 jparisu self-assigned this Feb 21, 2022
@jparisu jparisu added the question Further information is requested label Feb 21, 2022
@jparisu
Copy link
Contributor

jparisu commented Feb 21, 2022

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:

  • to compile fastrtps with -DFASTDDS_STATISTICS=ON
  • to activate FASTDDS_STATISTICS
  • to use Fast DDS as middleware implementation RMW_IMPLEMENTATION=rmw_fastrtps_cpp

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
Copy link
Author

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!

@eProsima eProsima locked and limited conversation to collaborators Feb 22, 2022
@rsanchez15 rsanchez15 converted this issue into discussion #149 Feb 22, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants