Skip to content

feat: add per-frame 2D visualization (static demo) - #11

Merged
YoshiRi merged 1 commit into
mainfrom
claude/review-repository-status-1GXDH
May 5, 2026
Merged

feat: add per-frame 2D visualization (static demo)#11
YoshiRi merged 1 commit into
mainfrom
claude/review-repository-status-1GXDH

Conversation

@YoshiRi

@YoshiRi YoshiRi commented May 5, 2026

Copy link
Copy Markdown
Owner

src/tracking/evaluation/interactive.py

  • _ggiw_to_ellipse(): GGIW extent → {ext_a, ext_b, ext_theta, x, y, vx, vy}
  • run_once(): add record_frames flag; captures GT/obs/est snapshots per frame
  • run_simulation_json(): include frame_data (sensor_origin + frames[]) from MC run 0

scripts/generate_demo.py

  • Runs run_simulation_json for selected/all scenarios
  • Writes docs/data/demo_.json

docs/demo.html

  • Canvas 2D renderer: GT rectangles (green), LiDAR points (yellow),
    GGIW estimate ellipses (red), velocity arrows, sensor origin marker
  • Frame slider + Play/Pause/Step/Reset controls
  • Auto-fit coordinate transform with grid and axis labels
  • Missed-detection badge for miss frames
  • Per-scenario summary metrics strip
  • Loads all scenarios from docs/data/ via fetch (falls back gracefully)

tests/tracking/test_interactive.py (+10 tests)

  • frame_data present and correctly nested
  • frame index sequential, GT fields valid, obs pairs finite
  • est ellipse axes positive (guards eigenvalue sign bugs)
  • missed frames have empty obs + missed=True flag
  • record_frames=False → snapshots is None
  • record_frames=True → snapshots length matches n_frames

Usage (local preview):
uv run python scripts/generate_demo.py --all
cd docs && python -m http.server 8080

open http://localhost:8080/demo.html

https://claude.ai/code/session_013sQREGvTmjgFT8cyRNmPUL

src/tracking/evaluation/interactive.py
  - _ggiw_to_ellipse(): GGIW extent → {ext_a, ext_b, ext_theta, x, y, vx, vy}
  - run_once(): add record_frames flag; captures GT/obs/est snapshots per frame
  - run_simulation_json(): include frame_data (sensor_origin + frames[]) from MC run 0

scripts/generate_demo.py
  - Runs run_simulation_json for selected/all scenarios
  - Writes docs/data/demo_<scenario>.json

docs/demo.html
  - Canvas 2D renderer: GT rectangles (green), LiDAR points (yellow),
    GGIW estimate ellipses (red), velocity arrows, sensor origin marker
  - Frame slider + Play/Pause/Step/Reset controls
  - Auto-fit coordinate transform with grid and axis labels
  - Missed-detection badge for miss frames
  - Per-scenario summary metrics strip
  - Loads all scenarios from docs/data/ via fetch (falls back gracefully)

tests/tracking/test_interactive.py (+10 tests)
  - frame_data present and correctly nested
  - frame index sequential, GT fields valid, obs pairs finite
  - est ellipse axes positive (guards eigenvalue sign bugs)
  - missed frames have empty obs + missed=True flag
  - record_frames=False → snapshots is None
  - record_frames=True → snapshots length matches n_frames

Usage (local preview):
  uv run python scripts/generate_demo.py --all
  cd docs && python -m http.server 8080
  # open http://localhost:8080/demo.html

https://claude.ai/code/session_013sQREGvTmjgFT8cyRNmPUL
@YoshiRi
YoshiRi force-pushed the claude/review-repository-status-1GXDH branch from 74fbac0 to f1fa3c3 Compare May 5, 2026 14:28
@YoshiRi
YoshiRi merged commit 8a0c433 into main May 5, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants