Skip to content

Use consistent time domains when fitting trajectory splines - #276

Open
sjdoane wants to merge 1 commit into
rai-opensource:masterfrom
sjdoane:codex/fix-spline-fit-time-domain
Open

sjdoane wants to merge 1 commit into
rai-opensource:masterfrom
sjdoane:codex/fix-spline-fit-time-domain

Conversation

@sjdoane

@sjdoane sjdoane commented Oct 26, 2026 •

Copy link
Copy Markdown

SplineFit.stochastic_downsample_interpolation() defaults to normalized time, but its local rejection checks and error diagnostics evaluate the fitted spline with the original timestamps. For a straight trajectory timestamped from 10 to 20, both modes retain all five knots and report a position error of 190 despite exact interpolation at corresponding times.

Use the same timestamp-to-spline mapping for local candidate checks and public error diagnostics. Unnormalized fits keep their original time domain, and repeated fits update that choice. The docstring now states the returned spline's domain and correctly describes the returned indices as retained knots.

Validation, CPU/macOS arm64:

  • New regression cases: 26 failures / 4 passes before; 30 passes after.
  • Existing suite: 473 passes / 3 skips before; combined patched suite: 503 passes / 3 skips. Interactive animation tests remain skipped.
  • Python 3.10 existing/new spline tests: 36 passes / 2 skips. Repository pre-commit hooks pass.
  • A separate checkout independently reproduces these results and checks 32 additional trajectory configurations, including shifted/nonuniform time, local/global modes, curved paths, retained poses, geometric error oracles and repeated normalized/raw fits.

This does not change derivative time scaling or turn local rejection checks into a global error guarantee. Other platform matrices, documentation builds and hosted CI were not run locally.

Implementation and independent local review were performed by separate Codex agents.

This branch has not been deployed

No deployments
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.

1 participant