opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
758 stars 308 forks source link

`PolynomialPathFitter` can construct an invalid `TimeSeriesTable` when sampling coordinate data #3759

Closed nickbianco closed 2 months ago

nickbianco commented 3 months ago

After sampling around the user-provided coordinate data, PolynomialPathFitter assembles all coordinate samples into one table. Depending on the timestep (i.e, dt), from the original table, the independent column of the new table may have entries that are not monotonically increasing.

An easy fix is to just replace all time values with the index, since the time values are irrelevant during fitting.