-
Notifications
You must be signed in to change notification settings - Fork 125
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
CPU and Memory usage monitoring script for ROS #2467
Conversation
engineering_tools/monitor-ros-cpu.py
Outdated
python3 monitor-ros-cpu.py | ||
|
||
4. In a different terminal, start CARMA Platform: | ||
./carma start all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have ../ for starting carma?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
engineering_tools/monitor-ros-cpu.py
Outdated
|
||
|
||
# Base path to save the CSV file | ||
base_output_file = "cpu_usage_ros2_nodes.csv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you update the script so everything is saved in a folder? this way it would be easier to find/copy them after several runs.
engineering_tools/monitor-ros-cpu.py
Outdated
|
||
|
||
# Function to create a unique filename by appending a number | ||
def get_unique_filename(base_filename): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we follow the file naming convention of ROS bags and include the date/time? This would make it easier to correlate the script output with the ROS bag file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR Details
Description
This PR supports efforts to create analysis scripts for control performance of CARMA. By running this before the carma starts, we are able to log the processes and see which one is taking more resources over time.
Example graph can be, which is not finalized and will be in the carma-analytics-fotda-repo.

Design document for this task is here: https://leidoscorpus.sharepoint.us/:w:/r/sites/STR/TODevelopmentLibrary/22-256%20CDA%20Design%20%26%20Architecture/Work-In-Progress/Task%207%20Architecture%20Improvement%20Implementation/CARMA%20Platform%20Controls%20Improvements/Identified%20Core%20Performance%20Metrics%20And%20Analysis%20Design%20for%20CARMA%20Platform%20Control.docx?d=w40615c2fbfb74d439215cf62c5e5c4ca&csf=1&web=1&e=NXYkMT
Before this, I tried looking to other methods, but this seemed most straightforward and without issue.
rqt_top is also deprecated in ROS2
ROS2_tracing kernel monitoring was really promising, but maybe it is due to foxy, we it was not possible to record the measurements.
Design task was done here and also mentions above other options I tried https://usdot-carma.atlassian.net/browse/ARC-207
Related GitHub Issue
NA
Related Jira Key
ARC-54
Motivation and Context
Control performance analysis script creation
How Has This Been Tested?
Tested on CDASim and on Live vehicle whether if it is gathering info fine.
Types of changes
Checklist: