Repository navigation
Description
Task
T-089b· Milestone M8 — Dashboard · Size M · Priority P0 · Epic #8Implements FR-DSH-005
Branch
feat/t-089b-trajectoryplot-component-map-underlay-gt— one task = one branch = one PR (doc 32 §6)
Summary
Implement components/TrajectoryPlot (hand-written SVG per doc 13 §5–6): occupancy map image underlay, ground-truth path (ink), estimated path (dashed accent), pallet rectangle, ✕ at first_violation_t, footprint ghosts every 2 s, pan/zoom, controlled cursorT prop.
Context / motivation
The most important diagnostic view for robotics engineers.
Scope
In scope
- World-to-screen transform helper with unit tests.
Implementation guidance
components/TrajectoryPlot/TrajectoryPlot.tsxprops (doc 13 §6):trace: TraceColumns(t, gt_x, gt_y, gt_yaw, est_x, est_y),map: {imageUrl, resolution, origin: [x, y], width, height},obstacles: Rect[](pallet),footprint: Polygon,firstViolationT?: number,cursorT?: number,onCursorChange?(t).transform.ts: world (m, y-up) ↔ SVG (px, y-down) with zoom/pan state; unit tests for the round trip and for map origin handling (ROS map YAML convention).- Layers: map
<image>, GT path<polyline>(--ink), estimated path (dashed--accent), obstacles, ✕ marker at the first violation, footprint ghosts everyghostIntervalS(prop, default fromplotDefaults.ts= 2 s per doc 13 §3.4), robot atcursorT. - Interaction: wheel/pinch zoom, drag pan,
+/-/arrow keys when focused,0resets; hovering the path emitsonCursorChange(nearest sample via binary search on t). - Performance: paths memoised; cursor changes re-render only the robot layer.
- Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff
PLR2004); public APIs typed (mypy strict) and documented.
Acceptance criteria
- Transform tests; snapshot of SVG structure for a fixture trace.
- Pan/zoom via keyboard too.
- Map image source documented (API artefact or static
configs/mapscopy). - Keyboard pan/zoom tests.
- A 10 Hz × 120 s trace renders in < 50 ms (perf test).
- Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
- Docs, config reference and CHANGELOG
Unreleasedupdated where behaviour, keys or interfaces changed. - Definition of Done (doc 32 §3) satisfied.
Tests required
components/TrajectoryPlot/*.test.tsx.
Dependencies
Blocked by: #162 (T-085a)
Blocks: #175 (T-089c)
Parallelization notes
Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:
web/src/components/TrajectoryPlot/**
Independent component.
Definition of Done
Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-089b (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.
References
Design docs: doc 13 §3.4 · doc 13 §6 · doc 11 §6
Requirements: FR-DSH-005 (traceability: doc 28)
External:
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity