Hi everyone,
I've been trying to write a script in Matlab to run this example:
https://simtk-confluence.stanford.edu:8 ... bolic+Cost
I'm at step II.B and am trying to set up the CMC tool. In the script I've written:
analyzeTool = CMCTool(cmcSetup,false);
where "cmcSetup" is the CMC set up file walk_Setup_CMC.xml
However this line gives the following error:
"Java exception occurred:
java.io.IOException: No model file was specified (<model_file> element is empty) in the Tool's Setup file. Consider passing `false` for the
constructor's `aLoadModel` parameter
In Object 'walk_subject' of type CMCTool.
Thrown at AbstractTool.cpp:388 in loadModel().
at org.opensim.modeling.opensimActuatorsAnalysesToolsJNI.new_CMCTool__SWIG_2(Native Method)
at org.opensim.modeling.CMCTool.<init>(CMCTool.java:69)"
I need help diagnosing this issue because as I cannot figure out what the problem is. I believe I am correctly passing 'false' to the CMCTool's 2nd parameter in order for the tool to not require a model_file element in the CMC setup file. The same error occurs if instead of "false" I use "0" or "logical(0)".
I'd appreciate any and all help with the issue.
Error when scripting in Matlab
- Henry Winter
- Posts: 3
- Joined: Sat May 02, 2020 10:26 pm
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Error when scripting in Matlab
Hello,
The CMC setup file should contain <model_file> specification. When running from the GUI this is unused since the current model in the application is used, but in Matlab Scripting, you have to specify it.
If the CMC setup file was provided by us (included in 4.0+ distribution) please let us know so we can fix the file in future versions or update the documentation page to account for it.
Thanks for reporting,
-Ayman
The CMC setup file should contain <model_file> specification. When running from the GUI this is unused since the current model in the application is used, but in Matlab Scripting, you have to specify it.
If the CMC setup file was provided by us (included in 4.0+ distribution) please let us know so we can fix the file in future versions or update the documentation page to account for it.
Thanks for reporting,
-Ayman