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

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Hendrik Reimann
Posts: 5
Joined: Tue Apr 07, 2015 1:54 pm

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

Post by Hendrik Reimann » Sun Jun 03, 2018 8:10 am

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 816 times
exception_detail.png
exception_detail.png (104.05 KiB) Viewed 816 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)

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

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

Post by jimmy d » Tue Jun 05, 2018 1:26 pm

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.

User avatar
Hendrik Reimann
Posts: 5
Joined: Tue Apr 07, 2015 1:54 pm

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

Post by Hendrik Reimann » Tue Jun 05, 2018 1:31 pm

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.

POST REPLY