No description
Find a file
2025-08-05 11:51:03 +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
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
add_csv_header.sh added a bunch of helper scripts 2025-08-05 10:54:44 +00:00
batch_analysis_analysis.py added a bunch of helper scripts 2025-08-05 10:54:44 +00:00
batch_analyze.py env python3 2025-07-30 13:13:17 +00:00
csv2table.py added a bunch of helper scripts 2025-08-05 10:54:44 +00:00
csvfix.sh added a bunch of helper scripts 2025-08-05 10:54:44 +00:00
eye_catcher_plot.py env python3 2025-07-30 13:13:17 +00:00
eye_catcher_plot_dis.py env python3 2025-07-30 13:13:17 +00:00
eye_catcher_plot_inverse.py env python3 2025-07-30 13:13:17 +00:00
ReadMe.md update ReadMe 2025-08-05 11:51:03 +00:00
requirements.txt batch analysis analysis 2025-06-10 14:36:56 +00:00
run_batch_analysis_analysis.sh added a bunch of helper scripts 2025-08-05 10:54:44 +00:00
run_batch_analyze.sh added a bunch of helper scripts 2025-08-05 10:54:44 +00:00
trace-analysis.ipynb added count, beautified boxplot output 2025-06-16 11:00:18 +00:00

ROS 2 Trace Analysis for Semantic Scheduling (Thesis)

This repo provides the data analysis framework used for my thesis
"Semantic Scheduling for Multi-Modal Sensor Data on the Example of ROS 2" (TU Berlin & DLR, 2025).

It is based on TUM-AVS/ros2_latency_analysis (dataflow-analysis branch) by Betz et al.
Please cite their original work when using this code (see below).

Key Features

  • Automated extraction of end-to-end and component latencies from ROS 2 traces
  • Extended batch processing, including meta-anaylsis
  • Scripts and fixes tailored for semantic scheduling experiments

Main Additions & Changes

  • New scripts:
    add_csv_header.sh, batch_analysis_analysis.py, csv2table.py, csvfix.sh,
    run_batch_analysis_analysis.sh, run_batch_analyze.sh
  • Main modifications:
    batch_analyze.py, trace-analysis.ipynb
  • Submodules:
    Includes ros2_tracing and tracetools_analysis

All changes are documented in the git history.

Setup

  • Requires Python 3.10+, ROS 2, JupyterLab, and ros2_tracing
  • Install dependencies:
    pip3.10 install -r requirements.txt
  • Run interactive analysis in Jupyter (trace-analysis.ipynb) or batch via provided scripts.

See the upstream README for more details on prerequisites and methodology.

Usage

First, make sure all your traces are in sub-directories conforming to the common experiment type, e.g.:

traces/
  ros_multi/
    ros_multi_1
    ros_multi_2
    ...
    ros_multi_n
  ros_single/
    ros_single_1
    ros_single_2
    ...
    ros_single_m

Then use run_batch_analyze.sh to run the analysis (trace-analysis.ipynb) for the traces you gathered. This will create a summarizing results.csv in the respecitve directory (here thus traces/ros_multi/ and 'traces/ros_multi/').
The csv will not have headers, to add them, use add_csv_header.sh.
Now you can run run_batch_analysis_analysis.sh to generate the end-to-end analysis box-plots from that results.csv (will also generate a results_summary.csv). The latter is ideal to be turned into LaTeX tables, using csv2table.py.

Output

  • Latency CSVs (E2E and per-chain), plots (PDF/PNG), and LaTeX-ready tables

Citation

If you use this code, please cite:

Betz, T. et al., “Latency Measurement for Autonomous Driving Software Using Data Flow Extraction,”
IEEE Intelligent Vehicles Symposium (IV), 2023.
DOI: 10.1109/iv55152.2023.10186686

@inproceedings{Betz2023,
  doi = {10.1109/iv55152.2023.10186686},
  url = {https://doi.org/10.1109/iv55152.2023.10186686},
  year = {2023},
  author = {Tobias Betz and Maximilian Schmeller and Andreas Korb and Johannes Betz},
  title = {Latency Measurement for Autonomous Driving Software Using Data Flow Extraction},
  booktitle = {2023 {IEEE} Intelligent Vehicles Symposium ({IV})}
}

License

See upstream for original license; thesis-specific additions are for academic/non-commercial use.