Batch AnalyzeTool: java:154 error

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Jasvir Bahl
Posts: 8
Joined: Tue Jan 19, 2016 6:05 pm

Batch AnalyzeTool: java:154 error

Post by Jasvir Bahl » Wed Jan 23, 2019 8:19 am

Hi, I am using the AnalyzeTool in matlab to loop over a series of motion trials. It successfully processes the first 2 trials and then I get the below error on the third file:
""
Error using setupAndRunStaticOpBatch2 (line 182)
Java exception occurred:
java.io.IOException: ExternalForce: Data source C:\Program Files\MOtoNMS
v2.2\MyData\ElaboratedData\THA007_ST\Pre-op\dynamicElaborations\THA007_St\\Walking1\Walking1.mot_transformedP specified by name, but was set.

at org.opensim.modeling.opensimModelJNI.AnalyzeTool_run__SWIG_0(Native Method)

at org.opensim.modeling.AnalyzeTool.run(AnalyzeTool.java:154)
""

I am confused with this error as the path specified in the "ExternalForce: Data source is where I converted c3d files to trc/mot but I have since moved these folders to a new directory for backup purposes, and am using the AnalyzeTool for the files in the new directory.

Could you please point me in the right direction as to where this error is stemming from?

Regards
Jasvir Bahl

Tags:

User avatar
Jasvir Bahl
Posts: 8
Joined: Tue Jan 19, 2016 6:05 pm

Re: Batch AnalyzeTool: java:154 error

Post by Jasvir Bahl » Thu Jan 24, 2019 10:21 am

Managed to fix this issue using the following approach suggested by James Dunne on a different post discussing issues appending actuators and external loads to a template SO_setup file.

"
This seems similar to previous issues I have had with changing the external loads file when using a pre-existing Setup file. What (probably) happens is that the internal forceset of the object is only constructed at the initial construction of the AnalyzeTool(). I was able to work around by writing the setup back to file after making all my changes, instantiating from the file, and running. For you it would look something like;

...
statop.print(statopsetupfile_temp)
statop = AnalyzeTool(statopsetupfile_temp);
statop.run()"

Thanks!

POST REPLY