Page 1 of 1

MocoInverse tool example

Posted: Fri Dec 06, 2019 3:44 pm
by salixabb
Hi OpenSim Moco team,

Thank you for this interesting project and I am very excited to use this tool.

I was wondering if you could provide us with an example on how to use the MocoInverse tool to estimate control variables given a prescribed motion and an OpenSim model to run on command line and Matlab?

Thank you so much.

Re: MocoInverse tool example

Posted: Fri Dec 06, 2019 3:54 pm
by chrisdembia
Hey Hamidreza,

Unfortunately, the Moco distribution does not yet contain great examples for MocoInverse. We hope to add a MocoInverse example in the future. For now, refer to the following

1. The Python script we used for the bioRxiv preprint (MocoInverse for walking): https://github.com/stanfordnmbl/mocopap ... ng.py#L178

2. The sit-to-stand Matlab example in the Moco distribution, at Resources/Code/Matlab/exampleSitToStand/exampleSitToStand_answers.m (https://github.com/opensim-org/opensim- ... ers.m#L105)

3. The C++ test case for MocoInverse, which solves a walking problem: https://github.com/opensim-org/opensim- ... e.cpp#L124

Note that MocoTrack and MocoInverse have similar interfaces; you may be able to modify the MocoTrack example in the Moco distribution to use MocoInverse.

Re: MocoInverse tool example

Posted: Fri Dec 06, 2019 4:02 pm
by salixabb
Hi Christopher,

Well done on this project and thank you for your response. I will look into these which are definitely helpful and will get back to you if I have further questions.

Thanks.

Re: MocoInverse tool example

Posted: Fri Dec 06, 2019 4:11 pm
by chrisdembia
Thank you. If you're successful, and you have the sudden urge to contribute back an example, we and other users would be delighted :)