Page 1 of 1

How to use Analyze tool in OpenSim API

Posted: Fri May 28, 2021 8:51 am
by kebritchi
Hi everyone,
I want to estimate joint reaction forces using scripting in OpenSim, but when I use modeling.AnalyzeTool() to construct the analyze tool from my XML, it always fails to run, the error is like the following while I am sure that XML is right and the input files are in the folder, I am wondering why they could not be found, can anyone help me with this? or give me an example that works when using Analyze tool? I really appreciate your help.
analyzeTool.run()
at org.opensim.modeling.opensimModelJNI.AnalyzeTool_run__SWIG_0(Native Method)
at org.opensim.modeling.AnalyzeTool.run(AnalyzeTool.java:154)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)

java.io.IOException: java.io.IOException: Object: ERR- Could not open file subject01_walk1_grf.xml. It may not exist or you don't have permission to read it.

Re: How to use Analyze tool in OpenSim API

Posted: Sat May 29, 2021 6:18 am
by tkuchida
It may not exist or you don't have permission to read it.
I suggest providing a full path to the file (e.g., "C:\..."). If you provide only the file name, generally the file must reside in the directory where "out.log" appears when you run the Tool, which may not be the directory in which your model file resides.