Page 1 of 1

Scale tool can't deal with .trc files where time doesn't start at 0

Posted: Sun Jun 03, 2018 8:10 am
by hendrikreimann
I had this very frustrating problem, where the scale tool would throw an exception in the IK stage.

After quite some prodding, I found that the problem came from the fact that the Time data in the .trc did not start at 0. Changing the time column in the .trc file to one that started at 0 solved the problem. I don't think "starting at time 0" is a requirement for the .trc format, but the it's hard to find really detailed documentation for it.

Putting this out here in case somebody else runs into a similar problem.
exception.png
exception.png (56.26 KiB) Viewed 811 times
exception_detail.png
exception_detail.png (104.05 KiB) Viewed 811 times

Code: Select all

java.lang.RuntimeException: Time 0.000000 is out of time range [0.005000, 0.005000]
	Thrown at TimeSeriesTable.h:276 in getNearestRowIndexForTime().
	at org.opensim.modeling.opensimActuatorsAnalysesToolsJNI.OpenSimContext_processModelMarkerPlacer__SWIG_0(Native Method)
	at org.opensim.modeling.OpenSimContext.processModelMarkerPlacer(OpenSimContext.java:301)
	at org.opensim.tracking.ScaleToolModel$ScaleToolWorker.construct(ScaleToolModel.java:347)
	at org.opensim.swingui.SwingWorker$2.run(SwingWorker.java:130)
[catch] at java.lang.Thread.run(Thread.java:745)

Re: Scale tool can't deal with .trc files where time doesn't start at 0

Posted: Tue Jun 05, 2018 1:26 pm
by jimmy
Hendrik,

OpenSim 4.0 is still in Beta, and this is bug, not a requirement of trc files. OpenSim 3.3 doesn't have this issue. I have created an issue on Github to fix this.

Thanks for reporting! If you find anything else that you feel is a bug, please make another Forum post (you can also tag 'Bug')

-James.

Re: Scale tool can't deal with .trc files where time doesn't start at 0

Posted: Tue Jun 05, 2018 1:31 pm
by hendrikreimann
Yeah, I figured. I just started using OpenSim, on a Mac, so 4.0 is the only option. I wasn't aware of the github option, but I'll use that in the future. Thanks for covering this one.