Hello to everybody.
I am trying to control a prosthesis in MATLAB and to do this, i want to use reduced gait models of opensim. in this stage i got some problems with CMC. i use OpenSim API in MATLAB. despite the fact that information about CMC class is available on OpenSim API documentation, i could not use methods and constructors of this class in order to do CMC through Matlab and i get "unrecognized function or variable" error. it seems that this class is not usable with OpenSim API.can anyone guess whats happening?
i am sorry for my english
Thank you in advance
using CMC through OpenSim API
- hesam boroomand
- Posts: 9
- Joined: Tue May 19, 2020 3:33 am
- Carmichael Ong
- Posts: 383
- Joined: Fri Feb 24, 2012 11:50 am
Re: using CMC through OpenSim API
CMC can be difficult to get right using the API and can take some time to debug. One way to work around this is to use MATLAB/Python tools to update a XML setup file and then load the setup file. You can also do a hybrid approach, using a setup file that has almost everything filled out, and then use the CMC API to make small changes to your setup.
- hesam boroomand
- Posts: 9
- Joined: Tue May 19, 2020 3:33 am
Re: using CMC through OpenSim API
Thank you very much for your answer.
What i inferred from your reply is that the problem with using CMC in opensim api is with its setup XML file which must be updated.
Am i right?
What i inferred from your reply is that the problem with using CMC in opensim api is with its setup XML file which must be updated.
Am i right?
- Jordan Sturdy
- Posts: 9
- Joined: Fri Sep 22, 2017 8:56 am
Re: using CMC through OpenSim API
Hesam,
I am able to use the CMCTool() method and configure the related properties just fine in both the 3.3 and 4.2 API using MATLAB or Python. Can you attach the code that is giving you an error so we can give some more specific advice?
This sounds like you are missing the "import org.opensim.modeling.*" line in your MATLAB script. In 4.2 I've found that when you are stepping through code rather than running it all at once, MATLAB somehow loses the link to the OpenSim libraries. So for troubleshooting, I paste the import line at the top of every code chunk.
Jordan
I am able to use the CMCTool() method and configure the related properties just fine in both the 3.3 and 4.2 API using MATLAB or Python. Can you attach the code that is giving you an error so we can give some more specific advice?
This sounds like you are missing the "import org.opensim.modeling.*" line in your MATLAB script. In 4.2 I've found that when you are stepping through code rather than running it all at once, MATLAB somehow loses the link to the OpenSim libraries. So for troubleshooting, I paste the import line at the top of every code chunk.
Jordan
- hesam boroomand
- Posts: 9
- Joined: Tue May 19, 2020 3:33 am
Re: using CMC through OpenSim API
Dear Jordan
Thanks a lot for your replying.As it was really time-consuming process to find out what the problem exactly is, i passed this issue by using GUI and i faced to some other problems which is related to implementing forward scheme and integrating external actuator to gait model. if you think that could help me, i would be glad to see your suggestions. here is my question in the forum :
viewtopicPhpbb.php?f=91&t=13826&p=39728&start=0&view=
Thanks a lot for your replying.As it was really time-consuming process to find out what the problem exactly is, i passed this issue by using GUI and i faced to some other problems which is related to implementing forward scheme and integrating external actuator to gait model. if you think that could help me, i would be glad to see your suggestions. here is my question in the forum :
viewtopicPhpbb.php?f=91&t=13826&p=39728&start=0&view=