Hello,
I just recently downloaded the Wu shoulder musculoskeletal model. Now, I have trouble running the MATLAB code, the JR_MEX.m file. I appreciate any help. I obtain the following errors:
... (I am omitting warnings and some additional file which are called durring the error below)
...
from C:\OpenSim 3.3\Scripts\Matlab\Matlab\Wu_shoulder_model\JR3_mex_parent.cpp:4:
C:\OpenSim 3.3\sdk\include\SimTK\include/pthread.h:307:8: error: redefinition of 'struct timespec'
struct timespec {
^~~~~~~~
... (I am omitting warnings and some additional file which are called durring the error below)
...
from C:\OpenSim 3.3\Scripts\Matlab\Matlab\Wu_shoulder_model\JR3_mex_parent.cpp:4:
C:/ProgramData/MATLAB/SupportPackages/R2020a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/sys/timeb.h:90:8: error: previous definition of 'struct timespec'
struct timespec {
^~~~~~~~
Since the struct timespec is already defined I commented out the additional definition in pthread.h. Then I get an different error that there are many undefined references.
Does someone know whats wrong here? Maybe setting up the MATLAB with opensim? I am using MATLAB2020a and Opensim 3.3.
Thank you for your help.
Kind regards,
Jeremy
Setting Up MATLAB
- Jeremy Genter
- Posts: 16
- Joined: Wed Oct 21, 2020 2:47 am
Re: Setting Up MATLAB
I figured it out.
while setting up the mex file funnktion "mex -setup" I chose:
Microsoft Visual C++ 2019 (C) instead of other language mex -setup C++ ---> Microsoft Visual C++ 2019
while setting up the mex file funnktion "mex -setup" I chose:
Microsoft Visual C++ 2019 (C) instead of other language mex -setup C++ ---> Microsoft Visual C++ 2019
- Hazimah Mahmud
- Posts: 14
- Joined: Mon Jan 20, 2020 9:16 am
Re: Setting Up MATLAB
Hi Jeremy,
I am also interested in using Wu Shoulder Model. I just would like to know if the Matlab code still works? I am using OpenSim 4.1 and there is compatibility issue (the API command is somewhat outdated). So I would like to know if it definitely works with OpenSim 3.3 (the code runs perfectly ok).
Thanks,
Hazimah
I am also interested in using Wu Shoulder Model. I just would like to know if the Matlab code still works? I am using OpenSim 4.1 and there is compatibility issue (the API command is somewhat outdated). So I would like to know if it definitely works with OpenSim 3.3 (the code runs perfectly ok).
Thanks,
Hazimah
- Jeremy Genter
- Posts: 16
- Joined: Wed Oct 21, 2020 2:47 am
Re: Setting Up MATLAB
Hi Hazimah,
I just ran in a different problem. While loading the model I get a java.lang.UnsatisfiedLinkError.
I'll get back to you once I figured out the problem.
Cheers,
Jeremy
I just ran in a different problem. While loading the model I get a java.lang.UnsatisfiedLinkError.
I'll get back to you once I figured out the problem.
Cheers,
Jeremy
- Jeremy Genter
- Posts: 16
- Joined: Wed Oct 21, 2020 2:47 am
Re: Setting Up MATLAB
Hi Hazimah,
The MATLAB script does work with OpenSim 3.3.
The Problem with the java.lang.UnsatisfiedLinkError could be resolved by running the configureOpenSim.m again
cheers,
Jeremy
The MATLAB script does work with OpenSim 3.3.
The Problem with the java.lang.UnsatisfiedLinkError could be resolved by running the configureOpenSim.m again
cheers,
Jeremy
hazimahm wrote: ↑Fri Nov 06, 2020 8:12 amHi Jeremy,
I am also interested in using Wu Shoulder Model. I just would like to know if the Matlab code still works? I am using OpenSim 4.1 and there is compatibility issue (the API command is somewhat outdated). So I would like to know if it definitely works with OpenSim 3.3 (the code runs perfectly ok).
Thanks,
Hazimah
- Christopher Hollhumer
- Posts: 3
- Joined: Wed Feb 09, 2022 8:07 am
Re: Setting Up MATLAB
I have been having some trouble getting this program to work in Matlab. Currently, I am stuck with this error when running Run_shoulder_model_example.m
Unrecognized function or variable 'getBody'.
Error in Run_shoulder_model_example (line 104)
humerus=mk_GH.getBody();
I am running with OpenSim 4.0
Unrecognized function or variable 'getBody'.
Error in Run_shoulder_model_example (line 104)
humerus=mk_GH.getBody();
I am running with OpenSim 4.0