OpenSim 4.5 and matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
john pope
Posts: 3
Joined: Thu Sep 02, 2021 2:12 pm

OpenSim 4.5 and matlab

Post by john pope » Fri Sep 13, 2024 12:49 pm

I recently received a new mac pro M3. I reinstalled OpenSim on the new cpu and I am now unable to run any OpenSim files in MATLAB. The error i receive is below. I have already been through the simtk scripting with matlab tutorial and trouble shooting.

I have tried adding OpenSim to PATH: In the shell configuration file. NO luck

can you please point me in the right direction?


>> import org.opensim.modeling.*
model = Model();
disp(model)
Failed to load one or more dynamic libraries for OpenSim.
java.lang.UnsatisfiedLinkError: no osimJavaJNI in java.library.path: [/Applications/MATLAB_R2024a.app/bin/maca64, /Applications/MATLAB_R2024a.app/sys/jxbrowser/maca64/lib, /Applications/OpenSim 4.5/opensim-moco-0.4.0/sdk/lib]
Java exception occurred:
java.lang.UnsatisfiedLinkError: 'long
org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_0()'
at org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_0(Native Method)
at org.opensim.modeling.Model.<init>(Model.java:779)

User avatar
Carmichael Ong
Posts: 401
Joined: Fri Feb 24, 2012 11:50 am

Re: OpenSim 4.5 and matlab

Post by Carmichael Ong » Fri Sep 13, 2024 2:42 pm

This error message is indeed a bit cryptic and misleading. With the newer versions of MATLAB, there are now two versions of MATLAB for Mac (Intel and Apple Silicon). OpenSim 4.5 only has libraries that work with the Intel installation, so make sure to use that version of MATLAB. Even though your laptop is not an Intel laptop, it will still be able to use that version.

More info can be found in this other post: viewtopicPhpbb.php?f=91&t=18597&p=50742&start=0&view=

POST REPLY