ComputationalBiomechanicsLab / opensim-creator

A UI for building OpenSim models
https://opensimcreator.com
Apache License 2.0
141 stars 17 forks source link

Fix simulation STO file simulations are always resampled to 100 FPS #708

Open adamkewley opened 1 year ago

adamkewley commented 1 year ago

This limitation is because the SimulationReport API in OSC is assuming one-state-per-step, which isn't a good idea because STO files from OpenSim can contain many thousands of microsteps from error-correcting integrators.

As a hack, the implementation currently just resamples to 100 Hz, but a robust solution should keep the states as-is and provide a high-performance way to re-flash a single state from some kind of state sequence storage (exactly as OpenSim GUI and OpenSim::Storage do it - it's much more memory efficient than the newer state sequence APIs).