Search found 8 matches

by Maya Madhavan
Mon Jul 08, 2013 1:35 pm
Forum: OpenSim
Topic: MATLAB API Destructor
Replies: 1
Views: 374

MATLAB API Destructor

I am trying to write a MATLAB script which runs 100 trials of CMC and Forward Dynamics, but the script stops after the 13th trial with a RuntimeException: bad allocation error. Is this because of running out of memory for Java objects? I am trying to put a destructor command for each model after a t...
by Maya Madhavan
Thu Jun 20, 2013 11:56 am
Forum: OpenSim
Topic: Implementation of CMC using MATLAB API
Replies: 10
Views: 2408

Re: Implementation of CMC using MATLAB API

An update: I had not set the model for the Muscle Analysis object so I did this using the command musclea.setModel(model). However, now running the forward dynamics tool outputs the muscle analysis data files but they have no data inside them.
by Maya Madhavan
Wed Jun 19, 2013 12:36 pm
Forum: OpenSim
Topic: Implementation of CMC using MATLAB API
Replies: 10
Views: 2408

Re: Implementation of CMC using MATLAB API

Hi Ayman, I checked and ensured that the setup file created by my script had all the full paths specified. I was eventually able to resolve the issue by creating a new CMCTool object using the setup file that my script had created,which than ran and produced the same output as the GUI, as follows: c...
by Maya Madhavan
Mon Jun 17, 2013 12:43 pm
Forum: OpenSim
Topic: Implementation of CMC using MATLAB API
Replies: 10
Views: 2408

Re: Implementation of CMC using MATLAB API

When I used the call, setExternalLoadsFileName, it successfully changed the <external_loads_file> parameter in the setup file. I was trying to set the <force_set_files> parameter, so I found out what was wrong with the earlier setForceSetFiles call, I should have used cmcTool.setForceSetFiles(ArrayS...
by Maya Madhavan
Mon Jun 17, 2013 10:32 am
Forum: OpenSim
Topic: Implementation of CMC using MATLAB API
Replies: 10
Views: 2408

Re: Implementation of CMC using MATLAB API

Thank you very much for the response. I was able to print a setup file from my script and one used in the GUI, and they are specifying the same files except there are no force set files specified in the xml file printed by the script. The line in my script that I thought would specify the force set ...
by Maya Madhavan
Wed Jun 12, 2013 1:13 pm
Forum: OpenSim
Topic: Implementation of CMC using MATLAB API
Replies: 10
Views: 2408

Re: Implementation of CMC using MATLAB API

Now when I run my script, I get the error SimTK Exception thrown at InteriorPointOptimizer.cpp:261: Optimizer failed: Ipopt: Infeasible problem detected (status 2) OPTIMIZATION FAILED... CMC.computeControls: WARN- The optimizer could not find a solution at time = 0.000000. If using the fast target, ...
by Maya Madhavan
Wed Jun 12, 2013 5:58 am
Forum: OpenSim
Topic: Implementation of CMC using MATLAB API
Replies: 10
Views: 2408

Re: Implementation of CMC using MATLAB API

Thank you Maarten, that seemed to help!

Maya
by Maya Madhavan
Tue Jun 11, 2013 1:18 pm
Forum: OpenSim
Topic: Implementation of CMC using MATLAB API
Replies: 10
Views: 2408

Implementation of CMC using MATLAB API

Hello, I am an intern and first time user of OpenSim. I am trying to write a MATLAB script that implements CMCTool through the API. My script runs until this line: cmcTool.setForceSetFiles([residualMotorsFilePath residualMotors]); where the string inside is the full path of a file with residual moto...