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!
MATLAB Scripting for CMC
- AUDE LEFRANC
- Posts: 16
- Joined: Wed Sep 18, 2019 12:47 pm
MATLAB Scripting for CMC
- Attachments
-
- CMC_API_code.JPG (131.21 KiB) Viewed 538 times
-
- CMCError.JPG (108.45 KiB) Viewed 538 times
Tags:
- Carmichael Ong
- Posts: 401
- Joined: Fri Feb 24, 2012 11:50 am
Re: MATLAB Scripting for CMC
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.
- AUDE LEFRANC
- Posts: 16
- Joined: Wed Sep 18, 2019 12:47 pm
Re: MATLAB Scripting for CMC
Sounds great. Thank you so much!