Page 1 of 2
OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Fri Jul 06, 2018 9:51 am
by gagliart
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
Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Fri Jul 06, 2018 11:21 pm
by jimmy
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?
Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Mon Jul 09, 2018 12:42 pm
by gagliart
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
Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Mon Jul 09, 2018 6:04 pm
by aymanh
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
Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Tue Jul 10, 2018 1:36 pm
by gagliart
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.
Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Tue Jul 10, 2018 2:30 pm
by aymanh
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
Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Wed Jul 11, 2018 11:01 am
by gagliart
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
Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Wed Jul 11, 2018 3:42 pm
by aymanh
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
Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Mon Jul 23, 2018 11:50 am
by gagliart
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
Re: OpenSim 4.0 Beta GUI Issue with Scaling, Inverse Kinematics and CMC
Posted: Fri Sep 21, 2018 2:24 am
by masterv
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?