Page 1 of 1

Problem scaling patella coordinates

Posted: Mon Jun 28, 2010 1:44 pm
by emarnold
There is a bug associated with OpenSim that has implications for scaling the OpenSim version of these models.
The model uses coordinate coupler constraints to define the motion of the patella as a function of the coordinate knee_angle.
When the patella is scaled, these scale factors appear to be double counted and the patella kinematics, and thus the attachments for the quadriceps, are incorrect. This problem is easy to observe if you manually scale the model a large, uniform amount (try 2). The patella moves away from the femur and tibia and the motion is very different from the unscaled version.

This bug will apparently be fixed in OpenSim 2.1, but in the mean time, here's a work-around.

If the patella is scaled in your scaling scheme:
Save the scaled model as a .osim file*
Open up the .osim file in an xml editor such as Notepad++.
Find the section
<ConstraintSet name="">
<objects>
<CoordinateCouplerConstraint ...
Find this line for each coupler constraint:
<scale_factor> theresanumberhere </scale_factor>

Replace theresanumberhere with the value 1.0
"Save" or "Save As..." the .osim file.
Open it up in the GUI and check that the kinematics look the same as the unscaled version.

*If you are scaling in the command line instead of the GUI, skip this step. You already have a .osim file output from scale.exe.