Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
9b5ed59
docs(spec): Android reliable discovery 調査 (B) のパケットキャプチャ design を追加
OJII3 Jun 27, 2026
96339bb
docs(plan): Android reliable discovery 調査 (B) パケットキャプチャの実装プランを追加
OJII3 Jun 27, 2026
ba8cd08
chore: discovery-capture 計測ディレクトリ + .gitignore 追加
OJII3 Jun 27, 2026
4c741c7
feat(discovery-capture): CLI フラグ parse ヘルパを追加 (TDD)
OJII3 Jun 27, 2026
36c3362
feat(discovery-capture): pcap path 計算 (build_paths) を追加
OJII3 Jun 27, 2026
dd177d9
chore: discovery-capture 計測前 device 状態確認を記録
OJII3 Jun 27, 2026
6e76a0d
chore: discovery-capture reliable-32 計測 (host 側、Android 側 root 不可スキップ)
OJII3 Jun 27, 2026
35c3058
fix(discovery-capture): tshark/tcpdump ログを git 管理対象に追加
OJII3 Jun 27, 2026
7c68191
chore: discovery-capture reliable-32 計測 pcap 集計 raw データ
OJII3 Jun 27, 2026
706d374
feat(discovery-capture): pcap 解析スクリプト (analyze.py) を追加 (TDD)
OJII3 Jun 27, 2026
f658988
chore: discovery-capture best-effort-8192 計測 (control, host 側のみ)
OJII3 Jun 27, 2026
457a941
chore: discovery-capture 仮説判定表 + 集計 JSON
OJII3 Jun 27, 2026
5f4adb8
docs(specs): discovery-capture 計測結果と findings を追加
OJII3 Jun 27, 2026
7f3b34d
chore: discovery-capture perf-runner 計測 output (helper stdout, metric…
OJII3 Jun 27, 2026
23faf6b
fix(discovery-capture): build/PID ファイルを gitignore に追加
OJII3 Jun 27, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ obj/
!**/[Pp]ackages/build/

## Build results
artifacts/
artifacts/*
!artifacts/discovery-capture/
[Dd]ebug/
[Rr]elease/
x64/
Expand Down
14 changes: 14 additions & 0 deletions artifacts/discovery-capture/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# pcap と巨大一時ファイルは git 管理外
*.pcap
*.pcapng
*.tsv
*.log
!host-tshark*.log
!android-tcpdump*.log
!README.md
# perf-runner build 出力と PID ファイル
build/
*.pid
clock-*-pre.txt
!host-clock-pre.txt
android-clock-pre.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# best-effort-8192 pcap 集計 (raw)

計測日時: Sat Jun 27 11:29:52 PM JST 2026
pcap: artifacts/discovery-capture/20260627-231205/host-best-effort_00001_20260627232823.pcap

## Packet counts
- Total packets: 1925
- RTPS packets: 1921
- Android→Host (192.168.0.22): 1821
- Host→Android (192.168.0.20): 100

## Android port distribution
1800 12411
15 12410
5 12400
1 12401

## Host port distribution
88 12410
12 12400

## helper 受信 (manifest.json から)
{
"RunId": "20260627-142838",
"Backend": "il2cpp",
"BuildTarget": "Android",
"CaptureFrames": 200,
"Scenarios": [
{
"Name": "unity-to-ros2-best-effort-8192",
"Direction": "unity_to_ros2",
"MetricsPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/metrics.ndjson",
"ProfilerPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/player.profiler.raw",
"PlayerLogPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/player.log",
"HelperStdoutPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/helper.stdout.ndjson",
"HelperStderrPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/helper.stderr.log",
"PlayerExitCode": 0,
"HelperExitCode": 3
}
]
}
### helper stdout
{"event":"ready","mode":"sub","topic":"/rosettadds_perf_unity_to_ros2_best_effort_8192"}
{"event":"done","received":162,"elapsed_ms":13262.6}
35 changes: 35 additions & 0 deletions artifacts/discovery-capture/20260627-231205/analysis-raw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# discovery-capture reliable-32 集計 raw データ

## 計測メタ

- pcap: `host-reliable_00001_20260627231808.pcap`
- 計測日時: 2026-06-27 23:18:08
- android IP: 192.168.0.22
- host IP: 192.168.0.20

## 集計結果

| 指標 | 値 |
|------|-----|
| Total packets (pcap 全パケット) | 607 |
| RTPS packets (rtps フィルタ) | 603 |
| RTPS, android→host (src 192.168.0.22) | 511 |
| RTPS, host→android (src 192.168.0.20) | 92 |

合計 603 (511+92) が RTPS フィルタの 603 と一致する。

### Android src (192.168.0.22) → dport 分布

| dport | パケット数 | 備考 |
|-------|-----------|------|
| 12411 | 500 | SPDP ユニキャスト応答 |
| 12410 | 8 | SEDP 応答 |
| 12400 | 2 | SPDP マルチキャスト |
| 12401 | 1 | SEDP マルチキャスト |

### Host src (192.168.0.20) → dport 分布

| dport | パケット数 | 備考 |
|-------|-----------|------|
| 12410 | 80 | SEDP 要求 |
| 12400 | 12 | SPDP アナウンス |
30 changes: 30 additions & 0 deletions artifacts/discovery-capture/20260627-231205/analysis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"reliable": {
"pcap": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/host-reliable_00001_20260627231808.pcap",
"total_rtps": 603,
"ports": {
"12400": 14,
"12410": 88,
"12401": 1,
"12411": 500
},
"sources": {
"192.168.0.20": 92,
"192.168.0.22": 511
}
},
"best-effort": {
"pcap": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/host-best-effort_00001_20260627232823.pcap",
"total_rtps": 1921,
"ports": {
"12400": 17,
"12401": 1,
"12410": 103,
"12411": 1800
},
"sources": {
"192.168.0.20": 100,
"192.168.0.22": 1821
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Android clock SKIPPED: root 不可
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SKIPPED: root 不可 (Task 4)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Android tcpdump SKIPPED: root 不可 (Task 4)
Task 5 で IGMP 未参加確認済。host 側 capture のみで比較。
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Android tcpdump SKIPPED: root 取得不可 (Task 4)
原因: ro.build.type=user + ro.debuggable=0
代替: /proc/net/igmp で wlan0 の IGMP グループ参加状況を確認 (Task 4 済)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"RunId": "20260627-142838",
"Backend": "il2cpp",
"BuildTarget": "Android",
"CaptureFrames": 200,
"Scenarios": [
{
"Name": "unity-to-ros2-best-effort-8192",
"Direction": "unity_to_ros2",
"MetricsPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/metrics.ndjson",
"ProfilerPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/player.profiler.raw",
"PlayerLogPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/player.log",
"HelperStdoutPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/helper.stdout.ndjson",
"HelperStderrPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/best-effort-8192/20260627-142838/unity-to-ros2-best-effort-8192/helper.stderr.log",
"PlayerExitCode": 0,
"HelperExitCode": 3
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"event":"ready","mode":"sub","topic":"/rosettadds_perf_unity_to_ros2_best_effort_8192"}
{"event":"done","received":162,"elapsed_ms":13262.6}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{"event":"start","scenario":"unity-to-ros2-best-effort-8192","direction":"unity_to_ros2","qos":"best_effort","payload_bytes":8192,"messages":200}
{"event":"ready","scenario":"unity-to-ros2-best-effort-8192","direction":"unity_to_ros2","qos":"best_effort","payload_bytes":8192,"messages":200}
{"event":"matched","scenario":"unity-to-ros2-best-effort-8192","direction":"unity_to_ros2","qos":"best_effort","payload_bytes":8192,"messages":200}
{"event":"measure_start","scenario":"unity-to-ros2-best-effort-8192","direction":"unity_to_ros2","qos":"best_effort","payload_bytes":8192,"messages":200}
{"event":"measure_done","scenario":"unity-to-ros2-best-effort-8192","direction":"unity_to_ros2","qos":"best_effort","payload_bytes":8192,"messages":200,"main_thread_time_ns_available":true,"main_thread_time_ns_last":77000,"gc_used_memory_bytes_available":true,"gc_used_memory_bytes_last":7131136,"gc_allocated_in_frame_bytes_available":true,"gc_allocated_in_frame_bytes_last":163,"gc_allocated_in_frame_bytes_total":1671299,"gc_allocated_in_frame_bytes_samples":1110,"elapsed_ms":400.6254,"sent":200,"serialized_bytes_per_message":8201,"serialized_bytes":1640200,"messages_per_second":499.219470358095}
{"event":"waiting_for_release","scenario":"unity-to-ros2-best-effort-8192","direction":"unity_to_ros2","qos":"best_effort","payload_bytes":8192,"messages":200}
{"event":"released","scenario":"unity-to-ros2-best-effort-8192","direction":"unity_to_ros2","qos":"best_effort","payload_bytes":8192,"messages":200}
{"event":"done","scenario":"unity-to-ros2-best-effort-8192","direction":"unity_to_ros2","qos":"best_effort","payload_bytes":8192,"messages":200}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ready
2 changes: 2 additions & 0 deletions artifacts/discovery-capture/20260627-231205/env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RUN_ID=20260627-231205
RUN_DIR=artifacts/discovery-capture/20260627-231205
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1782569899.354519804
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Capturing on 'wlp3s0'
1925 packets captured
2 changes: 2 additions & 0 deletions artifacts/discovery-capture/20260627-231205/host-tshark.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Capturing on 'wlp3s0'
607 packets captured
37 changes: 37 additions & 0 deletions artifacts/discovery-capture/20260627-231205/hypothesis-table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 仮説判定 (2026-06-27)

| 観点 | reliable-32 host | best-effort-8192 host | 解釈 |
|------|------------------|------------------------|------|
| total RTPS packets | 603 | 1921 | best-effort が 3.2×多い (fragmentation) |
| port 12400 (SPDP mc) count | 14 | 17 | 両方とも host が SPDP 送信、Android が応答 |
| port 12401 (user mc) count | 1 | 1 | best-effort は multicast 送信あり |
| port 12410 (SEDP) count | 88 | 103 | 両方とも SEDP 双方向あり |
| port 12411 (user unicast) count | 500 | 1800 | reliable は unicast のみ (no reader proxy)、best-effort は fragmentation 多数 |
| src 192.168.0.20 (host) count | 92 | 100 | host の SPDP/SEDP 送信 |
| src 192.168.0.22 (Android) count | 511 | 1821 | Android の応答 + user data |
| helper received | 0/200 (0%) | 162/200 (81%) | 両者とも helper 側で 100% 到達せず |
| Android→host 到着率 | 511/500 (102%) | 1821/200 (910%) | 全 packet が host に到達 |

## 判定

### 仮説 1: Player 側 SPDP/SEDP 不出力 → **反証**
- Android (192.168.0.22) からの SPDP/SEDP 14+88 = 102 packet
- 2 scenarios とも Android は SPDP/SEDP を送信

### 仮説 2: Android kernel 経路問題 (IGMP / multicast routing) → **反証**
- Android からの全 multicast (port 12400, 12401) が host 側に到達
- IGMP は /proc/net/igmp 上で未確認だが、host から見ると到達している
- 仮説 2 の kernel multicast routing 自体は成立している

### 仮説 3: host 側 rmw_fastrtts_cpp parse 失敗 → **支持 (詳細不明)**
- reliable: 500 user data packet すべて host に到達、helper received 0
- best-effort: 1800 user data fragment すべて host に到達、helper received 162/200 (81%)
- host 側 rmw_fastrtts_cpp が parse 段階で失敗/欠落している

## 残存謎

1. **best-effort はなぜ 81% で止まるのか** (162/200 で残り 38 packet が欠落)
2. **reliable はなぜ 0% なのか** (500 packet すべて到達しているのに 1 件も処理されない)
3. **IGMP 未参加との関係**: Android kernel 上で wlan0 は 239.255.0.1 に未参加
(/proc/net/igmp 確認)。host から見たマルチキャストは到達しているが、
Android 側カーネルから見ると SPDP 受信経路が不明。
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"RunId": "20260627-141823",
"Backend": "il2cpp",
"BuildTarget": "Android",
"CaptureFrames": 200,
"Scenarios": [
{
"Name": "unity-to-ros2-reliable-32",
"Direction": "unity_to_ros2",
"MetricsPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/reliable-32/20260627-141823/unity-to-ros2-reliable-32/metrics.ndjson",
"ProfilerPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/reliable-32/20260627-141823/unity-to-ros2-reliable-32/player.profiler.raw",
"PlayerLogPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/reliable-32/20260627-141823/unity-to-ros2-reliable-32/player.log",
"HelperStdoutPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/reliable-32/20260627-141823/unity-to-ros2-reliable-32/helper.stdout.ndjson",
"HelperStderrPath": "/home/ojii3/src/github.com/ojii3/ROSettaDDS/artifacts/discovery-capture/20260627-231205/reliable-32/20260627-141823/unity-to-ros2-reliable-32/helper.stderr.log",
"PlayerExitCode": 0,
"HelperExitCode": 3
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"event":"ready","mode":"sub","topic":"/rosettadds_perf_unity_to_ros2_reliable_32"}
{"event":"done","received":0,"elapsed_ms":15000.4}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{"event":"start","scenario":"unity-to-ros2-reliable-32","direction":"unity_to_ros2","qos":"reliable","payload_bytes":32,"messages":500}
{"event":"ready","scenario":"unity-to-ros2-reliable-32","direction":"unity_to_ros2","qos":"reliable","payload_bytes":32,"messages":500}
{"event":"matched","scenario":"unity-to-ros2-reliable-32","direction":"unity_to_ros2","qos":"reliable","payload_bytes":32,"messages":500}
{"event":"measure_start","scenario":"unity-to-ros2-reliable-32","direction":"unity_to_ros2","qos":"reliable","payload_bytes":32,"messages":500}
{"event":"measure_done","scenario":"unity-to-ros2-reliable-32","direction":"unity_to_ros2","qos":"reliable","payload_bytes":32,"messages":500,"main_thread_time_ns_available":true,"main_thread_time_ns_last":89231,"gc_used_memory_bytes_available":true,"gc_used_memory_bytes_last":3010560,"gc_allocated_in_frame_bytes_available":true,"gc_allocated_in_frame_bytes_last":3352,"gc_allocated_in_frame_bytes_total":1769005,"gc_allocated_in_frame_bytes_samples":3677,"elapsed_ms":56.0762,"sent":500,"serialized_bytes_per_message":41,"serialized_bytes":20500,"messages_per_second":8916.43870305049}
{"event":"waiting_for_release","scenario":"unity-to-ros2-reliable-32","direction":"unity_to_ros2","qos":"reliable","payload_bytes":32,"messages":500}
{"event":"released","scenario":"unity-to-ros2-reliable-32","direction":"unity_to_ros2","qos":"reliable","payload_bytes":32,"messages":500}
{"event":"done","scenario":"unity-to-ros2-reliable-32","direction":"unity_to_ros2","qos":"reliable","payload_bytes":32,"messages":500}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ready
6 changes: 6 additions & 0 deletions artifacts/discovery-capture/pre-check.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
device: 5HF6OVWCDECMJZ59
root: not-available (su not found)
tcpdump: n/a (no root)
igmp_239.255.0.1: not-checked (no root)
host_tshark: TShark (Wireshark) 4.6.5 (Git commit b40c46f83867).
host_tcpdump: tcpdump version 4.99.6
Loading
Loading