No description
Find a file
2025-06-29 09:24:39 +00:00
.vscode Update readme 2023-03-01 21:42:54 +09:00
bw_interop Fixes in message tree calculations, plots for the paper, started work on BW plots for the paper 2022-10-28 22:37:48 +09:00
clang_interop Hierarchical latency graph, bugfixes, renamed types.py to not interfere with other python packages. 2022-08-09 18:36:40 +02:00
dependencies started anaylsis work 2025-06-03 13:43:48 +00:00
latency_graph started anaylsis work 2025-06-03 13:43:48 +00:00
matching More documentation 2022-12-29 15:09:59 +09:00
message_tree polished and fixed analysis 2025-06-09 14:12:01 +00:00
misc Document misc/utils.py 2022-12-28 14:24:20 +09:00
traces/experiments2 wip: supplementary data 2025-06-28 08:51:04 +00:00
tracing_interop Document tracing_interop/utils.py 2022-12-28 14:12:24 +09:00
.gitignore further eye catcher plot work 2025-06-29 09:24:39 +00:00
.gitmodules started anaylsis work 2025-06-03 13:43:48 +00:00
batch_analysis_analysis.py filter exterme outliers before plotting the boxplots 2025-06-23 07:00:25 +00:00
batch_analyze.py added count, beautified boxplot output 2025-06-16 11:00:18 +00:00
eye_catcher_plot.py wip: split plots and normalize y axis as well 2025-06-28 08:49:29 +00:00
eye_catcher_plot_dis.py further eye catcher plot work 2025-06-29 09:24:39 +00:00
eye_catcher_plot_inverse.py further eye catcher plot work 2025-06-29 09:24:39 +00:00
README.md Update readme 2023-03-01 21:42:54 +09:00
requirements.txt batch analysis analysis 2025-06-10 14:36:56 +00:00
trace-analysis.ipynb added count, beautified boxplot output 2025-06-16 11:00:18 +00:00

MA Autoware Trace Analysis

Automatically extract data dependencies and end-to-end (E2E) latencies from ROS2 trace data and source code.

Prerequisites

Requirements for Optional Features

  • ros2_internal_dependency_analyzer for finding intra-node dependencies via static analysis, which can then be utilized by this tool
  • ros2 multitopic bw for recording message sizes which can then be processed by this tool

Installation

# Make sure you are running Python 3.10 and the corresponding pip:
python3.10 -V
pip3.10 -V

pip3.10 install -r requirements.txt

Make sure that ROS2 Tracing and Tracetools Analysis were compiled with colcon build [...] --symlink-install [...]. Without --symlink-install, the build folder structure will be incorrect and the libraries required by this tool cannot be located.

Usage

The trace_analysis.ipynb notebook is the entry point for users. Configure the notebook according to the comments in the user settings cell. Settings can either be changed in the notebook or via environment variables:

# In the notebook (User Settings cell near the top):
TR_PATH = "path/to/trace/dir"
E2E_ENABLED = True
...
# In the shell of your choice (choose Bash!):
# Each setting is named the same as in the notebook but prefixed by "ANA_NB_".
# For strings, quotes have to be included IN THE VARIABLE VALUE, i.e. double quotation "'...'" 
# has to be used in most cases
ANA_NB_TR_PATH="'path/to/trace/dir'"
ANA_NB_E2E_ENABLED="True"

You can run the notebook via the "Run All" command in Jupyter or you can execute it headless from the command line:

jupyter nbconvert --to notebook --execute trace-analysis.ipynb

The notebook also supports invocation via Papermill.

The output files are found in the configured output dir (default: out/). Inputs are processed and cached in cache/.

Outputs

The plot_e2es_violin_XYZ.csv files correspond to the latencies for each recorded dataflow on path item XYZ. The labels for these path items are found in plot_e2es_violin_labels.csv. The latency types (DDS, Idle, Computation) for these path items are found in plot_e2es_violin_types.csv. calc_times.csv provides calculation times for all callbacks on the path (not only until publication, which is the case for the computation times above).

Known Issues

  • The histograms output in the notebook for Idle, Computation and DDS times, do not aggregate these values over the end-to-end path. Thus, the latencies of all path elements are added into the same histogram.