# Trajectory tracking

Target vs sim vs real error summaries on one page: real rack runs against two twins per motor, speed and trajectory
kind; the 10-09 study of target vs sim per joint (its real slots were never run, and say so); and the traj_compare
reports that hold the curves, linked rather than redrawn.

- **App:** BAM rig
- **Replaces:** the summary tables of traj_compare's reports (`traj_compare.write_comparison_report`, in bam_ws
  `trajectory_generation/traj_compare`) and the per-run numbers inside `budget_can*.json`, for comparing across runs;
  traj_compare stays the renderer of every time series (the trajectory-comparison skill: never a bespoke renderer).
- **Shows:** three unlinked datasets on one page (each with its own rail section, filtering only itself); KPI cards in
  summary mode (median per speed); grouped bars (`xOffset`) whose click selects a motor; error against the
  measurement floor on log-log axes with an `error = floor` guide; a target-vs-sim study faceted by speed, where the
  24 real slots are "—" with "not requested", never 0; a table of the reports with their paths.
- **Data:** written by `source/build.py`, read-only: `rack.json` from `/archive/datasets/bam_rig/rack_2026-10-23/analysis/budget_can*.json`
  (**real** runs vs the identified and full twins); `cells.json` from `~/bam_ws/reports/media/rack-tracking-2026-10-09/{metrics,manifest}.json`
  (sim, a placeholder-gain run: the ff-only rows have zero peak torque, as in the source); `reports.json`, the six
  traj_compare reports found on disk.
