Analyze API problems

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Julian Atkinson
Posts: 52
Joined: Thu Feb 25, 2016 12:39 am

Analyze API problems

Post by Julian Atkinson » Thu Feb 09, 2017 1:30 am

Hi there

I am using matlab to run the API for analysis. If I try and pass a xmltemplate file into the analyze tool it does not work. It is clear that it does not like the placeholder files that I have placed in my template. I have seen this error in other forums, but in those cases it seems to be when the tool is being run, not before setting the paramters. The following error is given.

analyzeTool=AnalyzeTool(XMLTemplate);

Error:

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

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

at org.opensim.modeling.AnalyzeTool.<init>(AnalyzeTool.java:69)


In addition to this, If I use a real path for the actuators file then matlab crashes.

Thank you

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Analyze API problems

Post by Dimitar Stanev » Thu Feb 09, 2017 3:17 am

The error is due to the fact that the path to the file is not correct. If matlab crashes this can be caused by some internal error in OpenSim, which was caused by a bad xml file. Try to use some predefined .xml to check if it will crash again and then iteratively find the cause of the problem in your xml file.

User avatar
Julian Atkinson
Posts: 52
Joined: Thu Feb 25, 2016 12:39 am

Re: Analyze API problems

Post by Julian Atkinson » Thu Feb 09, 2017 3:26 am

Thanks Dimitar

I have tested it a number of times, even with xml files that I have run with the OpenSim GUI. I have made sure my path is correct, however it still crashes. Perhaps it is an xml version issue?

Anyway, my alternative if I cannot use an xmlTemplate to set some of the values, I could pass values in manually, however I am struggling on how to perform some of the boolean settings. Most importantly setting "compute_moments" to true in the Muscle Analysis, Analysis set. I am not sure if this is possible through the API.

Thank you for your help.

Julian

POST REPLY