Page 1 of 1

Setting up MATLAB 2019b Scripting Environment OpenSim 4.0

Posted: Sat Nov 02, 2019 4:14 pm
by dc547
Dear All,

I have finally found the gut to update my main MATLAB scripts from OpenSim 3.3 to OpenSim 4.0.

I have followed the instructions from here (https://simtk-confluence.stanford.edu:8 ... ith+Matlab ), configured everything using the handy 'ConfigureOpenSim.m' function, and I checked that:
1) the OpenSim Java library are linked to MATLAB
2) the OpenSim C++ library are linked to MATLAB
3) updated Matlab folders in using path tools
4) Make sure OpenSim's bin directory is the first one in the PATH, and there are not other OpenSim \bin from previous versions (see snapshots attached)


However I get the flowing error in Matlab 2019b:
Failed to load one or more dynamic libraries for OpenSim.
java.lang.UnsatisfiedLinkError: no osimJavaJNI in java.library.path
Make sure OpenSim's bin directory is on your PATH.
See https://simtk-confluence.stanford.edu/d ... ith+Matlab
Java exception occurred:
java.lang.UnsatisfiedLinkError:
org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_0()J

at
org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_0(Native
Method)

at org.opensim.modeling.Model.<init>(Model.java:779)

Any idea why this happens? Any help is truly appreciated!

Many thanks!

Dario

Re: Setting up MATLAB 2019b Scripting Environment OpenSim 4.0

Posted: Sun Nov 03, 2019 2:32 am
by dc547
SOLVED!

I have followed the OpenSim 3.3 scripting installation guidelines and used the following commands:
1) edit classpath.txt instead of edit(fullfile(prefdir, 'javaclasspath.txt'))
2) edit librarypath.txt instead of edit(fullfile(prefdir, 'javalibrarypath.txt'))

Perhaps my 'prefdir' was not set up correctly.

Hope it helps.

Ciao

Dario