Static Optimisation API Linux

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Alex Wilson
Posts: 7
Joined: Mon Mar 02, 2015 3:28 pm

Re: Static Optimisation API Linux

Post by Alex Wilson » Tue Dec 01, 2015 5:48 pm

Hi Chris,

Yes I believe I do have absolute paths.

All my files are on D drive so that should not be an issue (including OpenSim due to administration rights).

How would I define a relative path for all the files that are in the same folder?

Cheers,
Alex

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Static Optimisation API Linux

Post by Christopher Dembia » Tue Dec 01, 2015 6:01 pm

Provide only the file name.

User avatar
Alex Wilson
Posts: 7
Joined: Mon Mar 02, 2015 3:28 pm

Re: Static Optimisation API Linux

Post by Alex Wilson » Tue Dec 01, 2015 6:53 pm

Hi Chris many thanks for your help.

These are now the files I am using, along with a MATLAB script to invoke the calling of the analyse tool from the command line.

My output file is also attached.

- Alex

MATLAB
filepath = '"D:\Users\awil749\Documents\ProcessedData3DOF\1017\Walk\Walk_11\';
xmlfilepath = strrep(filepath,'\','/');

Command = ['"D:\Users\awil749\Documents\OpenSim 3.3\bin\analyze" -S ' filepath 'StaticOptimisation.xml" >' xmlfilepath 'Output-analysis.txt'];
system(Command);
Attachments
StaticOptimisation.xml
(5.13 KiB) Downloaded 155 times
Output-analysis.txt
(840 Bytes) Downloaded 51 times
ExternalLoads.xml
(2.9 KiB) Downloaded 93 times

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Static Optimisation API Linux

Post by Christopher Dembia » Wed Dec 02, 2015 1:12 pm

I don't see a need for replacing the slashes for the windows command. I was only suggesting that for inside the XML files.

If you use MATLAB scripting you could also do something like `analyze = AnalyzeTool(setup-file_path); analyze.run()`.

User avatar
Alex Wilson
Posts: 7
Joined: Mon Mar 02, 2015 3:28 pm

Re: Static Optimisation API Linux

Post by Alex Wilson » Wed Dec 02, 2015 1:21 pm

Hi Chris,

I see. However, now I get the following Java problem.


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

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

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

User avatar
Alison Rogozinski
Posts: 14
Joined: Tue Jun 07, 2016 7:44 am

Re: Static Optimisation API Linux

Post by Alison Rogozinski » Tue Jun 14, 2016 8:19 am

Hi Alex!
Did you ever get your last problem resolved? I am having the same exact issue and cannot figure out how to fix it.

POST REPLY