Page 1 of 1

Matlab crashes while trying to make set-up files for RRA

Posted: Thu Sep 02, 2021 6:58 am
by eadooley
Hello,

I am using the Matlab-OpenSim API so that I can batch file several RRA simulations and use Matlab to change parameters of my model between each RRA simulation. To set up the RRA Tool, as I understand it, you need to send in your motion file (IK results), a tasks file, and an actuators file (force set). I can make all of these files and I know which parameters to change, but if I try to make more than one in one session of Matlab (either through running the function to make the force file in a loop, or manually clicking run after updating a parameter) Matlab quickly crashes. This doesn't seem to happen at a consistent time/iteration though. Sometimes Matlab will be fine to make the files for 12 variations and sometimes only 2... or 1.

When I tried to dig into why this was happening the best I could come up with is that it has something to do with needing to import org.opensim.modeling* at the top of any function using the OpenSim library. However, the only way it seems to be able to close the import is in the command window while nothing else is running. This would make batch filing impossible, so I figure there must be another way that I can't find.

I moved to just having Matlab make the set up files then run RRA in the GUI because I could consistently run the simulations and not worry about Matlab crashing. The files are correct and all directing to right places, as the RRA runs just fine in the GUI. I would really like to also be able to run the RRA tool through Matlab as well.

Has anyone else encountered this problem or something similar with a different tool? Any thoughts or suggestions would be greatly appreciated.

Thanks for your time.

Best,
Evan