Page 1 of 1

MATLAB closes unexpectedly when trying to solve MocoInverse

Posted: Tue Sep 07, 2021 9:31 pm
by graceg17
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

Re: MATLAB closes unexpectedly when trying to solve MocoInverse

Posted: Tue Sep 07, 2021 9:57 pm
by lukejessup98
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

Re: MATLAB closes unexpectedly when trying to solve MocoInverse

Posted: Tue Sep 07, 2021 10:55 pm
by graceg17
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.