MATLAB closes unexpectedly when trying to solve MocoInverse

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Grace M
Posts: 27
Joined: Thu Jul 28, 2016 11:11 am

MATLAB closes unexpectedly when trying to solve MocoInverse

Post by Grace M » Tue Sep 07, 2021 9:31 pm

Hi there,

I am trying to run a MocoInverse example based on exampleMocoInverse.m included in the 3Dwalking resources. I have switched out the model and states file for a running example. When I run the code MATLAB shuts with no error message given. I am running everything on my C: drive as had thought that was the issue but it is still occuring. Any help would be appreciated!

Thanks

User avatar
Luke Jessup
Posts: 13
Joined: Tue Jul 14, 2020 7:58 pm

Re: MATLAB closes unexpectedly when trying to solve MocoInverse

Post by Luke Jessup » Tue Sep 07, 2021 9:57 pm

Hi Grace,

Are any of the coordinates in your model locked? If so, try running it again with them unlocked or, if you want them to remain locked, add 'modelProcessor.append(ModOpReplaceJointsWithWelds())' to your code

User avatar
Grace M
Posts: 27
Joined: Thu Jul 28, 2016 11:11 am

Re: MATLAB closes unexpectedly when trying to solve MocoInverse

Post by Grace M » Tue Sep 07, 2021 10:55 pm

Hi Luke,

I have tried using the Model processing ModOpReplaceJointsWithWelds() function and it didn't seem to make the joints weld joints when I reprinted the model to file. But setting all locked joints to be unlocked worked! Thank you.
However the code runs with the Rajopal_2015 model which still has locked joints so I am not sure if this is the issue. It could also be that I was using Hamner running model which maybe outdated.

POST REPLY