Page 1 of 1

Lower Limb Model 2010 + OpenSim 4.1

Posted: Mon Apr 27, 2020 2:01 pm
by dtortizw
Hello. I'm completely new to OpenSim, as of last night. I'm attempting to use the Lower Limb Model 2010 model, as recommended by one of my dissertation committee members. When I open the model, I get the following error messages (also seen in attached screenshot):

You must update any motion files you generated in versions prior to 4.0. You can:
(1) Run the updatePre40KinematicsFilesFor40MotionType() utility (in the scripting shell) OR
(2) Re-run the Inverse Kinematics tool with the updated model in 4.0.


Is there a trick to using the update...() utility? I attempted to copy and paste that code into the scripting shell, but the following error occurred:

Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'updatePre40KinematicsFilesFor40MotionType' is not defined


My issue with the second option is that the model was last updated in 2011.

Summary of questions: Is there any way for me to continue using this model? Do I need to install the update...() utility?

Re: Lower Limb Model 2010 + OpenSim 4.1

Posted: Tue Apr 28, 2020 10:14 am
by aymanh
Hello,

With the model loaded in the application, you can type this in the scripting shell:

Code: Select all

import org.opensim.modeling as osim;
m = getCurrentModel()
oldFiles = osim.StdVectorString()
oldFiles .add('test.sto')
osim.opensimSimulation.updatePre40KinematicsFilesFor40MotionType(m, oldFiles)
Replace 'test.sto' with actual full path names for the files you want converted. I would recommend to recreate the files in the latest version anyway if you need to change something later.

Please let us know how that goes,
-Ayman

Re: Lower Limb Model 2010 + OpenSim 4.1

Posted: Sat May 09, 2020 1:27 am
by dtortizw
Hi Dr. Habib,

Thank you for the response! I ran into issues with running the code itself - the ... ellipses would pop up whenever I ran the code, regardless of whether I was attempting to use the path for the model itself or simply a portion of the model (screenshot attached), so I'm not sure if I was missing something. But I was able to find the Convert Files subtab of the Tools tab for the application itself - I can now open the models without any pop-up messages, so I'm guessing the conversion worked! Thank you!

Best,

David