OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Thomas Gagliardi
Posts: 10
Joined: Mon Mar 12, 2018 7:28 am

OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by Thomas Gagliardi » Fri Jul 06, 2018 9:51 am

Hi,

I am working with OpenSim 4.0 Beta in the GUI. Trying to analyze the GIL files (from https://simtk.org/projects/mspeedwalksims) by scaling, IK, RRA, and CMC to extract muscle activations at different speeds: xslow, slow, free, fast. When I scale using the XML scaling setup file in GIL01 and apply manual scale factors to the femur, tibia, and talus (these scale factors are not included in the setup file), the tool says "Executing Scaling" but never stops and no result is produced. I've tried this with the Gait 2392 thelen and millard models, the newest Gait 2392 Subject 01 model (from https://github.com/opensim-org/opensim-models), and the Hamner full body with simple arms model.

Is this to do with a problem in the models, the GIL files, or the GUI?

Thanks,
TG

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by jimmy d » Fri Jul 06, 2018 11:21 pm

Hi, Thomas-

It may be a bug (it is in beta after all). An updated Beta got posted today. Download and install the new version and let me know if the issue still persists?

The data and setup files are also very 'old'. I think they were used on OpenSim version 1.7, so you may have to open and save the data in earlier versions. Have you tried 3.3?

User avatar
Thomas Gagliardi
Posts: 10
Joined: Mon Mar 12, 2018 7:28 am

Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by Thomas Gagliardi » Mon Jul 09, 2018 12:42 pm

Hi James,

Thanks for your response, I tried the new beta version of 4.0 and also 3.3, but the issue persisted. The models in the GIL folder did not load so I used the Gait 2392 model and it gets stuck executing the scaling. It scaled one time where the markers were away from the body in the z axis, but I could not get it to do this again.

Is there a way to convert "old" .osim and .xml files that were meant for 1.7 to use for the 4.0 and 3.3 versions?

Thanks,
TG

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

Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by Ayman Habib » Mon Jul 09, 2018 6:04 pm

Thomas,

You should be able to save all models in version 3.3 and then you'll be able to use them in version 4.0. If you can reproduce the stuck Scaling issue using our own models or models from the repository then please provide description of the steps to reproduce. AFAIK we test scaling of Hamner model as well as gait2392 model on regular basis in the GUI. If using 4.0, please provide platform as well.

Best regards,
-Ayman

User avatar
Thomas Gagliardi
Posts: 10
Joined: Mon Mar 12, 2018 7:28 am

Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by Thomas Gagliardi » Tue Jul 10, 2018 1:36 pm

Hi Ayman,

Just gave that a try, maybe you can identify my erroneous steps. In OpenSim 3.3,

(1) I loaded the Hamner full body model (https://simtk.org/frs/download_confirm. ... oup_id=516)

(2) Opened the scaling tool and loaded the GIL01_Setup_Scale.xml file in the static trial folder (from https://simtk.org/frs/download_confirm. ... oup_id=317)

Running this produces a scaled model with markers away from the body (image attached). Is there a way to get these markers back on the model? I am able to save the scaled model and load it in OpenSim 4.0 with the same marker errors. If we can get the markers back on the model, the problem will be solved.

If the same procedure is followed in OpenSim 4.0, the femur, tibia and talus do not have scale factors and manual input of these factors results in the stuck scaling result (even after using the convert files tool to update the GIL01 files to the latest format).

Thanks again for your time and assistance,
Thomas

P.S. I tried using OpenSim 1.5 and 1.8 but these versions could not run on my Windows machine.
Attachments
Scaled GIL01.tiff
Scaled GIL01.tiff (47.05 KiB) Viewed 1925 times

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

Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by Ayman Habib » Tue Jul 10, 2018 2:30 pm

Hi Thomas,

For version 4.0, the issue boils down to duplicate names (coordinates and Markers) in the model, the messages window shows
Model '3DGaitModelwithSimpleArms' has subcomponents with duplicate name 'hip_r'.
The duplicate is being renamed to 'hip_r_0'.
Model '3DGaitModelwithSimpleArms' has subcomponents with duplicate name 'hip_l'.
The duplicate is being renamed to 'hip_l_0'.
Model '3DGaitModelwithSimpleArms' has subcomponents with duplicate name 'knee_r'.
The duplicate is being renamed to 'knee_r_0'.
Model '3DGaitModelwithSimpleArms' has subcomponents with duplicate name 'ankle_r'.
The duplicate is being renamed to 'ankle_r_0'.
Model '3DGaitModelwithSimpleArms' has subcomponents with duplicate name 'knee_l'.
The duplicate is being renamed to 'knee_l_0'.
Model '3DGaitModelwithSimpleArms' has subcomponents with duplicate name 'ankle_l'.
The duplicate is being renamed to 'ankle_l_0'.

We're enforcing a strict unique naming convention, unfortunately this results in renaming the Marker(s) above and thus measurement can't be used (check the scale factors tab and you'll see that thigh and shank measurements are now undefined vs. 3.3) the rest is downstream effect of this. You should be able to change the names to make 4.0 behaves as 3.3 in this regard.

For 3.3, I wouldn't average the full time range for static trial particularly that one marker (epiconMed_l) appears mislabeled or unspecified. I also don't know where the weights came from.

I'd load the static trial data to preview, make sure it can be lined up with the model before proceeding.

Let us know how it goes or if you're able to proceed with 4.0 GUI after renaming.

Best regards,
-Ayman

User avatar
Thomas Gagliardi
Posts: 10
Joined: Mon Mar 12, 2018 7:28 am

Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by Thomas Gagliardi » Wed Jul 11, 2018 11:01 am

Hi Ayman,

I renamed the joints in the .osim file from "hip_r" to "hip_r_0" and did this for knee and ankle left and right too. This resulted in the scale factors filling in for the femur, tibia and talus and allowing the option for scaling to run. When run, however, the tool gets stuck in executing scaling.

Is my renaming process what you had intended?

Thanks,
TG

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

Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by Ayman Habib » Wed Jul 11, 2018 3:42 pm

Hi Thomas,

Yes, these are two separate issues. The renaming allows you to use 4.0 and be consistent with 3.3 which is helpful to all users.

Looking at the weights I see that the translation coordinates of the model pelvis_tx, pelvis_ty, pelvis_tz are specified as 0 with very high weight. If you remove these (to allow the model to translate) then IK should solve.

Hope this helps,
-Ayman

User avatar
Thomas Gagliardi
Posts: 10
Joined: Mon Mar 12, 2018 7:28 am

Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by Thomas Gagliardi » Mon Jul 23, 2018 11:50 am

Hi Ayman,

Thank you for your help on the previous issue, I was able to proceed with 3.3 once I disabled the pelvis translation coordinates.

I am now having trouble with scaling a different model and marker set. After scaling, the markers are in perfect positions but the model is away seemingly at the pelvis. A picture is attached, any ideas on how to get the model back on markers?

Thanks,
Tommy
Attachments
Scaling.tiff
Scaling.tiff (33.24 KiB) Viewed 1785 times

User avatar
Vishal R
Posts: 47
Joined: Wed Oct 29, 2014 4:20 pm

Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC

Post by Vishal R » Fri Sep 21, 2018 2:24 am

gagliart wrote:
Wed Jul 11, 2018 11:01 am
I renamed the joints in the .osim file from "hip_r" to "hip_r_0" and did this for knee and ankle left and right too. This resulted in the scale factors filling in for the femur, tibia and talus and allowing the option for scaling to run.
aymanh wrote:
Wed Jul 11, 2018 3:42 pm
Looking at the weights I see that the translation coordinates of the model pelvis_tx, pelvis_ty, pelvis_tz are specified as 0 with very high weight. If you remove these (to allow the model to translate) then IK should solve.
Following both the suggestions, I was able to scale the model(using OpenSim3.3). But what I am bothered is that I have a huge scale error.

Code: Select all

Frame at (t=0):	total squared error = 0.28054, marker error: RMS=0.0848136, max=0.221662 (thighwand_l)
I am not sure if I would like to perform CMC using this model. How can I reduce the scale errors as this is fundamental to the subsequent analysis?

POST REPLY