Divyanshudiv commited on
Commit
4e3c065
·
verified ·
1 Parent(s): 55d35d0

dualworld viewer: pdmlite_test6 (6 runs)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/rgb_front.mp4 +3 -0
  2. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/rgb_left.mp4 +3 -0
  3. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/rgb_rear.mp4 +3 -0
  4. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/rgb_right.mp4 +3 -0
  5. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/depth_front.mp4 +3 -0
  6. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/depth_left.mp4 +3 -0
  7. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/depth_rear.mp4 +3 -0
  8. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/depth_right.mp4 +3 -0
  9. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/semseg_front.mp4 +3 -0
  10. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/semseg_left.mp4 +3 -0
  11. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/semseg_rear.mp4 +3 -0
  12. dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/semseg_right.mp4 +3 -0
  13. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/rgb_front.mp4 +3 -0
  14. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/rgb_left.mp4 +3 -0
  15. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/rgb_rear.mp4 +3 -0
  16. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/rgb_right.mp4 +3 -0
  17. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/depth_front.mp4 +3 -0
  18. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/depth_left.mp4 +3 -0
  19. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/depth_rear.mp4 +3 -0
  20. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/depth_right.mp4 +3 -0
  21. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/semseg_front.mp4 +3 -0
  22. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/semseg_left.mp4 +3 -0
  23. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/semseg_rear.mp4 +3 -0
  24. dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/semseg_right.mp4 +3 -0
  25. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/rgb_front.mp4 +3 -0
  26. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/rgb_left.mp4 +3 -0
  27. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/rgb_rear.mp4 +3 -0
  28. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/rgb_right.mp4 +3 -0
  29. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/depth_front.mp4 +3 -0
  30. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/depth_left.mp4 +3 -0
  31. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/depth_rear.mp4 +3 -0
  32. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/depth_right.mp4 +3 -0
  33. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/semseg_front.mp4 +3 -0
  34. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/semseg_left.mp4 +3 -0
  35. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/semseg_rear.mp4 +3 -0
  36. dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/semseg_right.mp4 +3 -0
  37. dualworld/pdmlite_test6/index.html +1241 -0
  38. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/rgb_front.mp4 +3 -0
  39. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/rgb_left.mp4 +3 -0
  40. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/rgb_rear.mp4 +3 -0
  41. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/rgb_right.mp4 +3 -0
  42. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/depth_front.mp4 +3 -0
  43. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/depth_left.mp4 +3 -0
  44. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/depth_rear.mp4 +3 -0
  45. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/depth_right.mp4 +3 -0
  46. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/semseg_front.mp4 +3 -0
  47. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/semseg_left.mp4 +3 -0
  48. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/semseg_rear.mp4 +3 -0
  49. dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/semseg_right.mp4 +3 -0
  50. dualworld/pdmlite_test6/rule_red_light_or__USA_Oregon/videos/rgb_front.mp4 +3 -0
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/rgb_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:274739373422d8f7efc2c92017cef585cd95969ea9d03c10e8eb49521484abe8
3
+ size 7122234
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/rgb_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:776ab3c79cca34fc24085e6ef723f9979359bd1b90c9a2ee2ffef67694b8d97c
3
+ size 5809774
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/rgb_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed7f317acb52e3ac973910393bcc30dcbde1d6b581a28bca949aa3339a386fe7
3
+ size 9763985
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/rgb_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e036d91580d0902cf15bc5597a659826cbc1f4d1aa2805364799452dac04b876
3
+ size 9106725
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/depth_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6846cdac2a432aaf19b6ca481f14501a0930101ff15e7bba471507cff6a468e3
3
+ size 413547
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/depth_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8235103ce92711b6605273cfdd8f59cec1446e57e4521820790d1e24fcfa2d92
3
+ size 357146
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/depth_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88198739049dd11a20d923b574a024852f48bbd7ebe7ad0861d304fda15d3425
3
+ size 297911
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/depth_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:317231179f3338863eb24729c05ba18897c5602fd100cc95189dd7b28b8edb6f
3
+ size 547261
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/semseg_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1989b0f7f6ca1f006c00e0d1e8017aa24d6d30e65471c69b0e411fac39e3a50b
3
+ size 363750
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/semseg_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31da8f266fe06165094fc68b77bf084a85f55e05e3348cb08115b4f5b649eb5e
3
+ size 307730
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/semseg_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78809daf610cb9744510546fe253b544bfa86d1cb1937ae807da2233b8b21e24
3
+ size 525718
dualworld/pdmlite_test6/conflict_emergency_corridor_at_ca__Austria/videos/web/semseg_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f66af85b3527586963ca8f8ba5f66ae1c21b9b923dbe14009c329fcf387ebfe3
3
+ size 489713
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/rgb_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ceb63dc06cd839ad9123eae4a4c231d388b81f09c167333a120cdf42f0f680cc
3
+ size 13576699
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/rgb_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09447a7819bb9978c859c21e505fbedf69a6dcf5b779270d45aeb2ee98abe53c
3
+ size 9403944
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/rgb_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2e6e9bed0b450bab5871e96beadf6005c797ed73b44cb99de37980fd62c6650
3
+ size 11271655
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/rgb_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37ae3c3e2eea976b64032718357aa019c7f7044a9c681922b37d3f15ad8613b6
3
+ size 8996373
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/depth_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2cfe6a1836b1104a7adddae8dcb75f48b04f2b3e82e9fab06eea50fd4f533230
3
+ size 510914
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/depth_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88818733b48f95afcbfac282c92b5a8b73b2ec53e35c702dc258398e5eacf71b
3
+ size 376044
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/depth_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af6a7dda36ca330e73dc1d4e093adc37651cdc0e480abcfbf6e53f2f004285f8
3
+ size 433102
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/depth_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb08a932e2a5eb0ef468a17ca68c476e1f8145fb25ee25cf0b83dd5d7d9b248b
3
+ size 328103
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/semseg_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f715295954661eb05ecc469668f00fa7f9bb4c855f1102803620bc35394dd8ec
3
+ size 549074
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/semseg_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64db0440ec0ac854acfa267aeb2dd8c57a473e067a939e4989ea1c1961fdb87a
3
+ size 332579
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/semseg_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b41a9f82e31a5d13de0a667a84c32c0e7e71e9a1ea30178ed52d38b2b57491b7
3
+ size 982139
dualworld/pdmlite_test6/conflict_pass_cyclist_no_passing_pa_de__German/videos/web/semseg_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ae68c63303d9e2450dd36c29051e7b15650080a5fd50a6620a53e7233759552
3
+ size 294993
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/rgb_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a7b9a96d4141a942704833f04e98f23148083145c75b83491dd4296c093e134
3
+ size 9383521
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/rgb_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f82db11b3966425b47befb567804c4c5690dc5527d0a711807fafac6f854277
3
+ size 8986305
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/rgb_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99abb69dbf95a39e2326452e56fa21205a89eab8a7db5fdb3a2b85db3bf12962
3
+ size 9556277
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/rgb_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79009dee07969572025139d97956a9b7e7a253de79f5f1918b6793d181ab17b4
3
+ size 7964000
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/depth_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4421fba26deefda408898d076dba5c981ba91a6db59dbcc56fc6cab2c5930ead
3
+ size 382597
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/depth_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5942eda2c88b33ed4744315a4e02ecbe1df5924ea8c19ca588aec9db87d01660
3
+ size 523380
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/depth_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c63d5f80732482afa0f6aba0a6d0e225334669e11c859cd3cffd024a34b0b64e
3
+ size 247401
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/depth_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fcc741263beeb6076ece199fd5771d7eebd6f7e03e96a782c225e705354531a
3
+ size 178081
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/semseg_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:823a3259caa760d075f59a5fcfe188ebbaeda69ff04921b205126f0916569b0c
3
+ size 814094
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/semseg_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc6ad61ffc281b6ed23327ec6fea0b991477545cefef7e9bf3ff7c0d3f944858
3
+ size 740167
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/semseg_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e25f9a4f71191cbbb5378d1e6aa41fb275109fc328b79798426e32580893355b
3
+ size 971349
dualworld/pdmlite_test6/conflict_stop_vs_give_way_sa__AUS_SouthAustralia-stop/videos/web/semseg_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:044e9f3a0d2104fd8b7db34547915c45676fb9903a5f05b49c075caf3a56ab25
3
+ size 458525
dualworld/pdmlite_test6/index.html ADDED
@@ -0,0 +1,1241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="dark">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>SceneDriveBench — Dualworld Suite Viewer</title>
7
+ <style>
8
+ :root {
9
+ color-scheme: dark;
10
+ --page: #0d0d0d;
11
+ --surface-1: #1a1a19;
12
+ --surface-2: #232322;
13
+ --text-primary: #ffffff;
14
+ --text-secondary: #c3c2b7;
15
+ --text-muted: #898781;
16
+ --grid: #2c2c2a;
17
+ --baseline: #383835;
18
+ --border: rgba(255,255,255,0.10);
19
+ --series-1: #3987e5; /* blue */
20
+ --series-2: #d95926; /* orange */
21
+ --series-3: #199e70; /* aqua */
22
+ --series-5: #d55181; /* magenta */
23
+ --accent: var(--series-1);
24
+ /* bird's-eye map */
25
+ --map-road: #2e2e2c;
26
+ --map-junction: #343432;
27
+ --map-walk: #3f3e3a;
28
+ --map-mark: #d6d5cf;
29
+ --map-yellow: #d9b13f;
30
+ --map-plate: #e5484d;
31
+ }
32
+ * { box-sizing: border-box; }
33
+ html, body { margin: 0; padding: 0; }
34
+ body {
35
+ background: var(--page);
36
+ color: var(--text-primary);
37
+ font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
38
+ }
39
+ .num { font-variant-numeric: tabular-nums; }
40
+
41
+ header {
42
+ display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
43
+ padding: 14px 20px 0;
44
+ }
45
+ header h1 { font-size: 17px; margin: 0; font-weight: 650; }
46
+ header .suite-id { color: var(--text-muted); font-size: 13px; }
47
+
48
+ nav.tabs { display: flex; gap: 4px; padding: 10px 20px 0; flex-wrap: wrap; }
49
+ nav.tabs button {
50
+ background: none; border: 1px solid transparent; border-bottom: none;
51
+ color: var(--text-secondary); font: inherit; padding: 7px 14px;
52
+ border-radius: 8px 8px 0 0; cursor: pointer;
53
+ }
54
+ nav.tabs button:hover { background: var(--surface-2); }
55
+ nav.tabs button.active {
56
+ background: var(--surface-1); color: var(--text-primary);
57
+ border-color: var(--border); font-weight: 600;
58
+ }
59
+
60
+ main {
61
+ background: var(--surface-1);
62
+ border-top: 1px solid var(--border);
63
+ padding: 18px 20px 40px;
64
+ display: grid; gap: 18px;
65
+ }
66
+
67
+ .panel {
68
+ background: var(--surface-2);
69
+ border: 1px solid var(--border);
70
+ border-radius: 10px;
71
+ padding: 14px 16px;
72
+ }
73
+ .panel h2 {
74
+ margin: 0 0 10px; font-size: 13px; font-weight: 650;
75
+ color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em;
76
+ }
77
+
78
+ /* ---- sensor grid ---- */
79
+ .modality-row { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
80
+ .modality-row .seg {
81
+ display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
82
+ }
83
+ .modality-row .seg button {
84
+ background: none; border: none; color: var(--text-secondary);
85
+ font: inherit; font-size: 13px; padding: 5px 12px; cursor: pointer;
86
+ }
87
+ .modality-row .seg button.active { background: var(--accent); color: #fff; font-weight: 600; }
88
+ .modality-row .spacer { flex: 1; }
89
+
90
+ .cam-grid {
91
+ display: grid; gap: 8px;
92
+ grid-template-columns: 1fr 1.6fr 1fr;
93
+ grid-template-areas: "left front right" "rear front tele";
94
+ }
95
+ .cam-grid.has-cosmos {
96
+ grid-template-areas: "left front right" "rear cosmos tele";
97
+ }
98
+ .cam-cell[data-cam="cosmos_front"] { grid-area: cosmos; }
99
+ /* The cameras the policy itself reads: nuPlan's for AutoVLA / Qwen-Drive,
100
+ the Hyperion captures (before the fisheye warp) for Alpamayo. */
101
+ .cam-grid.nuplan { grid-template-areas: "nl0 nf0 nr0"; }
102
+ .cam-grid.nuplan.has-cosmos { grid-template-areas: "nl0 nf0 nr0" ". cosmos ."; }
103
+ .cam-cell[data-cam="nuplan_l0"] { grid-area: nl0; }
104
+ .cam-cell[data-cam="nuplan_f0"] { grid-area: nf0; }
105
+ .cam-cell[data-cam="nuplan_r0"] { grid-area: nr0; }
106
+ .cam-cell[data-cam="nuplan_l1"] { grid-area: nl0; }
107
+ .cam-cell[data-cam="nuplan_r1"] { grid-area: nr0; }
108
+ /* SimLingo: its one camera large, the repo's front view beside it. */
109
+ .cam-grid.simlingo { grid-template-columns: 1.6fr 1fr; grid-template-areas: "sl front"; }
110
+ .cam-cell[data-cam="simlingo_f0"] { grid-area: sl; }
111
+ .cam-grid.hyperion { grid-template-areas: "hl hf hr" ". hf ht"; }
112
+ .cam-grid.hyperion.has-cosmos { grid-template-areas: "hl hf hr" ". cosmos ht"; }
113
+ .cam-cell[data-cam="hv_cross_left"] { grid-area: hl; }
114
+ .cam-cell[data-cam="hv_front_wide"] { grid-area: hf; }
115
+ .cam-cell[data-cam="hv_cross_right"] { grid-area: hr; }
116
+ .cam-cell[data-cam="hv_front_tele"] { grid-area: ht; }
117
+ .cam-cell[data-cam="cosmos_front"] .cam-label { background: rgba(217,89,38,.75); }
118
+ .cam-cell { position: relative; background: #000; border-radius: 8px; overflow: hidden; }
119
+ .cam-cell[data-cam="front"] { grid-area: front; }
120
+ .cam-cell[data-cam="left"] { grid-area: left; }
121
+ .cam-cell[data-cam="right"] { grid-area: right; }
122
+ .cam-cell[data-cam="rear"] { grid-area: rear; }
123
+ .cam-cell[data-cam="front_tele"] { grid-area: tele; }
124
+ /* LEAD's own six cameras, laid out as mounted (yaw -57.5 / 0 / +57.5 in
125
+ front, -122.5 / 180 / +122.5 behind) */
126
+ .cam-grid.lead {
127
+ grid-template-columns: 1fr 1fr 1fr;
128
+ grid-template-areas: "l0 f0 r0" "l1 b0 r1";
129
+ }
130
+ .cam-cell[data-cam="lead_l0"] { grid-area: l0; }
131
+ .cam-cell[data-cam="lead_f0"] { grid-area: f0; }
132
+ .cam-cell[data-cam="lead_r0"] { grid-area: r0; }
133
+ .cam-cell[data-cam="lead_l1"] { grid-area: l1; }
134
+ .cam-cell[data-cam="lead_b0"] { grid-area: b0; }
135
+ .cam-cell[data-cam="lead_r1"] { grid-area: r1; }
136
+ .compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
137
+ .compare-row:empty { display: none; }
138
+ .compare-row .cam-cell { aspect-ratio: auto; }
139
+ .compare-toggle { display: inline-flex; gap: 6px; align-items: center; color: var(--text-secondary); font-size: 13px; cursor: pointer; }
140
+ .cam-cell video { display: block; width: 100%; height: 100%; object-fit: contain; }
141
+ .cam-label {
142
+ position: absolute; top: 6px; left: 8px;
143
+ font-size: 11px; color: #fff; background: rgba(0,0,0,.55);
144
+ padding: 2px 7px; border-radius: 5px; letter-spacing: .03em;
145
+ }
146
+
147
+ /* ---- transport ---- */
148
+ .transport { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
149
+ .transport button.play {
150
+ width: 34px; height: 34px; border-radius: 50%;
151
+ border: 1px solid var(--border); background: var(--surface-1);
152
+ color: var(--text-primary); font-size: 14px; cursor: pointer;
153
+ }
154
+ .transport button.play:hover { border-color: var(--accent); }
155
+ .scrub-wrap { position: relative; flex: 1; height: 34px; display: flex; align-items: center; }
156
+ .scrub-wrap input[type=range] {
157
+ width: 100%; margin: 0; accent-color: var(--accent); position: relative; z-index: 2;
158
+ }
159
+ .replan-ticks { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
160
+ .replan-ticks span {
161
+ position: absolute; top: 4px; bottom: 4px; width: 2px;
162
+ background: var(--series-2); border-radius: 1px; opacity: .9;
163
+ }
164
+ .time-readout { color: var(--text-secondary); font-size: 13px; min-width: 150px; text-align: right; }
165
+ select.rate {
166
+ background: var(--surface-1); color: var(--text-secondary);
167
+ border: 1px solid var(--border); border-radius: 6px; font: inherit; padding: 4px 6px;
168
+ }
169
+
170
+ /* ---- charts ---- */
171
+ .charts-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
172
+ @media (max-width: 1100px) { .charts-row { grid-template-columns: 1fr; } }
173
+ .chart-box { position: relative; }
174
+ .chart-box svg { display: block; width: 100%; height: auto; }
175
+ .chart-legend { display: flex; gap: 16px; margin: 2px 0 6px; flex-wrap: wrap; }
176
+ .chart-legend .item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 12px; }
177
+ .chart-legend .swatch { width: 10px; height: 10px; border-radius: 3px; }
178
+ .viz-tooltip {
179
+ position: fixed; pointer-events: none; z-index: 50; display: none;
180
+ background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px;
181
+ padding: 8px 10px; font-size: 12px; color: var(--text-secondary);
182
+ box-shadow: 0 4px 16px rgba(0,0,0,.5); min-width: 120px;
183
+ }
184
+ .viz-tooltip .t-title { color: var(--text-primary); font-weight: 600; margin-bottom: 4px; }
185
+ .viz-tooltip .t-row { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
186
+ .viz-tooltip .t-row .lhs { display: inline-flex; align-items: center; gap: 6px; }
187
+ .viz-tooltip .swatch { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
188
+
189
+ /* ---- bottom row: BEV + replans ---- */
190
+ .bottom-row { display: grid; grid-template-columns: minmax(380px, 480px) 1fr; gap: 18px; align-items: start; }
191
+ @media (max-width: 1100px) { .bottom-row { grid-template-columns: 1fr; } }
192
+ #bev-canvas { width: 100%; border-radius: 8px; background: var(--surface-1); cursor: crosshair; display: block; }
193
+
194
+ .replan-cards { display: grid; gap: 8px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
195
+ .scope-note {
196
+ font-size: 12px; line-height: 1.5; margin: 0 0 10px;
197
+ padding: 8px 10px; border-radius: 6px;
198
+ border: 1px solid var(--border); background: var(--bg-elev);
199
+ color: var(--text-secondary);
200
+ }
201
+ .scope-note b { color: var(--text); }
202
+ .scope-note .cos { color: var(--accent); }
203
+ .replan-card {
204
+ border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
205
+ cursor: pointer; background: var(--surface-1);
206
+ }
207
+ .replan-card:hover { border-color: var(--text-muted); }
208
+ .replan-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
209
+ .replan-card .rc-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
210
+ .replan-card .rc-head b { font-size: 13px; }
211
+ .replan-card .rc-stat { color: var(--text-muted); font-size: 12px; }
212
+ .replan-card .rc-cot { color: var(--text-secondary); font-size: 13px; margin-top: 5px; font-style: italic; }
213
+ .replan-card .rc-out { color: var(--text-secondary); font-size: 12px; margin-top: 4px; }
214
+
215
+ .cosmos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 12px; }
216
+ .cosmos-cell { position: relative; background: #000; border-radius: 8px; overflow: hidden; }
217
+ .cosmos-cell video { display: block; width: 100%; }
218
+ .cosmos-toolbar { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
219
+ .cosmos-toolbar button {
220
+ background: var(--surface-1); border: 1px solid var(--border); color: var(--text-secondary);
221
+ font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 7px; cursor: pointer;
222
+ }
223
+ .cosmos-toolbar button:hover { border-color: var(--accent); color: var(--text-primary); }
224
+
225
+ details.config { color: var(--text-secondary); }
226
+ details.config summary { cursor: pointer; color: var(--text-secondary); font-size: 13px; }
227
+ details.config pre {
228
+ white-space: pre-wrap; font-size: 12px; color: var(--text-muted);
229
+ background: var(--surface-1); border-radius: 8px; padding: 10px 12px; margin: 8px 0 0;
230
+ }
231
+ .instruction {
232
+ border-left: 3px solid var(--series-2); padding: 4px 12px; margin: 0 0 12px;
233
+ color: var(--text-secondary); font-size: 13px;
234
+ }
235
+ .hint { color: var(--text-muted); font-size: 12px; }
236
+ .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 13px; color: var(--text-secondary); }
237
+ .facts b { color: var(--text-primary); font-weight: 600; }
238
+ .scene-doc {
239
+ white-space: pre-wrap; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
240
+ color: var(--text-secondary); background: var(--surface-1); border-radius: 8px;
241
+ padding: 10px 12px; margin: 0 0 12px;
242
+ }
243
+ .scene-doc:empty { display: none; }
244
+ .panel-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
245
+ .panel-head h2 { margin: 0; }
246
+ .panel-head .spacer { flex: 1; }
247
+ </style>
248
+ </head>
249
+ <body>
250
+ <header>
251
+ <h1>SceneDriveBench · Dualworld Suite</h1>
252
+ <span class="suite-id num" id="suite-id"></span>
253
+ </header>
254
+ <nav class="tabs" id="scenario-tabs"></nav>
255
+
256
+ <main>
257
+ <div class="panel" id="scenario-info">
258
+ <div class="facts" id="facts"></div>
259
+ <pre class="scene-doc" id="scene-doc"></pre>
260
+ <p id="evaluation-status"></p>
261
+ <div class="instruction" id="instruction"></div>
262
+ <details class="config">
263
+ <summary>Run configuration &amp; Cosmos prompt</summary>
264
+ <pre id="config-pre"></pre>
265
+ </details>
266
+ </div>
267
+
268
+ <div class="panel">
269
+ <h2>Synchronized sensors</h2>
270
+ <div class="modality-row">
271
+ <div class="seg" id="modality-seg"></div>
272
+ <div class="seg" id="camset-seg"></div>
273
+ <label class="compare-toggle" id="compare-wrap" style="display:none">
274
+ <input type="checkbox" id="compare"> <span id="compare-label"></span>
275
+ </label>
276
+ <div class="spacer"></div>
277
+ <span class="hint" id="ticks-hint">orange markers on the timeline are Cosmos+policy replans</span>
278
+ </div>
279
+ <div class="cam-grid" id="cam-grid"></div>
280
+ <div class="compare-row" id="compare-row"></div>
281
+ <div class="transport">
282
+ <button class="play" id="btn-play" title="play / pause">▶</button>
283
+ <div class="scrub-wrap">
284
+ <div class="replan-ticks" id="replan-ticks"></div>
285
+ <input type="range" id="scrub" min="0" max="1000" value="0" step="1">
286
+ </div>
287
+ <span class="time-readout num" id="time-readout">frame 0 · t = 0.0 s</span>
288
+ <select class="rate" id="rate">
289
+ <option value="0.25">0.25×</option>
290
+ <option value="0.5">0.5×</option>
291
+ <option value="1" selected>1×</option>
292
+ <option value="2">2×</option>
293
+ </select>
294
+ </div>
295
+ </div>
296
+
297
+ <div class="charts-row">
298
+ <div class="panel">
299
+ <h2>Vehicle controls</h2>
300
+ <div class="chart-legend" id="controls-legend"></div>
301
+ <div class="chart-box" id="controls-chart"></div>
302
+ </div>
303
+ <div class="panel">
304
+ <h2>Ego speed (m/s)</h2>
305
+ <div class="chart-legend" id="speed-legend"></div>
306
+ <div class="chart-box" id="speed-chart"></div>
307
+ </div>
308
+ </div>
309
+
310
+ <div class="bottom-row">
311
+ <div class="panel">
312
+ <div class="panel-head">
313
+ <h2>Bird's-eye view</h2>
314
+ <span class="spacer"></span>
315
+ <div class="modality-row" style="margin:0"><div class="seg" id="bev-mode"></div></div>
316
+ </div>
317
+ <div class="chart-legend" id="bev-legend"></div>
318
+ <canvas id="bev-canvas"></canvas>
319
+ <div class="hint" style="margin-top:6px" id="bev-hint"></div>
320
+ </div>
321
+ <div class="panel">
322
+ <h2>Replans — policy output &amp; Cosmos</h2>
323
+ <!-- Only the views in cosmos_views are rendered through Cosmos; the rest
324
+ of the policy's cameras are raw CARLA. This panel shows Cosmos
325
+ artifacts, which exist only for the rendered views, so without this
326
+ note the page reads as if the whole world were photoreal. -->
327
+ <div id="cosmos-scope" class="scope-note" style="display:none"></div>
328
+ <div class="replan-cards" id="replan-cards"></div>
329
+ <div class="cosmos-toolbar" id="cosmos-toolbar" style="display:none">
330
+ <button id="cosmos-play">▶ play all</button>
331
+ <button id="cosmos-restart">⟲ restart</button>
332
+ <span class="hint">looping 4 s Cosmos window for the selected replan</span>
333
+ </div>
334
+ <div class="cosmos-grid" id="cosmos-grid"></div>
335
+ </div>
336
+ </div>
337
+ </main>
338
+
339
+ <div class="viz-tooltip" id="tooltip"></div>
340
+
341
+ <script src="viewer_data.js"></script>
342
+ <script>
343
+ "use strict";
344
+
345
+ window.addEventListener("error", e => {
346
+ const b = document.createElement("pre");
347
+ b.style.cssText = "color:#e66767;background:#1a1a19;padding:10px 16px;margin:0;white-space:pre-wrap";
348
+ b.textContent = `viewer error: ${e.message} (${e.filename}:${e.lineno})`;
349
+ document.body.prepend(b);
350
+ });
351
+
352
+ /* ============================== state ============================== */
353
+ const S = {
354
+ data: null,
355
+ scen: null, // active scenario object
356
+ modality: null, // null = the scenario's first (a LEAD run's own cameras)
357
+ compare: false, // show the other arm of the same scene alongside
358
+ bevFollow: false, // BEV: follow ego at 60 m instead of fitting the episode
359
+ playing: false,
360
+ videos: {}, // cam -> <video>
361
+ master: null, // master <video>
362
+ selectedReplan: null,
363
+ charts: [], // {update(tSec)} cursor updaters
364
+ };
365
+ const CAMS = ["left", "front", "right", "rear", "front_tele"];
366
+ const LEAD_CAMS = ["lead_l0", "lead_f0", "lead_r0", "lead_l1", "lead_b0", "lead_r1"];
367
+ const CAM_LABELS = { simlingo_f0: "SIMLINGO INPUT (its only camera)", front: "FRONT (CARLA)", front_tele: "FRONT TELE", left: "LEFT", right: "RIGHT", rear: "REAR",
368
+ cosmos_front: "FRONT · COSMOS (policy input)",
369
+ nuplan_f0: "NUPLAN F0 · FRONT (policy)", nuplan_l0: "NUPLAN L0 · FRONT-LEFT",
370
+ nuplan_r0: "NUPLAN R0 · FRONT-RIGHT", nuplan_l1: "NUPLAN L1 · LEFT",
371
+ nuplan_r1: "NUPLAN R1 · RIGHT",
372
+ hv_front_wide: "FRONT WIDE (policy, before fisheye)", hv_cross_left: "CROSS LEFT",
373
+ hv_cross_right: "CROSS RIGHT", hv_front_tele: "FRONT TELE",
374
+ lead_f0: "LEAD F0 · FRONT", lead_l0: "L0 · FRONT-LEFT", lead_r0: "R0 · FRONT-RIGHT",
375
+ lead_l1: "L1 · REAR-LEFT", lead_b0: "B0 · REAR", lead_r1: "R1 · REAR-RIGHT" };
376
+ const MOD_LABELS = { lead: "LEAD input", rgb: "RGB", depth: "Depth", semseg: "SemSeg" };
377
+ // Replan markers are drawn only when sparse: LEAD replans every tick, and
378
+ // 140 markers paint the whole timeline orange.
379
+ const replanMarks = sc => sc.replans.length <= 40 ? sc.replans : [];
380
+ const sibling = sc => S.data.scenarios.find(o => o !== sc && o.group === sc.group &&
381
+ o.arm !== sc.arm && o.policy === sc.policy && o.seed === sc.seed) || null;
382
+ const armName = sc => `${sc.arm || "?"}${sc.arm_label ? ` (arm ${sc.arm_label})` : ""}`;
383
+ const COSMOS_LABELS = {
384
+ input: "sim input (CARLA)", restored: "Cosmos + exact restore (policy input)",
385
+ generation: "Cosmos raw (pre-restore)", mask_guided: "mask-guided gen",
386
+ control_vis: "control overlay", control_edge: "edge control", control_depth: "depth control",
387
+ control_seg: "seg control",
388
+ };
389
+ const css = name => getComputedStyle(document.documentElement).getPropertyValue(name).trim();
390
+ const $ = id => document.getElementById(id);
391
+ const el = (tag, attrs = {}, ...kids) => {
392
+ const n = document.createElement(tag);
393
+ for (const [k, v] of Object.entries(attrs)) {
394
+ if (k === "class") n.className = v;
395
+ else if (k.startsWith("on")) n.addEventListener(k.slice(2), v);
396
+ else n.setAttribute(k, v);
397
+ }
398
+ n.append(...kids);
399
+ return n;
400
+ };
401
+ const fmt = (v, nd = 1) => v == null ? "–" : Number(v).toFixed(nd);
402
+ // Where the videos live. Empty when served from the suite directory; a host
403
+ // that keeps the page apart from its media (the HF gallery streams videos from
404
+ // the dataset) sets window.VIEWER_MEDIA_BASE before this script runs.
405
+ const media = p => /^(https?:)?\/\//.test(p) ? p : (window.VIEWER_MEDIA_BASE || "") + p;
406
+ // A run's heavy fields (actors, map, controls, ego, replans) live in its own file, sc.detail
407
+ // (viewer_runs/<run>.json), fetched when the run is opened: the page loads the run list alone.
408
+ // Older suites carry them inline (no sc.detail) and need no fetch.
409
+ const DETAIL = {};
410
+ const loadDetail = sc => {
411
+ if (!sc || !sc.detail || sc._detail) return Promise.resolve(sc);
412
+ if (!DETAIL[sc.name]) DETAIL[sc.name] = fetch(media(sc.detail))
413
+ .then(r => { if (!r.ok) throw new Error(`${sc.detail}: HTTP ${r.status}`); return r.json(); })
414
+ .then(d => { Object.assign(sc, d); sc._detail = true; return sc; })
415
+ .catch(err => { delete DETAIL[sc.name]; throw err; });
416
+ return DETAIL[sc.name];
417
+ };
418
+
419
+ /* ============================== boot ============================== */
420
+ window.addEventListener("DOMContentLoaded", () => {
421
+ if (!window.VIEWER_DATA) {
422
+ document.querySelector("main").innerHTML =
423
+ `<div class="panel">Failed to load <code>viewer_data.js</code> — run build.py on this suite directory.</div>`;
424
+ return;
425
+ }
426
+ S.data = window.VIEWER_DATA;
427
+ $("suite-id").textContent = S.data.suite;
428
+ const tabs = $("scenario-tabs");
429
+ S.data.scenarios.forEach((sc, i) => {
430
+ const label = sc.group ? `${sc.group.replaceAll("_", " ")} · ${armName(sc)}` : sc.name.replaceAll("_", " ");
431
+ tabs.append(el("button", { onclick: () => selectScenario(i), title: sc.name }, label));
432
+ });
433
+ // deep link: ?scenario=<name|index>&replan=<t0>&compare=1&bev=follow&t=<s>
434
+ const q = new URLSearchParams(location.search);
435
+ S.compare = q.get("compare") === "1";
436
+ S.bevFollow = q.get("bev") === "follow";
437
+ const want = q.get("scenario");
438
+ let idx = 0;
439
+ if (want != null) {
440
+ const byName = S.data.scenarios.findIndex(s => s.name === want);
441
+ idx = byName >= 0 ? byName : (parseInt(want, 10) || 0);
442
+ }
443
+ selectScenario(Math.max(0, Math.min(S.data.scenarios.length - 1, idx))).then(shown => {
444
+ if (!shown) return;
445
+ const t0 = q.get("replan");
446
+ if (t0 != null) {
447
+ const r = S.scen.replans.find(r => String(r.t0) === t0);
448
+ const card = document.querySelectorAll(".replan-card")[S.scen.replans.indexOf(r)];
449
+ if (r && card) selectReplan(r, card);
450
+ }
451
+ const t = parseFloat(q.get("t"));
452
+ if (t > 0) { seekAll(t); updateAtTime(t); }
453
+ });
454
+ });
455
+
456
+ let selecting = 0; // the latest selection wins over one still loading
457
+ async function selectScenario(i) {
458
+ const ticket = ++selecting;
459
+ const sc = S.data.scenarios[i];
460
+ document.querySelectorAll("#scenario-tabs button").forEach((b, j) => b.classList.toggle("active", j === i));
461
+ const status = $("suite-id");
462
+ try {
463
+ if (sc.detail && !sc._detail) status.textContent = `${S.data.suite} · loading ${sc.name}…`;
464
+ await Promise.all([loadDetail(sc), loadDetail(sibling(sc))]);
465
+ } catch (err) {
466
+ if (ticket === selecting) status.textContent = `${S.data.suite} · could not load ${sc.name}: ${err.message}`;
467
+ return false;
468
+ }
469
+ if (ticket !== selecting) return false;
470
+ status.textContent = S.data.suite;
471
+ S.scen = sc;
472
+ S.selectedReplan = null;
473
+ renderInfo();
474
+ renderModalitySeg();
475
+ renderCamSetSeg();
476
+ renderCompareToggle();
477
+ renderCamGrid();
478
+ renderReplanTicks();
479
+ renderCharts();
480
+ renderBEVLegend();
481
+ renderReplans();
482
+ updateAtTime(0);
483
+ // the next run in the list is likely the next one opened
484
+ const next = S.data.scenarios[i + 1];
485
+ if (next) setTimeout(() => { loadDetail(next).catch(() => {}); loadDetail(sibling(next)).catch(() => {}); }, 500);
486
+ return true;
487
+ }
488
+
489
+ /* ============================== info ============================== */
490
+ function renderInfo() {
491
+ const sc = S.scen;
492
+ const facts = $("facts");
493
+ facts.innerHTML = "";
494
+ const fact = (k, v) => v != null && v !== "" && facts.append(el("span", {}, `${k} `, el("b", {}, String(v))));
495
+ fact("policy", sc.policy);
496
+ fact("town", sc.map && sc.map.town);
497
+ fact("jurisdiction", armName(sc));
498
+ if (sc.countries && sc.countries.length === 2) fact("arms", `A = ${sc.countries[0]} · B = ${sc.countries[1]}`);
499
+ fact("seed", sc.seed);
500
+ fact("length", `${(sc.num_frames / sc.fps).toFixed(1)} s`);
501
+ fact("ended", sc.execution && sc.execution.termination_reason);
502
+ if (sc.interference) fact("background", sc.interference.valid ? "no interference"
503
+ : `INTERFERED (${sc.interference.events.map(e => e.kind === "contact"
504
+ ? `${e.type} touched ego at ${e.at_s} s` : `${e.type} in ego's path ${e.from_s}-${e.to_s} s`).join("; ")})`);
505
+ if (sc.scene_instruction && sc.scene_instruction.mode !== "none") fact("text", sc.scene_instruction.mode);
506
+ const seen = (sc.map && sc.map.sign_visibility) || {};
507
+ for (const [sid, views] of Object.entries(seen)) {
508
+ const parts = Object.entries(views).map(([v, n]) => `${v} ${n}`).join(", ");
509
+ fact(`plate ${sid}`, parts ? `visible frames: ${parts}` : "never visible");
510
+ }
511
+ if (sc.map && !Object.keys(seen).length) fact("plates", "none");
512
+ $("scene-doc").textContent = sc.scene_doc || "";
513
+ $("evaluation-status").textContent = sc.evaluation_status || "Run validity not recorded";
514
+ $("instruction").textContent = sc.instruction || "(no policy instruction recorded)";
515
+ const cfg = { ...sc.config };
516
+ const prompt = cfg.prompt; delete cfg.prompt;
517
+ $("config-pre").textContent =
518
+ Object.entries(cfg).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join("\n") +
519
+ (prompt ? `\n\nprompt: ${prompt}` : "");
520
+ renderCosmosScope(sc);
521
+ }
522
+
523
+ // The policy reads every camera on its rig, but only the views in cosmos_views
524
+ // are rendered through Cosmos -- the others are handed to it as raw CARLA.
525
+ // Say so on the page: this panel shows Cosmos artifacts, which exist only for
526
+ // the rendered views, and without this the viewer reads as though the whole
527
+ // world were photoreal.
528
+ const POLICY_RIG_CAMERAS = ["left", "front", "right", "front_tele"];
529
+ function renderCosmosScope(sc) {
530
+ const el = $("cosmos-scope");
531
+ if (!el) return;
532
+ const cfg = sc.config || {};
533
+ // cosmos_views is populated even when Cosmos never ran (LEAD reads raw CARLA
534
+ // by design), so cosmos_enabled is the field that decides, not the view list.
535
+ if (cfg.cosmos_enabled === false) {
536
+ el.innerHTML = "<b>No Cosmos rendering in this suite.</b> The policy read " +
537
+ "raw CARLA frames on every camera — LEAD has no text channel and takes " +
538
+ "simulator pixels by design, so there is no photoreal condition here.";
539
+ el.style.display = "";
540
+ return;
541
+ }
542
+ const views = cfg.cosmos_views;
543
+ if (!Array.isArray(views) || views.length === 0) {
544
+ el.style.display = "none"; return;
545
+ }
546
+ const raw = POLICY_RIG_CAMERAS.filter(c => !views.includes(c));
547
+ const cos = views.map(v => `<span class="cos">${v}</span>`).join(", ");
548
+ el.innerHTML = raw.length
549
+ ? `<b>Cosmos covers ${views.length} of ${POLICY_RIG_CAMERAS.length} policy cameras.</b> ` +
550
+ `Rendered through Cosmos: ${cos}. Handed to the policy as raw CARLA: ` +
551
+ `${raw.join(", ")}. The panels below show only the rendered view(s), ` +
552
+ `so this page is not evidence the policy drove in a fully photoreal world.`
553
+ : `<b>All ${views.length} policy cameras rendered through Cosmos.</b>`;
554
+ el.style.display = "";
555
+ }
556
+
557
+ /* ============================== sensor grid ============================== */
558
+ function renderModalitySeg() {
559
+ const seg = $("modality-seg");
560
+ seg.innerHTML = "";
561
+ if (!S.scen.videos[S.modality]) S.modality = Object.keys(S.scen.videos)[0];
562
+ for (const mod of Object.keys(S.scen.videos)) {
563
+ seg.append(el("button", {
564
+ class: mod === S.modality ? "active" : "",
565
+ onclick: () => { S.modality = mod; renderModalitySeg(); renderCamGrid(); },
566
+ }, MOD_LABELS[mod] || mod));
567
+ }
568
+ }
569
+
570
+ // Which cameras the grid shows: by default the ones the policy itself reads;
571
+ // "standard" is the repo's own front / left / right / rear / tele.
572
+ function camLayout(sc, vids) {
573
+ // SimLingo reads one camera, its own; the repo's views are for orientation only.
574
+ if (vids.simlingo_f0 && sc.policy === "simlingo")
575
+ return { cls: "simlingo", cams: ["simlingo_f0", "front"], main: "simlingo_f0" };
576
+ if (S.camSet !== "standard") {
577
+ if (vids.nuplan_f0 && (sc.policy === "autovla" || sc.policy === "qwendrive")) {
578
+ // AutoVLA reads the side cameras L1/R1 (runs since 2026-10-18), Qwen-Drive L0/R0.
579
+ const side = sc.policy === "autovla" && vids.nuplan_l1 ? "1" : "0";
580
+ return { cls: "nuplan", cams: ["nuplan_l" + side, "nuplan_f0", "nuplan_r" + side], main: "nuplan_f0" };
581
+ }
582
+ if (vids.hv_front_wide && (sc.policy === "alpamayo" || sc.policy === "alpamayo2"))
583
+ return { cls: "hyperion", main: "hv_front_wide",
584
+ cams: ["hv_cross_left", "hv_front_wide", "hv_cross_right", "hv_front_tele"] };
585
+ }
586
+ return { cls: "", cams: CAMS, main: "front" };
587
+ }
588
+ function renderCamSetSeg() {
589
+ const seg = $("camset-seg");
590
+ seg.innerHTML = "";
591
+ for (const [key, label] of [["policy", "Policy cameras"], ["standard", "Standard cameras"]]) {
592
+ seg.append(el("button", {
593
+ class: (S.camSet || "policy") === key ? "active" : "",
594
+ onclick: () => { S.camSet = key; renderCamSetSeg(); renderCamGrid(); },
595
+ }, label));
596
+ }
597
+ }
598
+
599
+ function renderCompareToggle() {
600
+ const sib = sibling(S.scen);
601
+ $("compare-wrap").style.display = sib ? "" : "none";
602
+ if (sib) $("compare-label").textContent = `compare with ${armName(sib)}`;
603
+ $("compare").checked = S.compare && !!sib;
604
+ }
605
+ $("compare").addEventListener("change", () => {
606
+ S.compare = $("compare").checked;
607
+ renderCamGrid(); renderCharts(); renderBEVLegend();
608
+ updateAtTime(S.master ? S.master.currentTime : 0);
609
+ });
610
+
611
+ function renderCamGrid() {
612
+ const grid = $("cam-grid");
613
+ const wasTime = S.master ? S.master.currentTime : 0;
614
+ const wasPlaying = S.playing;
615
+ pauseAll();
616
+ grid.innerHTML = "";
617
+ S.videos = {}; S.master = null;
618
+ const vids = { ...(S.scen.videos[S.modality] || {}) };
619
+ const lead = S.modality === "lead";
620
+ const layout = lead ? { cls: "", cams: LEAD_CAMS, main: "lead_f0" } : camLayout(S.scen, vids);
621
+ const mainCam = layout.main;
622
+ // the stitched Cosmos render of the view the policy reads (front, nuPlan F0
623
+ // or Hyperion front wide) rides along in every modality, below that camera
624
+ const cosmos = S.scen.cosmos_stitched || {};
625
+ const cosKey = ["front", "nuplan_f0", "ft_front_wide"].find(k => cosmos[k]) || Object.keys(cosmos)[0];
626
+ if (cosKey && !lead) vids.cosmos_front = cosmos[cosKey];
627
+ CAM_LABELS.cosmos_front = `COSMOS · ${cosKey || "front"} (policy input)`;
628
+ grid.classList.toggle("has-cosmos", !!cosKey && !lead);
629
+ grid.classList.toggle("lead", lead);
630
+ grid.classList.toggle("nuplan", layout.cls === "nuplan");
631
+ grid.classList.toggle("hyperion", layout.cls === "hyperion");
632
+ grid.classList.toggle("simlingo", layout.cls === "simlingo");
633
+ const addVideo = (parent, key, src, label) => {
634
+ // only the main camera downloads up front; the others stream when played
635
+ const v = el("video", { src: media(src), preload: key === mainCam ? "auto" : "metadata", muted: "", playsinline: "" });
636
+ parent.append(el("div", { class: "cam-cell", "data-cam": key }, v, el("span", { class: "cam-label" }, label)));
637
+ S.videos[key] = v;
638
+ return v;
639
+ };
640
+ for (const cam of [...layout.cams, "cosmos_front"]) {
641
+ if (!vids[cam]) continue;
642
+ const v = addVideo(grid, cam, vids[cam], CAM_LABELS[cam] || cam);
643
+ if (!S.master) S.master = v;
644
+ if (cam === mainCam) S.master = v;
645
+ }
646
+ // the same camera of the other arm, side by side: identical scenes should
647
+ // drive identically unless the arms differ in what the policy can see
648
+ const row = $("compare-row");
649
+ row.innerHTML = "";
650
+ const sib = S.compare ? sibling(S.scen) : null;
651
+ const sibSrc = sib && (sib.videos[S.modality] || {})[mainCam];
652
+ if (sibSrc && vids[mainCam]) {
653
+ addVideo(row, "cmp_self", vids[mainCam], `${armName(S.scen)} · ${CAM_LABELS[mainCam]}`);
654
+ addVideo(row, "cmp_other", sibSrc, `${armName(sib)} · ${CAM_LABELS[mainCam]}`);
655
+ }
656
+ if (S.master) {
657
+ S.master.addEventListener("timeupdate", onMasterTick);
658
+ S.master.addEventListener("ended", () => setPlaying(false));
659
+ // 1 ms offset forces the browser to decode and paint the first frame
660
+ for (const v of Object.values(S.videos)) v.currentTime = Math.max(wasTime, 0.001);
661
+ if (wasPlaying) setPlaying(true);
662
+ }
663
+ applyRate();
664
+ }
665
+
666
+ function setPlaying(on) {
667
+ S.playing = on;
668
+ $("btn-play").textContent = on ? "❚❚" : "▶";
669
+ for (const v of Object.values(S.videos)) on ? v.play().catch(() => {}) : v.pause();
670
+ }
671
+ function pauseAll() { for (const v of Object.values(S.videos)) v.pause(); }
672
+ function seekAll(t) {
673
+ for (const v of Object.values(S.videos)) {
674
+ if (Math.abs(v.currentTime - t) > 0.04) v.currentTime = t;
675
+ }
676
+ }
677
+ function applyRate() {
678
+ const r = parseFloat($("rate").value);
679
+ for (const v of Object.values(S.videos)) v.playbackRate = r;
680
+ }
681
+ $("rate").addEventListener("change", applyRate);
682
+ $("btn-play").addEventListener("click", () => {
683
+ if (S.master && S.master.ended) seekAll(0);
684
+ setPlaying(!S.playing);
685
+ });
686
+ $("scrub").addEventListener("input", () => {
687
+ if (!S.scen) return;
688
+ const dur = S.scen.num_frames / S.scen.fps;
689
+ const t = ($("scrub").value / 1000) * dur;
690
+ seekAll(t);
691
+ updateAtTime(t);
692
+ });
693
+ document.addEventListener("keydown", e => {
694
+ if (e.target.tagName === "INPUT" || e.target.tagName === "SELECT") return;
695
+ if (e.code === "Space") { e.preventDefault(); $("btn-play").click(); }
696
+ if (e.code === "ArrowRight" || e.code === "ArrowLeft") {
697
+ const dt = (e.code === "ArrowRight" ? 1 : -1) / (S.scen ? S.scen.fps : 10);
698
+ const t = Math.max(0, (S.master ? S.master.currentTime : 0) + dt);
699
+ seekAll(t); updateAtTime(t);
700
+ }
701
+ });
702
+
703
+ function onMasterTick() {
704
+ const t = S.master.currentTime;
705
+ // keep followers in lockstep with the master clock
706
+ for (const [cam, v] of Object.entries(S.videos)) {
707
+ if (v !== S.master && Math.abs(v.currentTime - t) > 0.1) v.currentTime = t;
708
+ }
709
+ updateAtTime(t);
710
+ }
711
+
712
+ function updateAtTime(t) {
713
+ const sc = S.scen;
714
+ const dur = sc.num_frames / sc.fps;
715
+ const frame = Math.min(sc.num_frames - 1, Math.round(t * sc.fps));
716
+ $("scrub").value = Math.round((t / dur) * 1000);
717
+ $("time-readout").textContent = `frame ${frame} / ${sc.num_frames} · t = ${t.toFixed(1)} s`;
718
+ for (const ch of S.charts) ch.update(t);
719
+ drawBEV(frame);
720
+ }
721
+
722
+ function renderReplanTicks() {
723
+ const box = $("replan-ticks");
724
+ box.innerHTML = "";
725
+ const dur = S.scen.num_frames / S.scen.fps;
726
+ const marks = replanMarks(S.scen);
727
+ $("ticks-hint").style.display = marks.length ? "" : "none";
728
+ for (const r of marks) {
729
+ const pct = (r.t0 / S.scen.fps) / dur * 100;
730
+ box.append(el("span", { style: `left:${pct}%`, title: `replan @ frame ${r.t0}` }));
731
+ }
732
+ }
733
+
734
+ /* ============================== line charts ============================== */
735
+ function niceTicks(y0, y1, n = 4) {
736
+ const raw = (y1 - y0) / n;
737
+ const mag = Math.pow(10, Math.floor(Math.log10(raw)));
738
+ const norm = raw / mag;
739
+ const step = mag * (norm < 1.5 ? 1 : norm < 3 ? 2 : norm < 7 ? 5 : 10);
740
+ const hi = Math.ceil(y1 / step) * step;
741
+ const ticks = [];
742
+ for (let v = Math.floor(y0 / step) * step; v <= hi + 1e-9; v += step) ticks.push(+v.toFixed(6));
743
+ return { ticks, hi };
744
+ }
745
+
746
+ function lineChart(container, opts) {
747
+ // opts: {series:[{name,color,x[],y[]}], yDomain:[lo,hi], xDomain:[lo,hi], height, yFmt, legendEl}
748
+ const W = 640, H = opts.height || 200;
749
+ const M = { l: 42, r: 74, t: 10, b: 24 };
750
+ const [x0, x1] = opts.xDomain;
751
+ let [y0, y1] = opts.yDomain;
752
+ let yTickVals;
753
+ if (opts.niceY) {
754
+ const nt = niceTicks(y0, y1, opts.yTicks || 4);
755
+ y1 = nt.hi; yTickVals = nt.ticks;
756
+ } else {
757
+ const n = opts.yTicks || 4;
758
+ yTickVals = Array.from({ length: n + 1 }, (_, i) => y0 + (y1 - y0) * i / n);
759
+ }
760
+ const px = x => M.l + (x - x0) / (x1 - x0) * (W - M.l - M.r);
761
+ const py = y => M.t + (1 - (y - y0) / (y1 - y0)) * (H - M.t - M.b);
762
+ const ns = "http://www.w3.org/2000/svg";
763
+ const svg = document.createElementNS(ns, "svg");
764
+ svg.setAttribute("viewBox", `0 0 ${W} ${H}`);
765
+ container.innerHTML = "";
766
+ container.append(svg);
767
+ const add = (tag, attrs, parent = svg) => {
768
+ const n = document.createElementNS(ns, tag);
769
+ for (const [k, v] of Object.entries(attrs)) n.setAttribute(k, v);
770
+ parent.append(n);
771
+ return n;
772
+ };
773
+
774
+ // recessive grid + axes
775
+ for (const yv of yTickVals) {
776
+ add("line", { x1: M.l, x2: W - M.r, y1: py(yv), y2: py(yv), stroke: css("--grid"), "stroke-width": 1 });
777
+ add("text", {
778
+ x: M.l - 6, y: py(yv) + 4, "text-anchor": "end", fill: css("--text-muted"),
779
+ "font-size": 11, style: "font-variant-numeric: tabular-nums",
780
+ }).textContent = (opts.yFmt || (v => v))(yv);
781
+ }
782
+ for (let xv = Math.ceil(x0); xv <= x1; xv += 2) {
783
+ add("text", {
784
+ x: px(xv), y: H - 8, "text-anchor": "middle", fill: css("--text-muted"),
785
+ "font-size": 11, style: "font-variant-numeric: tabular-nums",
786
+ }).textContent = xv + " s";
787
+ }
788
+ if (y0 < 0 && y1 > 0)
789
+ add("line", { x1: M.l, x2: W - M.r, y1: py(0), y2: py(0), stroke: css("--baseline"), "stroke-width": 1 });
790
+
791
+ // replan markers
792
+ for (const r of (opts.replans || [])) {
793
+ const xr = px(r.t0 / S.scen.fps);
794
+ add("line", { x1: xr, x2: xr, y1: M.t, y2: H - M.b, stroke: css("--series-2"), "stroke-width": 1, "stroke-dasharray": "3 3", opacity: .6 });
795
+ }
796
+
797
+ // series: 2px lines + direct labels at line end (pushed apart if they collide)
798
+ const endLabels = [];
799
+ for (const s of opts.series) {
800
+ const d = s.x.map((xv, i) => `${i ? "L" : "M"}${px(xv).toFixed(1)},${py(s.y[i]).toFixed(1)}`).join("");
801
+ add("path", { d, fill: "none", stroke: s.color, "stroke-width": 2, "stroke-linejoin": "round",
802
+ ...(s.dash ? { "stroke-dasharray": s.dash } : {}) });
803
+ endLabels.push({ name: s.name, x: px(s.x[s.x.length - 1]) + 6, y: py(s.y[s.y.length - 1]) + 4 });
804
+ }
805
+ // clamp to the plot first, then push colliding labels apart upward from the
806
+ // bottom -- clamping after pushing stacked lines that all end at 0
807
+ for (const L of endLabels) L.y = Math.min(L.y, H - M.b);
808
+ endLabels.sort((a, b) => a.y - b.y);
809
+ for (let i = endLabels.length - 2; i >= 0; i--)
810
+ if (endLabels[i + 1].y - endLabels[i].y < 13) endLabels[i].y = endLabels[i + 1].y - 13;
811
+ for (const L of endLabels)
812
+ add("text", { x: L.x, y: L.y, fill: css("--text-secondary"), "font-size": 11 })
813
+ .textContent = L.name;
814
+
815
+ // legend (only for multi-series)
816
+ if (opts.legendEl) {
817
+ opts.legendEl.innerHTML = "";
818
+ if (opts.series.length > 1)
819
+ for (const s of opts.series)
820
+ opts.legendEl.append(el("span", { class: "item" },
821
+ el("span", { class: "swatch", style: `background:${s.color}` }), s.name));
822
+ }
823
+
824
+ // playback cursor + crosshair/tooltip
825
+ const cursor = add("line", { x1: px(x0), x2: px(x0), y1: M.t, y2: H - M.b, stroke: css("--text-secondary"), "stroke-width": 1, opacity: .8 });
826
+ const cross = add("line", { x1: 0, x2: 0, y1: M.t, y2: H - M.b, stroke: css("--text-muted"), "stroke-width": 1, opacity: 0 });
827
+ const dots = opts.series.map(s => add("circle", { r: 4, fill: s.color, stroke: css("--surface-2"), "stroke-width": 2, opacity: 0 }));
828
+ const tip = $("tooltip");
829
+
830
+ svg.addEventListener("mousemove", ev => {
831
+ const pt = svg.createSVGPoint(); pt.x = ev.clientX; pt.y = ev.clientY;
832
+ const p = pt.matrixTransform(svg.getScreenCTM().inverse());
833
+ if (p.x < M.l || p.x > W - M.r) { hideTip(); return; }
834
+ const tx = x0 + (p.x - M.l) / (W - M.l - M.r) * (x1 - x0);
835
+ cross.setAttribute("x1", px(tx)); cross.setAttribute("x2", px(tx));
836
+ cross.setAttribute("opacity", .8);
837
+ let rows = "";
838
+ opts.series.forEach((s, i) => {
839
+ let k = s.x.findIndex(v => v >= tx);
840
+ if (k < 0) k = s.x.length - 1;
841
+ if (k > 0 && Math.abs(s.x[k - 1] - tx) < Math.abs(s.x[k] - tx)) k--;
842
+ dots[i].setAttribute("cx", px(s.x[k])); dots[i].setAttribute("cy", py(s.y[k]));
843
+ dots[i].setAttribute("opacity", 1);
844
+ rows += `<div class="t-row"><span class="lhs"><span class="swatch" style="background:${s.color}"></span>${s.name}</span><b class="num">${(opts.yFmt || (v => v))(s.y[k])}</b></div>`;
845
+ });
846
+ tip.innerHTML = `<div class="t-title num">t = ${tx.toFixed(1)} s</div>${rows}`;
847
+ tip.style.display = "block";
848
+ tip.style.left = Math.min(window.innerWidth - 190, ev.clientX + 14) + "px";
849
+ tip.style.top = (ev.clientY + 14) + "px";
850
+ });
851
+ const hideTip = () => {
852
+ tip.style.display = "none"; cross.setAttribute("opacity", 0);
853
+ dots.forEach(d => d.setAttribute("opacity", 0));
854
+ };
855
+ svg.addEventListener("mouseleave", hideTip);
856
+ svg.addEventListener("click", ev => {
857
+ const pt = svg.createSVGPoint(); pt.x = ev.clientX; pt.y = ev.clientY;
858
+ const p = pt.matrixTransform(svg.getScreenCTM().inverse());
859
+ const tx = x0 + (p.x - M.l) / (W - M.l - M.r) * (x1 - x0);
860
+ if (tx >= x0 && tx <= x1) { seekAll(tx); updateAtTime(tx); }
861
+ });
862
+
863
+ return {
864
+ update(tSec) {
865
+ const xv = Math.max(x0, Math.min(x1, tSec));
866
+ cursor.setAttribute("x1", px(xv)); cursor.setAttribute("x2", px(xv));
867
+ },
868
+ };
869
+ }
870
+
871
+ function renderCharts() {
872
+ S.charts = [];
873
+ const sc = S.scen;
874
+ const dur = sc.num_frames / sc.fps;
875
+ const tOf = tick => tick / sc.fps;
876
+
877
+ const ctl = sc.controls;
878
+ const cx = ctl.map(c => tOf(c.tick));
879
+ S.charts.push(lineChart($("controls-chart"), {
880
+ xDomain: [0, dur], yDomain: [-1, 1], yTicks: 4, height: 210,
881
+ yFmt: v => Number(v).toFixed(2),
882
+ legendEl: $("controls-legend"),
883
+ replans: replanMarks(sc),
884
+ series: [
885
+ { name: "throttle", color: css("--series-1"), x: cx, y: ctl.map(c => c.throttle) },
886
+ { name: "brake", color: css("--series-2"), x: cx, y: ctl.map(c => c.brake) },
887
+ { name: "steer", color: css("--series-3"), x: cx, y: ctl.map(c => c.steer) },
888
+ ],
889
+ }));
890
+
891
+ const ego = sc.ego;
892
+ const series = [
893
+ { name: "speed", color: css("--series-1"), x: ego.frame.map(f => f / sc.fps), y: ego.speed },
894
+ ];
895
+ // the speed LEAD's planner asked for at each tick: where it falls to zero
896
+ // ahead of the actual speed, the stop was the policy's decision
897
+ const tgt = sc.replans.filter(r => r.target_speed != null);
898
+ if (tgt.length)
899
+ series.push({ name: "target", color: css("--series-2"), dash: "4 3",
900
+ x: tgt.map(r => r.t0 / sc.fps), y: tgt.map(r => r.target_speed) });
901
+ const sib = S.compare ? sibling(sc) : null;
902
+ if (sib)
903
+ series.push({ name: sib.arm_label ? `arm ${sib.arm_label}` : sib.arm, color: css("--series-3"),
904
+ x: sib.ego.frame.map(f => f / sib.fps), y: sib.ego.speed });
905
+ const vmax = Math.max(1, ...series.flatMap(s => s.y)) * 1.1;
906
+ S.charts.push(lineChart($("speed-chart"), {
907
+ xDomain: [0, dur], yDomain: [0, vmax], yTicks: 4, niceY: true, height: 210,
908
+ yFmt: v => Number(v).toFixed(1),
909
+ legendEl: $("speed-legend"),
910
+ replans: replanMarks(sc),
911
+ series,
912
+ }));
913
+ }
914
+
915
+ /* ============================== BEV ============================== */
916
+ const BEV = { pad: 26, hover: null, followSpan: 60 };
917
+
918
+ function bevTransform(canvas, frame = BEV.lastFrame || 0) {
919
+ const sc = S.scen, ego = sc.ego;
920
+ let cxm, cym, span;
921
+ if (S.bevFollow) {
922
+ const k = Math.min(frame, ego.x.length - 1);
923
+ cxm = ego.x[k]; cym = ego.y[k]; span = BEV.followSpan;
924
+ } else {
925
+ let xs = [...ego.x], ys = [...ego.y];
926
+ for (const r of sc.replans) for (const [x, y] of (r.waypoints_world || [])) { xs.push(x); ys.push(y); }
927
+ cxm = (Math.min(...xs) + Math.max(...xs)) / 2;
928
+ cym = (Math.min(...ys) + Math.max(...ys)) / 2;
929
+ span = Math.max(Math.max(...xs) - Math.min(...xs), Math.max(...ys) - Math.min(...ys), 20) * 1.25;
930
+ }
931
+ const s = (canvas.width - 2 * BEV.pad) / span;
932
+ // CARLA is left-handed (y flipped vs. conventional map view) — negate y for display
933
+ return {
934
+ s,
935
+ px: x => canvas.width / 2 + (x - cxm) * s,
936
+ py: y => canvas.height / 2 - (-(y - cym)) * s,
937
+ };
938
+ }
939
+
940
+ function renderBEVMode() {
941
+ const seg = $("bev-mode");
942
+ seg.innerHTML = "";
943
+ for (const [label, on] of [["fit episode", false], ["follow ego", true]])
944
+ seg.append(el("button", {
945
+ class: S.bevFollow === on ? "active" : "",
946
+ onclick: () => { S.bevFollow = on; renderBEVMode(); drawBEV(BEV.lastFrame || 0); },
947
+ }, label));
948
+ }
949
+
950
+ function renderBEVLegend() {
951
+ renderBEVMode();
952
+ const lg = $("bev-legend");
953
+ lg.innerHTML = "";
954
+ const sc = S.scen;
955
+ const items = [["ego", css("--series-1")]];
956
+ if (S.compare && sibling(sc)) items.push([`ego · ${armName(sibling(sc))}`, css("--series-3")]);
957
+ items.push(["scene vehicles", css("--text-secondary")], ["pedestrians", css("--series-5")],
958
+ ["traffic", css("--baseline")], ["policy plan", css("--series-2")]);
959
+ if (sc.map && sc.map.route && sc.map.route.pts.length) items.push(["intended route", css("--text-muted")]);
960
+ if (sc.map && sc.map.signs && sc.map.signs.length) items.push(["plate", css("--map-plate")]);
961
+ for (const [name, color] of items)
962
+ lg.append(el("span", { class: "item" }, el("span", { class: "swatch", style: `background:${color}` }), name));
963
+ const recorded = sc.ego.extent != null;
964
+ $("bev-hint").textContent = "Trails show the full episode; markers follow playback. The orange plan is the " +
965
+ "selected replan's, or else the latest one at the playback time. Footprints are " +
966
+ (recorded ? "the actors' CARLA bounding boxes." : "nominal sizes (this run predates recorded extents).");
967
+ }
968
+
969
+ // nominal half-extents [length, width] in m, for runs recorded without them
970
+ const nominalExtent = a => a.type === "pedestrian" ? [0.3, 0.3]
971
+ : /hgv|truck|cola|bus|firetruck|ambulance/.test(a.label || "") ? [4.0, 1.3] : [2.3, 1.0];
972
+
973
+ function drawMap(ctx, T, map) {
974
+ if (!map || !map.lanes) return;
975
+ const fillPoly = (pts, color) => {
976
+ ctx.fillStyle = color; ctx.beginPath();
977
+ pts.forEach(([x, y], i) => i ? ctx.lineTo(T.px(x), T.py(y)) : ctx.moveTo(T.px(x), T.py(y)));
978
+ ctx.closePath(); ctx.fill();
979
+ };
980
+ for (const l of map.lanes)
981
+ if (l.kind !== "Driving") fillPoly(l.poly, css("--map-walk"));
982
+ for (const l of map.lanes)
983
+ if (l.kind === "Driving") fillPoly(l.poly, l.junction ? css("--map-junction") : css("--map-road"));
984
+ ctx.globalAlpha = 0.35;
985
+ for (const c of map.crosswalks || []) fillPoly(c, css("--map-mark"));
986
+ ctx.globalAlpha = 1;
987
+ for (const m of map.marks || []) {
988
+ ctx.strokeStyle = m.color === "yellow" ? css("--map-yellow") : css("--map-mark");
989
+ ctx.globalAlpha = 0.8;
990
+ ctx.lineWidth = Math.max(1, 0.15 * T.s);
991
+ // CARLA broken lines are ~3 m paint / ~6 m gap
992
+ ctx.setLineDash(m.style === "broken" ? [3 * T.s, 6 * T.s] : []);
993
+ ctx.beginPath();
994
+ m.pts.forEach(([x, y], i) => i ? ctx.lineTo(T.px(x), T.py(y)) : ctx.moveTo(T.px(x), T.py(y)));
995
+ ctx.stroke();
996
+ }
997
+ ctx.setLineDash([]); ctx.globalAlpha = 1;
998
+ if (map.route && map.route.pts.length) {
999
+ ctx.strokeStyle = css("--text-muted"); ctx.lineWidth = 2; ctx.setLineDash([2, 6]);
1000
+ ctx.beginPath();
1001
+ map.route.pts.forEach(([x, y], i) => i ? ctx.lineTo(T.px(x), T.py(y)) : ctx.moveTo(T.px(x), T.py(y)));
1002
+ ctx.stroke(); ctx.setLineDash([]);
1003
+ }
1004
+ for (const sg of map.signs || []) {
1005
+ const X = T.px(sg.x), Y = T.py(sg.y);
1006
+ ctx.fillStyle = css("--map-plate"); ctx.beginPath();
1007
+ for (let i = 0; i < 8; i++) {
1008
+ const a = Math.PI / 8 + i * Math.PI / 4;
1009
+ const R = Math.max(7, 0.6 * T.s);
1010
+ i ? ctx.lineTo(X + R * Math.cos(a), Y + R * Math.sin(a)) : ctx.moveTo(X + R * Math.cos(a), Y + R * Math.sin(a));
1011
+ }
1012
+ ctx.closePath(); ctx.fill();
1013
+ ctx.fillStyle = css("--text-primary"); ctx.font = "20px system-ui";
1014
+ ctx.fillText(sg.id, X + 12, Y - 10);
1015
+ }
1016
+ }
1017
+
1018
+ function drawBEV(frame) {
1019
+ const canvas = $("bev-canvas");
1020
+ const cssW = canvas.clientWidth || 440;
1021
+ if (canvas.width !== cssW * 2) { canvas.width = cssW * 2; canvas.height = cssW * 2; }
1022
+ const ctx = canvas.getContext("2d");
1023
+ const sc = S.scen, ego = sc.ego;
1024
+ const T = bevTransform(canvas, frame);
1025
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
1026
+ drawMap(ctx, T, sc.map);
1027
+
1028
+ // scale bar
1029
+ const step = 10 * T.s;
1030
+ ctx.strokeStyle = css("--text-muted"); ctx.lineWidth = 3;
1031
+ ctx.beginPath(); ctx.moveTo(BEV.pad, canvas.height - BEV.pad); ctx.lineTo(BEV.pad + step, canvas.height - BEV.pad); ctx.stroke();
1032
+ ctx.fillStyle = css("--text-muted"); ctx.font = "20px system-ui";
1033
+ ctx.fillText("10 m", BEV.pad, canvas.height - BEV.pad - 8);
1034
+
1035
+ const trail = (xs, ys, upTo, color, width) => {
1036
+ ctx.strokeStyle = color; ctx.lineWidth = width; ctx.beginPath();
1037
+ for (let i = 0; i <= upTo; i++) {
1038
+ const X = T.px(xs[i]), Y = T.py(ys[i]);
1039
+ i ? ctx.lineTo(X, Y) : ctx.moveTo(X, Y);
1040
+ }
1041
+ ctx.stroke();
1042
+ };
1043
+ // footprint at true scale (min 5 px so far-zoomed actors stay visible),
1044
+ // with a nose tick showing heading
1045
+ const footprint = (x, y, yawDeg, ext, color, hollow) => {
1046
+ const X = T.px(x), Y = T.py(y);
1047
+ const L = Math.max(5, ext[0] * T.s), W = Math.max(4, ext[1] * T.s);
1048
+ ctx.save(); ctx.translate(X, Y); ctx.rotate(-yawDeg * Math.PI / 180); // y-flip mirrors rotation
1049
+ ctx.fillStyle = color; ctx.strokeStyle = color; ctx.lineWidth = 3;
1050
+ ctx.beginPath(); ctx.rect(-L, -W, 2 * L, 2 * W);
1051
+ hollow ? ctx.stroke() : ctx.fill();
1052
+ ctx.strokeStyle = css("--surface-1"); ctx.lineWidth = 2;
1053
+ ctx.beginPath(); ctx.moveTo(L * 0.4, 0); ctx.lineTo(L, 0); ctx.stroke();
1054
+ ctx.restore();
1055
+ };
1056
+ const walker = (x, y, color) => {
1057
+ ctx.fillStyle = color; ctx.beginPath();
1058
+ ctx.arc(T.px(x), T.py(y), Math.max(6, 0.35 * T.s), 0, 7); ctx.fill();
1059
+ };
1060
+ const idx = a => {
1061
+ let k = a.frame.findIndex(f => f >= frame);
1062
+ if (k < 0) k = a.frame.length - 1;
1063
+ return k;
1064
+ };
1065
+
1066
+ // actors: background traffic faint and trail-less; scene actors with trails
1067
+ // without a scene graph, anything not tagged as traffic counts as scene
1068
+ const anyScene = sc.actors.some(o => o.scene);
1069
+ for (const a of sc.actors) {
1070
+ const k = idx(a);
1071
+ const isScene = a.scene || (!anyScene && !a.background);
1072
+ const color = a.type === "pedestrian" ? css("--series-5")
1073
+ : isScene ? css("--text-secondary") : css("--baseline");
1074
+ if (isScene) {
1075
+ ctx.globalAlpha = 0.45;
1076
+ trail(a.x, a.y, a.x.length - 1, color, 2);
1077
+ ctx.globalAlpha = 1;
1078
+ }
1079
+ if (a.type === "pedestrian") walker(a.x[k], a.y[k], color);
1080
+ else footprint(a.x[k], a.y[k], a.yaw[k], a.extent || nominalExtent(a), color, false);
1081
+ }
1082
+
1083
+ // the policy's plan: the selected replan, else the latest one at this frame
1084
+ let rp = S.selectedReplan;
1085
+ if (!rp) for (const r of sc.replans) if (r.t0 <= frame && r.waypoints_world) rp = r;
1086
+ if (rp && rp.waypoints_world) {
1087
+ ctx.globalAlpha = S.selectedReplan ? 1 : 0.85;
1088
+ ctx.strokeStyle = css("--series-2"); ctx.lineWidth = 3;
1089
+ ctx.setLineDash([8, 6]); ctx.beginPath();
1090
+ rp.waypoints_world.forEach(([x, y], i) => {
1091
+ const X = T.px(x), Y = T.py(y);
1092
+ i ? ctx.lineTo(X, Y) : ctx.moveTo(X, Y);
1093
+ });
1094
+ ctx.stroke(); ctx.setLineDash([]);
1095
+ ctx.fillStyle = css("--series-2");
1096
+ for (const [x, y] of rp.waypoints_world) {
1097
+ ctx.beginPath(); ctx.arc(T.px(x), T.py(y), 4, 0, 7); ctx.fill();
1098
+ }
1099
+ ctx.globalAlpha = 1;
1100
+ }
1101
+
1102
+ // the other arm's ego, hollow, so the two runs of one scene overlay
1103
+ const sib = S.compare ? sibling(sc) : null;
1104
+ if (sib) {
1105
+ const se = sib.ego, j = Math.min(frame, se.x.length - 1);
1106
+ ctx.setLineDash([10, 8]); ctx.globalAlpha = 0.8;
1107
+ trail(se.x, se.y, se.x.length - 1, css("--series-3"), 3);
1108
+ ctx.setLineDash([]); ctx.globalAlpha = 1;
1109
+ footprint(se.x[j], se.y[j], se.yaw[j], se.extent || [2.4, 1.05], css("--series-3"), true);
1110
+ }
1111
+
1112
+ // ego: trail up to current frame + full faint remainder
1113
+ ctx.globalAlpha = 0.3;
1114
+ trail(ego.x, ego.y, ego.x.length - 1, css("--series-1"), 2);
1115
+ ctx.globalAlpha = 1;
1116
+ const k = Math.min(frame, ego.x.length - 1);
1117
+ trail(ego.x, ego.y, k, css("--series-1"), 4);
1118
+ footprint(ego.x[k], ego.y[k], ego.yaw[k], ego.extent || [2.4, 1.05], css("--series-1"), false);
1119
+
1120
+ BEV.lastFrame = frame;
1121
+ }
1122
+
1123
+ $("bev-canvas").addEventListener("mousemove", ev => {
1124
+ const canvas = $("bev-canvas");
1125
+ const rect = canvas.getBoundingClientRect();
1126
+ const mx = (ev.clientX - rect.left) * canvas.width / rect.width;
1127
+ const my = (ev.clientY - rect.top) * canvas.height / rect.height;
1128
+ const T = bevTransform(canvas);
1129
+ const frame = BEV.lastFrame || 0;
1130
+ const tip = $("tooltip");
1131
+ let best = null, bestD = 26 * 26;
1132
+ const consider = (name, sub, x, y) => {
1133
+ const d = (T.px(x) - mx) ** 2 + (T.py(y) - my) ** 2;
1134
+ if (d < bestD) { bestD = d; best = { name, sub, x, y }; }
1135
+ };
1136
+ const sc = S.scen;
1137
+ const k = Math.min(frame, sc.ego.x.length - 1);
1138
+ consider("ego", `${fmt(sc.ego.speed[k])} m/s`, sc.ego.x[k], sc.ego.y[k]);
1139
+ for (const a of sc.actors) {
1140
+ let j = a.frame.findIndex(f => f >= frame);
1141
+ if (j < 0) j = a.frame.length - 1;
1142
+ const role = a.scene ? "scene" : a.background ? "traffic" : "";
1143
+ consider(a.type === "vehicle" ? a.label : "pedestrian", `id ${a.id}${role ? " · " + role : ""}`, a.x[j], a.y[j]);
1144
+ }
1145
+ for (const sg of (sc.map && sc.map.signs) || [])
1146
+ consider(`plate ${sg.id}`, Object.entries(sg.seen || {}).map(([v, n]) => `${v}: ${n} frames`).join(", ") || "never in view", sg.x, sg.y);
1147
+ if (best) {
1148
+ tip.innerHTML = `<div class="t-title">${best.name}</div><div class="t-row"><span>${best.sub}</span></div>` +
1149
+ `<div class="t-row"><span class="num">x ${fmt(best.x)} · y ${fmt(best.y)}</span></div>`;
1150
+ tip.style.display = "block";
1151
+ tip.style.left = Math.min(window.innerWidth - 190, ev.clientX + 14) + "px";
1152
+ tip.style.top = (ev.clientY + 14) + "px";
1153
+ } else tip.style.display = "none";
1154
+ });
1155
+ $("bev-canvas").addEventListener("mouseleave", () => { $("tooltip").style.display = "none"; });
1156
+
1157
+ /* ============================== replans ============================== */
1158
+ // The numbers behind the words: SimLingo's text ends in "Waypoints:" and its
1159
+ // path / speed come from its action head, not as text.
1160
+ function outputsLine(r) {
1161
+ const parts = [];
1162
+ if (r.plan_end) {
1163
+ const [x, y] = r.plan_end;
1164
+ parts.push(`path: ${r.plan_points} points, ends ${fmt(x, 1)} m ahead, ` +
1165
+ `${fmt(Math.abs(y), 1)} m ${y >= 0 ? "left" : "right"}`);
1166
+ }
1167
+ if (r.target_speed != null) parts.push(`speed plan: ${fmt(r.target_speed, 1)} m/s`);
1168
+ if (r.control) parts.push(`control: steer ${fmt(r.control.steer, 2)}, ` +
1169
+ `throttle ${fmt(r.control.throttle, 2)}, brake ${fmt(r.control.brake, 2)}`);
1170
+ return "→ " + parts.join(" · ");
1171
+ }
1172
+
1173
+ function renderReplans() {
1174
+ const box = $("replan-cards");
1175
+ box.innerHTML = "";
1176
+ $("cosmos-grid").innerHTML = "";
1177
+ $("cosmos-toolbar").style.display = "none";
1178
+ const cosmosOn = (S.scen.config || {}).cosmos_enabled !== false;
1179
+ for (const r of S.scen.replans) {
1180
+ const stats = [
1181
+ `sim t = ${fmt(r.sim_time_s)} s`,
1182
+ ...(cosmosOn ? [`Cosmos ${fmt(r.cosmos_s, 0)} s`] : []),
1183
+ `policy ${fmt(r.policy_s)} s`,
1184
+ `v = ${fmt(r.speed_mps)} m/s`,
1185
+ ];
1186
+ // LEAD has no chain-of-thought; its own outputs say what it decided
1187
+ const said = [].concat(r.cot || []).join(" ") || (r.target_speed != null
1188
+ ? `target ${fmt(r.target_speed, 2)} m/s${r.brake_flag ? " · brake flag set" : ""}` +
1189
+ (r.steer_modality ? ` · steering from ${r.steer_modality}` : "")
1190
+ : "(no chain-of-thought)");
1191
+ const card = el("div", { class: "replan-card", onclick: () => selectReplan(r, card) },
1192
+ el("div", { class: "rc-head" },
1193
+ el("b", { class: "num" }, `replan @ frame ${r.t0}`),
1194
+ ...stats.map(t => el("span", { class: "rc-stat num" }, t)),
1195
+ ),
1196
+ el("div", { class: "rc-cot" }, said),
1197
+ ...(r.cot && r.cot.length && (r.control || r.plan_end)
1198
+ ? [el("div", { class: "rc-out num" }, outputsLine(r))] : []),
1199
+ );
1200
+ box.append(card);
1201
+ }
1202
+ }
1203
+
1204
+ function selectReplan(r, card) {
1205
+ const was = S.selectedReplan === r;
1206
+ S.selectedReplan = was ? null : r;
1207
+ document.querySelectorAll(".replan-card").forEach(c => c.classList.remove("active"));
1208
+ const grid = $("cosmos-grid");
1209
+ grid.innerHTML = "";
1210
+ $("cosmos-toolbar").style.display = "none";
1211
+ if (!was) {
1212
+ card.classList.add("active");
1213
+ for (const [view, vids] of Object.entries(r.views || {})) {
1214
+ for (const [key, path] of Object.entries(vids)) {
1215
+ const v = el("video", { src: media(path), preload: "metadata", muted: "", loop: "", playsinline: "", controls: "" });
1216
+ v.currentTime = 0.001; // decode + paint the first frame
1217
+ grid.append(el("div", { class: "cosmos-cell" }, v,
1218
+ el("span", { class: "cam-label" }, `${view} · ${COSMOS_LABELS[key] || key}`)));
1219
+ }
1220
+ }
1221
+ if (grid.children.length) $("cosmos-toolbar").style.display = "flex";
1222
+ // jump the main playback to the replan moment
1223
+ const t = r.t0 / S.scen.fps;
1224
+ seekAll(t); updateAtTime(t);
1225
+ }
1226
+ drawBEV(BEV.lastFrame || 0);
1227
+ }
1228
+
1229
+ $("cosmos-play").addEventListener("click", () => {
1230
+ const vids = document.querySelectorAll("#cosmos-grid video");
1231
+ const anyPaused = [...vids].some(v => v.paused);
1232
+ vids.forEach(v => anyPaused ? v.play().catch(() => {}) : v.pause());
1233
+ $("cosmos-play").textContent = anyPaused ? "❚❚ pause all" : "▶ play all";
1234
+ });
1235
+ $("cosmos-restart").addEventListener("click", () => {
1236
+ document.querySelectorAll("#cosmos-grid video").forEach(v => { v.currentTime = 0; v.play().catch(() => {}); });
1237
+ $("cosmos-play").textContent = "❚❚ pause all";
1238
+ });
1239
+ </script>
1240
+ </body>
1241
+ </html>
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/rgb_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b4aa64936334078a99a11096107341473ee2925a14c4962cd36e7f4f22a35f0
3
+ size 12258393
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/rgb_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfe5cb0102da4c945375b31f3651924ffb77bfbe79f7ac76e4f7305a31a63279
3
+ size 9470244
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/rgb_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89a97cf1f7fca0d7ce9979a7c9a985279e108785fd0d305e2b11a08f34bb5dbc
3
+ size 17138520
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/rgb_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d09d8d5f51f686a825511c4a368d3f9aee01e55ce233063a2df3f16b2c7e2a2
3
+ size 14524409
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/depth_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa72e6be591ee761f49ace90357380ef2a0e17d8b5412ed0baaa13eb7938347a
3
+ size 661930
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/depth_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7601bf0135fdab89b0227b2386d75d5a62148d0eafdb3486d0427cae2f0c9651
3
+ size 392782
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/depth_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cff605cc9b6e9c8adffbf8df6a45e38fb69a52abeff6a5380e33b03cff28008
3
+ size 622652
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/depth_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc873b6c15d90a055d81410fdb76d6ec07a5c999df2b72b89e8bb6ce894d98ab
3
+ size 1079671
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/semseg_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a04993842aecccf547a56c4844f4d7e4ab22a89f501d828680e4115f33af213c
3
+ size 991838
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/semseg_left.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ea0f4343f2e52839015aa90b7374b0517032c141b76be822673c3ffb39589c6
3
+ size 754500
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/semseg_rear.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:529a2b1c836af4db5f10caa8e7c9a1432a88895f3b37db7001e5833688a2216d
3
+ size 1170122
dualworld/pdmlite_test6/rule_left_turn_yield_oncoming_mn__USA_Minnesota/videos/web/semseg_right.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8807ab182f0f6a0c7d1514ba2996aeeeef057a2e801884f1a829d097d4c2b54
3
+ size 1189474
dualworld/pdmlite_test6/rule_red_light_or__USA_Oregon/videos/rgb_front.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:530e5be6128f3b08844a38397c4251c257b48ff72cd81474b239ee4c6c4f400b
3
+ size 6226288