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
Static Optimisation API Linux
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: Static Optimisation API Linux
Provide only the file name.
- Alex Wilson
- Posts: 7
- Joined: Mon Mar 02, 2015 3:28 pm
Re: Static Optimisation API Linux
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);
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 156 times
-
- Output-analysis.txt
- (840 Bytes) Downloaded 52 times
-
- ExternalLoads.xml
- (2.9 KiB) Downloaded 94 times
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: Static Optimisation API Linux
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()`.
If you use MATLAB scripting you could also do something like `analyze = AnalyzeTool(setup-file_path); analyze.run()`.
- Alex Wilson
- Posts: 7
- Joined: Mon Mar 02, 2015 3:28 pm
Re: Static Optimisation API Linux
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)
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)
- Alison Rogozinski
- Posts: 14
- Joined: Tue Jun 07, 2016 7:44 am
Re: Static Optimisation API Linux
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.
Did you ever get your last problem resolved? I am having the same exact issue and cannot figure out how to fix it.