Page 1 of 1

MATLAB Scripting for CMC

Posted: Tue Nov 10, 2020 11:57 pm
by lefranc
Hey All!

I'm trying to figure out how to run CMC using the API. However, there is limited info on how to use each method in the API docs.

I have set up my code, and then CMC starts running but fails to converge on a solution and crashes after a couple seconds. I think the main reason for this is I have no idea how to correct include the actuators file because there isn't a "setActuators" method. My code and error are attached below.

The files themselves should be ok because I already ran them in OpenSim3.3 and 4.1 and got reasonable metabolic cost results.

What method do I use for that? What other reason could cause this to fail?

Also, I am using an OpenSim 3.3 model but using Opensim 4.1 .. would that cause any issues?

Thank you so much!

Re: MATLAB Scripting for CMC

Posted: Thu Nov 12, 2020 6:43 pm
by ongcf
Multiple actuator files can be set, and they can all be set together using setForceSetFiles (https://simtk.org/api_docs/opensim/api_ ... 51892a66d3). This is not quite the most intuitive name, but if you have a working CMC setup file, you can see this tag name if you open the .xml setup file in a text editor.

Re: MATLAB Scripting for CMC

Posted: Sun Nov 15, 2020 3:02 pm
by lefranc
Sounds great. Thank you so much!