Lower Limb Model 2010 + OpenSim 4.1

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
David Ortiz
Posts: 2
Joined: Sun Apr 26, 2020 2:29 pm

Lower Limb Model 2010 + OpenSim 4.1

Post by David Ortiz » Mon Apr 27, 2020 2:01 pm

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?
Attachments
Screen Shot 2020-04-27 at 13.26.41.png
Screen Shot 2020-04-27 at 13.26.41.png (281.3 KiB) Viewed 332 times

Tags:

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

Re: Lower Limb Model 2010 + OpenSim 4.1

Post by Ayman Habib » Tue Apr 28, 2020 10:14 am

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

User avatar
David Ortiz
Posts: 2
Joined: Sun Apr 26, 2020 2:29 pm

Re: Lower Limb Model 2010 + OpenSim 4.1

Post by David Ortiz » Sat May 09, 2020 1:27 am

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
Attachments
Screen Shot 2020-05-09 at 01.22.00.png
Screen Shot 2020-05-09 at 01.22.00.png (109.31 KiB) Viewed 261 times

POST REPLY