Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
817 commits
Select commit Hold shift + click to select a range
a423392
add lanelet2-route-planning
lreiher May 17, 2026
1a46496
add script to render compose files by resolving oci include
lreiher May 18, 2026
ec86458
heavily simplify render script
lreiher May 18, 2026
4961efc
improve folder structure
lreiher May 18, 2026
a84ef96
optimize auto-gen comment block
lreiher May 18, 2026
404599a
Restructure compose source rendering
lreiher May 18, 2026
8b453ac
keep original values commented in rendered overridden compose
lreiher May 18, 2026
13e1a80
add comment block to input files
lreiher May 18, 2026
de6b28e
remove non-published stack services
lreiher May 18, 2026
bfc34fe
add github and gitlab ci to check for changes after calling rendering…
lreiher May 18, 2026
3485164
add basic flowchart to readme
lreiher May 18, 2026
ee723e3
rename oci input files
lreiher May 19, 2026
8745684
regenerate with newest oci compose templates, incl map server
lreiher Jun 7, 2026
f23aec5
default params file to /params.yml
lreiher Jun 7, 2026
7d367e7
simplify docker-compose-essentials
lreiher Jun 7, 2026
7d889cc
update docker-compose-essentials
lreiher Jun 9, 2026
adf5fbe
remove docker-compose-essentials submodule
lreiher Jun 9, 2026
b896fb8
restore docker-compose-essentials@969f5aa246f907a2398d2c8107000cba1ad…
lreiher Jun 9, 2026
93abc3d
fix hidden nodes in readme graph
lreiher Jun 9, 2026
137fe74
add lanelet2_object_list_prediction and ackermann_trajectory_control
cgeller Jun 23, 2026
4844073
cleanup
cgeller Jun 23, 2026
8a454b9
add monitoring service
RaphvK Jun 25, 2026
13b1fd9
update oci artifacts
cgeller Jun 24, 2026
c3116ce
update lanelet2_route_planning to v1.1.1
RaphvK Jun 29, 2026
f2e885f
add first version of documentation
cgeller Jul 1, 2026
aaef133
cleanup
cgeller Jul 1, 2026
ba263a7
cleanup overview
cgeller Jul 2, 2026
596be3e
add simple-object-tracking
cgeller Jul 2, 2026
a32f0d6
add simple-planner
cgeller Jul 2, 2026
d584998
update demo
cgeller Jul 3, 2026
06723b3
update demo
cgeller Jul 3, 2026
cb71663
update images
jpbusch Jul 3, 2026
4366c0b
update essentials to latest main
jpbusch Jul 3, 2026
0ca97d1
Merge branch 'openads-controller' into 'main'
jpbusch Jul 3, 2026
9b7f5b6
update image
cgeller Jul 6, 2026
2a5b5b8
update images
cgeller Jul 6, 2026
aa6b7aa
update stack
cgeller Jul 6, 2026
a8ac807
update ackermann_trajectory_control to v1.5.0
gkueppers Jul 7, 2026
3fb201a
update predicted object list topic
cgeller Jul 8, 2026
b736453
update ego-state estimation image
gkueppers Jul 7, 2026
d9bddbc
fix version of optimization
jpbusch Jul 8, 2026
90bc40a
use tagged image for ego state estimation
jpbusch Jul 8, 2026
ff7c2c4
Merge branch 'update-ackermann-control' into 'main'
gkueppers Jul 8, 2026
bec74fd
update lanelet2_map_server
cgeller Jul 8, 2026
ab86765
Merge branch 'main' into openadstack
cgeller Jul 8, 2026
951f09c
update prediction
cgeller Jul 8, 2026
2e952cd
cleanup
cgeller Jul 8, 2026
00fa9ae
add point_cloud_fusion
cgeller Jul 10, 2026
4a1f27c
add reference_trajectory_planning
cgeller Jul 10, 2026
8723679
update simple_object_tracking
cgeller Jul 10, 2026
b6fdd44
small updates
cgeller Jul 10, 2026
1b98b47
add point cloud object detection
cgeller Jul 10, 2026
5a2aa33
add autoware-multi-object-tracker
cgeller Jul 10, 2026
ba26da4
update rviz config
cgeller Jul 10, 2026
9159bb3
update object list prediction
cgeller Jul 10, 2026
969069c
add route trigger
cgeller Jul 10, 2026
25d941f
update demo
cgeller Jul 10, 2026
6ccf3ea
update perception demo
cgeller Jul 10, 2026
73b76fb
temporary disable detection
cgeller Jul 10, 2026
bbc7195
use gpu for pcod
cgeller Jul 10, 2026
0803677
manually fix image version for optimization
cgeller Jul 10, 2026
a3bde0e
add triton-server
cgeller Jul 14, 2026
28c87f0
move docker-compose-essentials and scripts to utils
cgeller Jul 14, 2026
e579ea5
cleanup
cgeller Jul 14, 2026
c4c5305
update perception demo
cgeller Jul 14, 2026
c6436db
fix pcod params
cgeller Jul 14, 2026
d4360c8
add license file
RaphvK Jul 14, 2026
91b5c5a
smaller intermediate arrow
RaphvK Jul 14, 2026
45f9a64
revert /params.yml specification
cgeller Jul 14, 2026
f85fc08
cleanup demo
cgeller Jul 14, 2026
81d434a
fix demo
cgeller Jul 14, 2026
7c1e241
use markdown alerts for sphinx
RaphvK Jul 14, 2026
c1f286e
update readme
cgeller Jul 15, 2026
9388664
update readme
cgeller Jul 15, 2026
8ad772b
update usage
cgeller Jul 15, 2026
315edca
update technical architecture
cgeller Jul 15, 2026
9a339ea
add autoware_tracker params
cgeller Jul 15, 2026
4ca3e93
fix links
RaphvK Jul 15, 2026
7933704
use gif as teaser
RaphvK Jul 15, 2026
35296f8
cleanup demo
cgeller Jul 15, 2026
d5916a1
move replay logic to launch file
RaphvK Jul 15, 2026
ce282a8
add ros2_graph_export
RaphvK Jul 15, 2026
87b41e3
update simple-planner
cgeller Jul 15, 2026
0f29deb
update readme
RaphvK Jul 15, 2026
72aaf0e
update functional architecture
RaphvK Jul 15, 2026
57ca60f
Merge remote-tracking branch 'origin/openadstack' into openadstack
RaphvK Jul 15, 2026
7551025
add a model
RaphvK Jul 15, 2026
fa675ab
update documentation
cgeller Jul 15, 2026
68642cd
cleanup definitions
cgeller Jul 15, 2026
8e67ff9
update technical archtecture
cgeller Jul 15, 2026
93b5a92
update readme
RaphvK Jul 15, 2026
041fdb1
Merge remote-tracking branch 'origin/openadstack' into openadstack
RaphvK Jul 15, 2026
8e27aed
remove links
RaphvK Jul 15, 2026
817a321
update demo
cgeller Jul 15, 2026
d718d9b
cleanup
cgeller Jul 15, 2026
5fd3690
restructuring
cgeller Jul 16, 2026
feaa691
reset autoware tracking
cgeller Jul 16, 2026
4637ed2
fix autoware tracking
cgeller Jul 16, 2026
260f614
remove simple_object_tracking
cgeller Jul 16, 2026
6198bbd
improve teaser images in markdown
RaphvK Jul 16, 2026
5613ea0
add ros2 graph export to usage guide
RaphvK Jul 16, 2026
2164cb6
fix autoware_multi_object_tracker integration
RaphvK Jul 17, 2026
4e11295
exclude ros nodes from graph export
RaphvK Jul 17, 2026
d93ce0e
update autoware_multi_object_tracker
cgeller Jul 20, 2026
7eefa57
update rviz path
cgeller Jul 20, 2026
d00d3ee
pcod video teaser
RaphvK Jul 20, 2026
3b6ad46
Apply 1 suggestion(s) to 1 file(s)
RaphvK Jul 21, 2026
4bc5b9b
replace a model
RaphvK Jul 21, 2026
61c9a19
restore license
RaphvK Jul 21, 2026
715b7b1
remove etsi_its_messages from docs
RaphvK Jul 21, 2026
bb91ec9
update point cloud object detection
cgeller Jul 21, 2026
065467f
upda pcod mdoel
cgeller Jul 21, 2026
2d86bef
remove teasers, update package descriptions
RaphvK Jul 21, 2026
e2aaefd
re-generate graph_export
RaphvK Jul 21, 2026
f84e174
remove download hint
RaphvK Jul 21, 2026
9bbf404
fix demo
cgeller Jul 21, 2026
f537b05
update ros2 graph export
RaphvK Jul 22, 2026
f0ffccf
use ros2_graph_export release tag
RaphvK Jul 22, 2026
fbad000
update integration and deployment documentation
cgeller Jul 22, 2026
d39f187
update citation
cgeller Jul 22, 2026
6c0d3cd
update service description
cgeller Jul 22, 2026
88b73ad
improve oci rendering
jpbusch Jul 22, 2026
d46b58e
update documentation
cgeller Jul 22, 2026
de6eaa2
add teaser
cgeller Jul 22, 2026
09274fa
update video
cgeller Jul 22, 2026
ac7341d
update teaser
cgeller Jul 22, 2026
d8aabac
update documentation
cgeller Jul 22, 2026
19c5b6f
add default rmw router and session configs from jazzy branch fb9c070
lreiher Jul 23, 2026
4f3ce93
transfer zenoh config overrides to config files
lreiher Jul 23, 2026
ce47a5b
make env vars more readable in compose essentials
lreiher Jul 23, 2026
6993352
sync zenoh config with docker-compose-essentials
lreiher Jul 23, 2026
9b3c708
switch repo check after rendering in ci to git porcelain
lreiher Jul 23, 2026
0d1a648
fix readme
cgeller Jul 23, 2026
d23e084
add demo data bag notes
cgeller Jul 24, 2026
9662cb8
update re
cgeller Jul 24, 2026
74ed3ae
update documentation
cgeller Jul 24, 2026
c9b67cd
update demo
cgeller Jul 24, 2026
8a1dc46
add rosbag conversion
cgeller Jul 24, 2026
87b734b
update conversion
cgeller Jul 24, 2026
045bb19
Update docs
cgeller Jul 24, 2026
1439b4f
update demo data
cgeller Jul 24, 2026
4497032
update bag file sizes
cgeller Jul 24, 2026
fd2d1cb
rename images
cgeller Jul 24, 2026
ffd6b2c
update rack
cgeller Jul 24, 2026
c439b45
temporary add simple_object_tracking
cgeller Jul 27, 2026
6686520
update pcodt parameters
bastilam Jul 24, 2026
f01028e
update demo requirements for GPU compatibility
bastilam Jul 24, 2026
7e13713
[demo] configure planning and prediction services
jpbusch Jul 27, 2026
973f5a1
combine demo compose files in one and use profiles
jpbusch Jul 27, 2026
8022af3
remove tmp simple tracking
jpbusch Jul 27, 2026
c05487a
update youtube video
cgeller Jul 27, 2026
aa30fb2
add route planning params
jpbusch Jul 27, 2026
d397360
update demo rviz config; fix startup behavior
jpbusch Jul 27, 2026
8d32d7c
simplify topic remapping
cgeller Jul 27, 2026
4bd9eef
update upload-asset
cgeller Jul 27, 2026
10b76fe
use video html
cgeller Jul 27, 2026
3cbbd22
readd ZENOH_ROUTER_CHECK_ATTEMPTS, so nodes don't start doing stuff b…
lreiher Jul 27, 2026
ad0ca4e
remove control from demo
cgeller Jul 28, 2026
27cee14
improve demo restart
cgeller Jul 28, 2026
790ec41
bump trajectory optimization
cgeller Jul 28, 2026
98dca96
temporary use latest for optimization
cgeller Jul 28, 2026
ba9ef06
improve getting started
cgeller Jul 28, 2026
9fff045
fix teaser video in sphinx docs
RaphvK Jul 28, 2026
d83f094
Revert "fix teaser video in sphinx docs"
RaphvK Jul 28, 2026
20ccbaa
use sciebo link
RaphvK Jul 28, 2026
1770f93
Revert "use sciebo link"
RaphvK Jul 28, 2026
26592fa
revert trajectory_frame_id in simple_planner
cgeller Jul 28, 2026
89711cf
update ci workflow
cgeller Jul 28, 2026
1ce97a6
fix urls
cgeller Jul 28, 2026
8e7f9a0
use documentation for openads references
cgeller Jul 28, 2026
3ce9294
update references
cgeller Jul 28, 2026
de56eed
Merge branch 'openadstack' into 'main'
cgeller Jul 28, 2026
fa1a62c
use markdown links in top-level readme and add docs rebuild downstrea…
RaphvK Jul 30, 2026
6e4e3e6
update links of karl paper
jpbusch Aug 2, 2026
5bc1896
update OpenADS badge
jpbusch Aug 2, 2026
e579d97
Merge pull request #5 from openads-project/update-karl-paper
jpbusch Aug 2, 2026
6e51596
handle new compose paths in render script
jpbusch Aug 3, 2026
a98272d
update simple_planner, trajectory_optimization and prediction services
jpbusch Aug 3, 2026
a295d5d
move triton server and zenoh-router to template services instead of t…
jpbusch Aug 3, 2026
f36cebb
update optimization service in demo
jpbusch Aug 3, 2026
5f65525
move triton-server CUDA_VISIBLE_DEVICES to template
cgeller Aug 3, 2026
2e88671
make compose rendering work with gitlab oci artifacts
jpbusch Aug 3, 2026
2e620ad
apply service prefix to redered compose file
jpbusch Aug 3, 2026
156052b
fix logs in compose rendering
jpbusch Aug 3, 2026
0b2487b
update triton server image
jpbusch Aug 3, 2026
7e647e6
use slim image for pcod
jpbusch Aug 4, 2026
8f80201
generate rendered service name from ROS namespace + name
jpbusch Aug 4, 2026
ff672a1
use slim image for pcod in override service
jpbusch Aug 4, 2026
4d76dfb
render all compose files
jpbusch Aug 4, 2026
852838e
use jazzy-ros-base-alternative-rmw image for zenoh-router
gkueppers Aug 4, 2026
c6ad095
switch back to ZENOH_CONFIG_OVERRIDE 🤡
lreiher Aug 4, 2026
e781f1a
fix zenoh-router health check after image swap
lreiher Aug 4, 2026
c3cf201
fix width of teaser video
RaphvK Aug 4, 2026
10923b3
add description to compose renderer
jpbusch Aug 5, 2026
889af4b
update simple planner params
jpbusch Aug 5, 2026
cb3f0c5
sort triton server service in demo compose
jpbusch Aug 5, 2026
aef0208
Merge pull request #6 from openads-project/update-services
jpbusch Aug 5, 2026
4c3289f
simplify model volume mount
cgeller Aug 5, 2026
aeb12ba
handle linebreaks in compose renderer
jpbusch Aug 5, 2026
81a931b
fix model mounting
cgeller Aug 5, 2026
ef4a435
update model image name
cgeller Aug 5, 2026
27d7065
Merge pull request #7 from openads-project/update/model-provisioning
cgeller Aug 5, 2026
34219d4
add planning architecture paper to publications
jpbusch Aug 13, 2026
8f35694
fix typo in ZENOH_ROUTER_CHECK_ATTEMPTS variable
lreiher Aug 14, 2026
6c1a28b
Merge pull request #9 from openads-project/typo-zenoh-config
lreiher Aug 17, 2026
a11d182
updated docker-compose to prioritise nvidia gpu's if multiple are ava…
MikkelDLR Aug 18, 2026
279c42d
Add architecture roadmap (#8)
RaphvK Aug 19, 2026
ca2deac
modified readme to include xhost command
MikkelDLR Aug 19, 2026
03e809d
Apply suggestions from code review
cgeller Aug 19, 2026
2837633
Merge pull request #10 from MikkelDLR/bugfix/rviz_dual_gpu_visualization
cgeller Aug 19, 2026
dc8976c
update ResearchGate link
jpbusch Aug 20, 2026
dac5a15
remove git-attributes
cgeller Aug 21, 2026
c715f1e
Merge pull request #11 from openads-project/update-publications
jpbusch Aug 21, 2026
04378ec
simplify credential usage in render compose script; make it reliable …
jpbusch Aug 23, 2026
d205947
fix random / missing blank lines generated compose
jpbusch Aug 23, 2026
d389200
Merge pull request #12 from openads-project/improve-render-compose
jpbusch Aug 24, 2026
ba99121
add tracing folder and docs
RaphvK Sep 1, 2026
3ba3053
add tracing folder and docs
RaphvK Sep 1, 2026
b01eebf
use tracing branches for images
RaphvK Sep 1, 2026
b1ec391
use tracing branches for images
RaphvK Sep 1, 2026
89bbf0a
add tracing script
RaphvK Sep 1, 2026
aaf6f2a
add tracing script
RaphvK Sep 1, 2026
a80a661
merge tracing into main images
RaphvK Oct 6, 2026
27acab6
use tracing image for tracking
RaphvK Oct 6, 2026
8c114fc
Merge remote-tracking branch 'origin/main' into tracing
RaphvK Oct 6, 2026
bd0e7b9
Merge branch 'tracing' of github.com:openads-project/openadstack into…
RaphvK Oct 6, 2026
8a7274c
use latest image
RaphvK Oct 7, 2026
0e84607
fix urdf path
RaphvK Oct 7, 2026
93a379b
improve start instruction
RaphvK Oct 7, 2026
8c67f6b
update version of ackermann_trajectory_control
RaphvK Oct 8, 2026
ab9cf69
exclude removed files
RaphvK Oct 8, 2026
863df2c
update override files
RaphvK Oct 8, 2026
adfeba4
revert compose generation script
RaphvK Oct 8, 2026
16c620f
fix override files
RaphvK Oct 8, 2026
a191e0f
re-render compose files
RaphvK Oct 8, 2026
75c0d79
fix using tracing images
RaphvK Oct 8, 2026
c2fe879
remove file from repo
RaphvK Oct 8, 2026
eee29eb
improve tracing documentatino
RaphvK Oct 8, 2026
b2c860e
link to github repo
RaphvK Oct 8, 2026
fc37697
switch to released images
RaphvK Oct 29, 2026
9fabc80
use released image
RaphvK Oct 29, 2026
0937906
use image from public repo
RaphvK Oct 29, 2026
00cef31
Merge remote-tracking branch 'origin/main' into tracing
RaphvK Oct 29, 2026
cb0d89b
revert change
RaphvK Oct 29, 2026
9388233
use IMAGE_VARIANT env to disable slim image during tracing
RaphvK Oct 29, 2026
8b137d6
do not use slim images
RaphvK Oct 30, 2026
5012b91
do not mention kubernetes
RaphvK Oct 30, 2026
96c1a34
use oci compose file
RaphvK Oct 30, 2026
06e0c8c
Apply batched suggestions from code review
RaphvK Oct 30, 2026
9aa60c9
Merge branch 'tracing' of github.com:openads-project/openadstack into…
RaphvK Oct 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ The documentation contains:
- [Functional Architecture](./docs/functional-architecture.md)
- [Integration Architecture](./docs/integration-architecture.md)
- [Deployment Composition](./docs/deployment-composition.md)
- [System Analysis](./docs/system-analysis.md)
Comment thread
RaphvK marked this conversation as resolved.
Resolved

## 🙏 Acknowledgements

Expand Down
70 changes: 70 additions & 0 deletions docs/system-analysis.md
Comment thread
RaphvK marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# System Analysis

OpenADS is a distributed system: its modules run as separate ROS 2 nodes in individual containers and exchange data via topics. This makes it hard to tell, from the outside, how long a message takes to travel from sensor input to control output, or where time is lost along the way. This page describes how to record runtime traces of the stack with [ros2_tracing](https://github.com/ros2/ros2_tracing) and how to analyze them, so you can inspect timing and message flow across all modules of the automated driving stack.

## Why Trace the Message Flow?

Tracing records when callbacks run and when messages are published and received, across all traced nodes and over time. It helps you to:

- Pinpoint latency bottlenecks and timing jitter.
- Correlate perception, planning, and control decisions with their sensor inputs.
- Debug race conditions and missing messages across nodes.
- Detect performance regressions after changes.

## How to Trace the Automated Driving Stack

1. Start the stack with tracing enabled by setting the `ROS_TRACING` environment variable:

```bash
export ROS_TRACING=true
docker compose up -d
```

2. Use OpenADStack as usual. Trace data is continuously recorded into an in-memory ring buffer, but not yet written to disk.

3. Start capturing a trace snapshot to disk:

```bash
utils/tracing/tracing.sh start
Comment thread
RaphvK marked this conversation as resolved.
Resolved
```

4. Once you have captured the situation of interest, stop capturing:

```bash
utils/tracing/tracing.sh stop
```

The trace data of each container is copied to `utils/tracing/trace/<timestamp>/<container>/` and removed from the containers.

5. Start the ROS 2 trace analysis tools:

```bash
docker compose -f utils/tracing/docker-compose.yml up
Comment thread
cgeller marked this conversation as resolved.
Resolved
```

The `utils/tracing/trace/` folder is mounted into the analysis container at `/trace`.

### Traced Services

By default, `tracing.sh` traces all running containers whose name contains one of the following:

- `perception.point-cloud-fusion`
- `perception.point-cloud-object-detection`
- `understanding.autoware-multi-object-tracker`
- `understanding.lanelet2-object-list-prediction`
- `planning.simple-planner`
- `planning.trajectory-optimization`
- `control.ackermann-trajectory-control`

Additional containers can be traced by passing their (partial) names via `EXTRA_TRACING_CONTAINERS`:
Comment thread
RaphvK marked this conversation as resolved.
Resolved

```bash
EXTRA_TRACING_CONTAINERS="my-container-1 my-other-container-1" utils/tracing/tracing.sh start
```

> [!NOTE]
> Additional containers must support tracing themselves, i.e., their nodes must be launched with tracing enabled.

## How to Analyze Trace Data

The analysis container provides [Eclipse Trace Compass](https://eclipse.dev/tracecompass/) and Jupyter Notebooks for evaluating the recorded traces. See [ros2-trace-analysis](https://github.com/openads-project/ros2-trace-analysis) for usage details.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ services:
extends:
file: ../../utils/compose/docker-compose.template.yml
service: ros2-gpu-service
image: ghcr.io/openads-project/point_cloud_object_detection:v3.1.1-slim
environment:
# --- name ------
NAMESPACE: /perception
Expand Down
3 changes: 1 addition & 2 deletions perception/point_cloud_object_detection/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ services:
extends:
file: ../../utils/compose/docker-compose.template.yml
service: ros2-gpu-service
# image: ghcr.io/openads-project/point_cloud_object_detection:v3.1.1
image: ghcr.io/openads-project/point_cloud_object_detection:v3.1.1-slim
image: ghcr.io/openads-project/point_cloud_object_detection:v3.1.1
environment:
# --- name ------
# NAMESPACE: /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# `../../utils/scripts/render_compose_sources.py`

include:
- oci://ghcr.io/thinking-cars/autoware_multi_object_tracker/compose:v1.1.1
- oci://ghcr.io/thinking-cars/autoware_multi_object_tracker/compose:v1.2.0

services:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Auto-generated by `../../utils/scripts/render_compose_sources.py`
# based on `.docker-compose.oci-overrides.yml` with resolved includes
# include:
# # https://github.com/thinking-cars/autoware_multi_object_tracker/blob/v1.1.1/deployment/compose/docker-compose.yml
# - oci://ghcr.io/thinking-cars/autoware_multi_object_tracker/compose:v1.1.1
# # https://github.com/thinking-cars/autoware_multi_object_tracker/blob/v1.2.0/deployment/compose/docker-compose.yml
# - oci://ghcr.io/thinking-cars/autoware_multi_object_tracker/compose:v1.2.0

services:

understanding.autoware-multi-object-tracker:
extends:
file: ../../utils/compose/docker-compose.template.yml
service: ros2-service
image: ghcr.io/thinking-cars/autoware_multi_object_tracker:v1.1.1
image: ghcr.io/thinking-cars/autoware_multi_object_tracker:v1.2.0
environment:
# --- name ------
# NAMESPACE: /
Expand Down Expand Up @@ -55,6 +55,7 @@ services:
INPUT_CHANNELS_PATH: ""
PUBLISH_MERGED_OBJECTS: false
EGO_SOURCE: tf
ROS_TRACING: ${ROS_TRACING:-false}
command:
- /bin/bash
- -ic
Expand All @@ -81,6 +82,7 @@ services:
$${INPUT_CHANNELS_PATH:+input_channels_path:=$${INPUT_CHANNELS_PATH}} \
publish_merged_objects:=$${PUBLISH_MERGED_OBJECTS} \
ego_source:=$${EGO_SOURCE} \
ros_tracing:=$${ROS_TRACING} \
input_detection01_objects:=$${INPUT_DETECTION01_OBJECTS} \
input_detection02_objects:=$${INPUT_DETECTION02_OBJECTS} \
input_detection03_objects:=$${INPUT_DETECTION03_OBJECTS} \
Expand Down
11 changes: 11 additions & 0 deletions utils/tracing/docker-compose.yml
Comment thread
cgeller marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include:
- oci://ghcr.io/openads-project/ros2-trace-analysis/compose:v1.0.0

services:

ros2-trace-analysis:
extends:
file: ../compose/docker-compose.template.yml
service: x11-service
volumes:
- ./trace:/trace
2 changes: 2 additions & 0 deletions utils/tracing/trace/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
223 changes: 223 additions & 0 deletions utils/tracing/tracing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
#!/bin/bash

# Usage: ./tracing.sh {start|stop}

if [ $# -ne 1 ]; then
echo "Usage: $0 {start|stop}"
exit 1
fi

ACTION=$1
TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# List of container name substrings to trace
# Default container substrings
DEFAULT_CONTAINER_SUBSTRINGS=(
"perception.point-cloud-fusion"
"perception.point-cloud-object-detection"
"understanding.autoware-multi-object-tracker"
"understanding.lanelet2-object-list-prediction"
"planning.simple-planner"
"planning.trajectory-optimization"
"control.ackermann-trajectory-control"
)

# Allow additional container substrings via EXTRA_TRACING_CONTAINERS env var
# e.g. EXTRA_TRACING_CONTAINERS="my-container-1 my-other-container-1" ./tracing.sh start
EXTRA_SUBSTRINGS=()
if [ -n "$EXTRA_TRACING_CONTAINERS" ]; then
IFS=' ' read -ra EXTRA_SUBSTRINGS <<< "$EXTRA_TRACING_CONTAINERS"
fi

CONTAINER_SUBSTRINGS=("${DEFAULT_CONTAINER_SUBSTRINGS[@]}" "${EXTRA_SUBSTRINGS[@]}")

DOCKER_USER="dockeruser"
TRACE_ROOT="/home/dockeruser/.ros/tracing"

format_target_label() {
local target_type=$1
local target_namespace=$2
local target_name=$3

if [ "$target_type" == "docker" ]; then
echo "$target_name"
else
echo "$target_namespace/$target_name"
fi
}

format_target_output_dir() {
local target_type=$1
local target_namespace=$2
local target_name=$3

if [ "$target_type" == "docker" ]; then
echo "$target_name"
else
echo "k8s-${target_namespace}-${target_name}"
fi
}

exec_in_target() {
local target_type=$1
local target_namespace=$2
local target_name=$3
local command=$4

if [ "$target_type" == "docker" ]; then
docker exec --user "$DOCKER_USER" "$target_name" bash -ic "$command"
else
kubectl exec -n "$target_namespace" "$target_name" -- bash -ic "$command"
fi
}

copy_trace_from_target() {
local target_type=$1
local target_namespace=$2
local target_name=$3
local destination_dir=$4

if [ "$target_type" == "docker" ]; then
docker cp "$target_name:$TRACE_ROOT/trace" "$destination_dir"
else
kubectl cp "$target_namespace/$target_name:/root/.ros/tracing/trace" "$destination_dir"
fi
}

# Arrays to track results
SUCCESS_TARGETS=()
FAILED_TARGETS=()
MISSING_TARGETS=()

# Validate action
if [ "$ACTION" != "start" ] && [ "$ACTION" != "stop" ]; then
echo "Usage: $0 {start|stop}"
exit 1
fi

mapfile -t RUNNING_CONTAINERS < <(docker ps --format '{{.Names}}' 2>/dev/null)
mapfile -t RUNNING_PODS < <(kubectl get pods -A --field-selector=status.phase=Running --no-headers -o custom-columns=NS:.metadata.namespace,NAME:.metadata.name 2>/dev/null)

for substring in "${CONTAINER_SUBSTRINGS[@]}"; do
MATCHED_TARGETS=()

for container in "${RUNNING_CONTAINERS[@]}"; do
if [[ "$container" == *"$substring"* ]]; then
MATCHED_TARGETS+=("docker||$container")
fi
done

for pod_entry in "${RUNNING_PODS[@]}"; do
read -r namespace pod_name <<< "$pod_entry"
if [[ "$pod_name" == *"$substring"* ]]; then
MATCHED_TARGETS+=("k8s|$namespace|$pod_name")
fi
done

if [ ${#MATCHED_TARGETS[@]} -eq 0 ]; then
echo "Warning: No running target containing '$substring'."
MISSING_TARGETS+=("$substring")
continue
fi

for target in "${MATCHED_TARGETS[@]}"; do
target_type=${target%%|*}
target_remainder=${target#*|}
target_namespace=${target_remainder%%|*}
target_name=${target_remainder#*|}
(
TARGET_LABEL=$(format_target_label "$target_type" "$target_namespace" "$target_name")

if [ "$ACTION" == "start" ]; then
echo "Starting tracing in target: $TARGET_LABEL"

TRACE_COMMAND="ros2 trace start trace --dual-session"
exec_in_target "$target_type" "$target_namespace" "$target_name" "$TRACE_COMMAND"

if [ $? -eq 0 ]; then
echo "$TARGET_LABEL" >> /tmp/tracing_success_$$
else
echo "$TARGET_LABEL" >> /tmp/tracing_failed_$$
fi

elif [ "$ACTION" == "stop" ]; then
echo "Stopping tracing in target: $TARGET_LABEL"
STOP_COMMAND="ros2 trace stop trace --dual-session"
exec_in_target "$target_type" "$target_namespace" "$target_name" "$STOP_COMMAND"

STOP_STATUS=$?

echo "Copy trace files from target: $TARGET_LABEL"
TARGET_OUTPUT_DIR="$SCRIPT_DIR/trace/$TIMESTAMP/$(format_target_output_dir "$target_type" "$target_namespace" "$target_name")"
mkdir -p "$TARGET_OUTPUT_DIR"
copy_trace_from_target "$target_type" "$target_namespace" "$target_name" "$TARGET_OUTPUT_DIR"

COPY_STATUS=$?

echo "Removing trace files from target: $TARGET_LABEL"
REMOVE_COMMAND="rm -rf $TRACE_ROOT"
exec_in_target "$target_type" "$target_namespace" "$target_name" "$REMOVE_COMMAND"

REMOVE_STATUS=$?

if [ $STOP_STATUS -eq 0 ] && [ $COPY_STATUS -eq 0 ] && [ $REMOVE_STATUS -eq 0 ]; then
echo "$TARGET_LABEL" >> /tmp/tracing_success_$$
else
echo "$TARGET_LABEL" >> /tmp/tracing_failed_$$
fi
fi
) &
done
done

# Wait for all background jobs to complete
wait

# Read results from temporary files
if [ -f /tmp/tracing_success_$$ ]; then
mapfile -t SUCCESS_TARGETS < /tmp/tracing_success_$$
rm /tmp/tracing_success_$$
fi

if [ -f /tmp/tracing_failed_$$ ]; then
mapfile -t FAILED_TARGETS < /tmp/tracing_failed_$$
rm /tmp/tracing_failed_$$
fi

# Print summary
echo ""
echo "============================================"
echo "Summary - $ACTION operation:"
echo "============================================"

if [ ${#SUCCESS_TARGETS[@]} -gt 0 ]; then
echo "✓ Successfully ${ACTION}ed tracing for ${#SUCCESS_TARGETS[@]} target(s):"
for target in "${SUCCESS_TARGETS[@]}"; do
echo " - $target"
done
else
echo "✓ No targets ${ACTION}ed successfully"
fi

echo ""

if [ ${#FAILED_TARGETS[@]} -gt 0 ]; then
echo "✗ Failed to $ACTION tracing for ${#FAILED_TARGETS[@]} target(s):"
for target in "${FAILED_TARGETS[@]}"; do
echo " - $target"
done
else
echo "✗ No failures"
fi

echo ""

if [ ${#MISSING_TARGETS[@]} -gt 0 ]; then
echo "⚠ Missing ${#MISSING_TARGETS[@]} target(s) (not running):"
for substring in "${MISSING_TARGETS[@]}"; do
echo " - $substring"
done
fi

echo "============================================="
Loading