Opening Arnold 2010 model in newer versions of OpenSim

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Rodrigo Mateus
Posts: 55
Joined: Thu Feb 22, 2018 3:07 am

Opening Arnold 2010 model in newer versions of OpenSim

Post by Rodrigo Mateus » Thu Nov 25, 2021 2:57 am

Hi there,

My name is Rodrigo and I have been trying to start working with the Arnold model due to its knee model with patella. However, whenever I try to open it in OpenSim 4.2, this window appears.
1.png
1.png (146.33 KiB) Viewed 1543 times
Is this troublesome?

On the other hand, I have been using the gait2392 model for my simulations, and I performed the Inverse Kinematics step in Visual3D.

Do I still need to update all the motion files I have been using in the scripting shell?

Also, regarding the lower and upper bounds for each coordinate, they are different than the ones in the gait2392 model. Do I need to change them in order make my data suitable to the model? Because I already tried it and came across some difficulties, because some bounds are in radians and other are in degrees, which does not happen in the gait2392 model.
2.png
2.png (491.08 KiB) Viewed 1543 times
Looking forward for your help!

Best regards,

Rodrigo Mateus

Tags:

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Opening Arnold 2010 model in newer versions of OpenSim

Post by Ayman Habib » Sat Nov 27, 2021 12:56 pm

Hello,

For Arnold 2010 model, as the message suggests he coordinate types are inconsistent with joint definitions. If you save the model, the coordinate types will be fixed but if you need to reuse old results/motion files you'll need to run the suggested script. The explanation for the change is described under upgrade notes for version 4.0 here
https://simtk-confluence.stanford.edu/d ... penSim+4.0

If any model shows the same warnings then the same process applies (the model will auto-upgrade, but result files need upgrading).

Coordinate bounds are used exclusively for IK and are stored in the xml file in radians but we display them in degrees in the application for convenience.

Hope this helps,
-Ayman

User avatar
Rodrigo Mateus
Posts: 55
Joined: Thu Feb 22, 2018 3:07 am

Re: Opening Arnold 2010 model in newer versions of OpenSim

Post by Rodrigo Mateus » Tue Dec 21, 2021 4:23 pm

Hi Ayman,

Thank you so much, it was very helpful and insightful!

Is there an example of a script where updatePre40KinematicsFilesFor40MotionType() is used? Because I have not been able to run this function during my last tries.

Rodrigo

User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: Opening Arnold 2010 model in newer versions of OpenSim

Post by Thomas Uchida » Tue Dec 21, 2021 9:41 pm

Is there an example of a script where updatePre40KinematicsFilesFor40MotionType() is used?
You can find examples by searching the GitHub repository for "updatePre40KinematicsFilesFor40MotionType". Here are two search results:
- in C++: https://github.com/opensim-org/opensim- ... s.cpp#L122
- in Python: https://github.com/opensim-org/opensim- ... ies.py#L17

User avatar
Rodrigo Mateus
Posts: 55
Joined: Thu Feb 22, 2018 3:07 am

Re: Opening Arnold 2010 model in newer versions of OpenSim

Post by Rodrigo Mateus » Mon Feb 07, 2022 11:01 am

Is there a version of these examples in Matlab?

Thank you in advance!

Rodrigo

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Opening Arnold 2010 model in newer versions of OpenSim

Post by Ayman Habib » Tue Feb 08, 2022 9:53 am

Hi Rodrigo,

The syntax for python and Java/Matlab is similar, except for the class/specification, signature below

Code: Select all

opensimSimulation.updatePre40KinematicsFilesFor40MotionType(Model model, StdVectorString filePaths)
so, you'll create an instance of the Model, instance of StdVectorString , append file names to the latter then make the call.

Hope this helps,
-Ayman

User avatar
Rodrigo Mateus
Posts: 55
Joined: Thu Feb 22, 2018 3:07 am

Re: Opening Arnold 2010 model in newer versions of OpenSim

Post by Rodrigo Mateus » Thu Feb 10, 2022 7:17 am

Thank you so much!

However, when I run it, this message appears:

updateKinematicsStorageForUpdatedModel(): motion 'Visual3d_SIMM_input.mot' does not contain inconsistent coordinate 'knee_angle_r_beta'.
updateKinematicsStorageForUpdatedModel(): motion 'Visual3d_SIMM_input.mot' does not contain inconsistent coordinate 'knee_angle_l_beta'.

Albeit, in the Arnold model, this coordinate is equal to knee_angle. "4/12/2011 version 2: The patellar joint and corrseponding coupler constraints were altered to work around a problem with coordinate coupler constraints that occurs during scaling in OpenSim.
Translational coordinate coupler constraints were scaled incorrectly in the OpenSim 2.2 Scale tool. This affected constraints that were used to define patellar motion as a
function of knee_angle_l and knee_angle_r. This issue is worked around here by replacing the three coordinates defining rotational and translational motion in the left and right patella
bodies with a single rotational coordinate in each, knee_angle_beta_*, and coupling the new coordinates to equal knee_angle_*."


How do I get around it?

POST REPLY