Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'getJoint' error in Matlab #4

Closed
Sina-Tabeiy opened this issue Jun 14, 2021 · 9 comments
Closed

'getJoint' error in Matlab #4

Sina-Tabeiy opened this issue Jun 14, 2021 · 9 comments

Comments

@Sina-Tabeiy
Copy link

Hi Luca,
While running 'create_femAnt_models.m' I faced some error in the function 'getJointCentresForBone' which said:

Processing body: femur_l
Undefined function 'getJoint' for input arguments of type 'org.opensim.modeling.Body'.

Error in getJointCentresForBone (line 23)
proxJoint = cur_body.getJoint();

Error in create_femAnt_models (line 60)
[Pprox, Pdist, total_L, V] = getJointCentresForBone(osimModel, bone_to_deform);

----------------------------

I double-checked Doxygen to find any probable mistake in scripting, but everything seemed to be correct. Any advice?

@modenaxe
Copy link
Owner

Hi Sina,
if you want to replicate the results of the study you have to set up OpenSim using the 3.3 version as specified in the requirements section of the documentation.
If you are trying to use the deformation tool for your own case, instead, you should be able to use OpenSim 4 as well.
Which one is your case?
Cheers,
Luca

@modenaxe
Copy link
Owner

just to be clear, getJoint is a method available in OpenSim 3.3 and removed in 4.0, so the error is due to an OpenSim version issue.

@Sina-Tabeiy
Copy link
Author

Hi Luca,
Actually, I was trying to use the tool for Opensim generic models like 2354 and 2392, but I ended up getting the error mentioned above. The installed API version on Matlab is 4.2; Do I need to install Opensim API 3.3 in this case?
Sincerely,
Sina

@modenaxe
Copy link
Owner

The deformation tool should be able to detect which OpenSim version you are using, otherwise it means that this function is not producing the correct output. Please check in your machine.

If you are trying to replicate the paper results, instead, you should use OpenSim 3.3, I have used that version and not tested for OpenSim 4.

@Sina-Tabeiy
Copy link
Author

Hi Luca,
I ran 'getOpenSimVersion' fun in my machine but this error showed up:

Error in getOpenSimVersion (line 18)
version = osimpath(sep_set(end)+1:end);

Does it mean that Opensim API 4.x is not supporting this code too?

@modenaxe
Copy link
Owner

Hi,
sorry I just realized I never merged the Opensim 4 code in the main branch.
Please download it again and let me know if it works...it should! :)
Luca

@modenaxe
Copy link
Owner

Obviously I am referring to the tool repository: https://github.com/modenaxe/msk-bone-deformation
The paper scripts run on OpenSim 3.3.

@Sina-Tabeiy
Copy link
Author

Hi Luca,
You did it well; I got the proper version of OpenSim after running the function. I also retried to deform the model 2354 and it ran perfectly. Great job!
Sincerely,
Sina

@modenaxe
Copy link
Owner

@Sina-Tabeiy glad it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants