MATLAB install on Windows

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
Samuel Hybois
Posts: 15
Joined: Mon Nov 02, 2015 3:55 am

MATLAB install on Windows

Post by Samuel Hybois » Mon Nov 18, 2019 9:35 am

Hello guys!

Thanks a lot and congratulations to all the members of the developing team for the huge amount of work. I am really excited about exploring the new possibilities Moco provides!

As mentioned during the webinar, I will first try to run the examples in Matlab before going a bit deeper with this new tool. However, I have some trouble making it work, because Matlab does not seem to like having both OpenSim 4.0 and Moco libraries.
Here is what I did :
- run configureOpenSim.m from the "OpenSim 4.0" install folder (Matlab launched as administrator)
- restart Matlab and try "model = org.opensim.modeling.Model()" : everything is fine so far
- run configureMoco.m from the Moco install folder (Matlab launched as administrator)
- restart Matlab and try "model = org.opensim.modeling.Model()".

And there I get a Java exception error, which makes me think I did something wrong :/ any ideas?

Thanks for your help.

Samuel

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: MATLAB install on Windows

Post by Christopher Dembia » Mon Nov 18, 2019 3:33 pm

Hi, Sam! Thank you for trying Moco so quickly.

You cannot use Moco and a separate installation of OpenSim in Matlab simultaneously. But that's fine, because Moco includes a copy of OpenSim.

Run `configureMoco.m` and edit your Windows PATH to include Moco's bin directory. Make sure Moco's bin directory comes before OpenSim's bin directory.

You do not need to run as adminstrator anymore.

If you still get an error, can you provide the exact error?

We will be posting updated documentation soon. You can look at our temporary updated documentation here: https://opensim-org.github.io/opensim-m ... arted.html.

User avatar
Samuel Hybois
Posts: 15
Joined: Mon Nov 02, 2015 3:55 am

Re: MATLAB install on Windows

Post by Samuel Hybois » Tue Nov 19, 2019 2:30 am

Hi Chris!
Thanks a lot for your quick answer :D

I used your procedure and now it works really fine, and I am able to run "exempleSlidingMass.m" without error.

Wonderful!

Have a nice day :)

Sam

User avatar
Mritula Chandrasekaran
Posts: 94
Joined: Tue Dec 19, 2017 5:36 am

Re: MATLAB install on Windows

Post by Mritula Chandrasekaran » Wed Nov 20, 2019 7:07 am

Thanks, I faced the same error, changing the paths order of appearance, in environmental variables worked fine for me too.

Thanks again!! :D

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: MATLAB install on Windows

Post by Christopher Dembia » Wed Nov 20, 2019 12:58 pm

Thank you, Sam and Mritula. Please let us know if there are other ways we can help :)

POST REPLY