some question on scaling and IK in Opensim

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Xiaoyan Hu
Posts: 5
Joined: Wed Apr 30, 2014 10:24 am

some question on scaling and IK in Opensim

Post by Xiaoyan Hu » Wed Apr 30, 2014 10:35 am

Hi Everyone,

We are now using OpenSim to solve inverse kinematics problem for our current project. I carefully read the user guide and follow the user guide step by step. After spending several days on tuning parameters such as markers placement, scale factors and weights, I got an IK result for my walking data. The result looks fine but does not always match the Mocap data well (in some frames). Since I am new to OpenSim, I am not quiet sure whether I correctly use OpenSim tools to scale model and solve inverse kinematics for Mocap data. I have some questions in using the tools.

Here is what I do:
Basically I have got Mocap data from Vicon and exported marker trajectories as trc files (including a static T-pose and a walking motion) and then I use the “3DGaitModel2354” model to do inverse kinematics in OpenSim. Because virtual markers defined in “3DGaitModel2354” and our Mocap markers do not agree, I deleted all virtual markers and added new markers manually according to the Mocap data. In the scaling step I tried both measurement factors and manually set factors and their combination and in inverse kinematics step I set the weights by hand.

My questions are:
1. If I download a model with no virtual markers included, should I add markers manually? Are there any standards or rules on how to place virtual markers? Or it is recommended to add and edit markers according to the markers of Vicon Mocap data?
2. How does the model scaling work? I mean if I scale the humerus, ulna and radius with different scaling factors (e.g, they are scaled by factors 1.0, 1.3 and 1.4 respectively), what does OpenSim do to keep the joint well articulated? How does OpenSim define the scaled kinematics (the rotation axis, pivot)?
3. How to set the weights when doing scaling and inverse kinematics? I saw in some examples a few weights are set to 1000.00 and others are 1.0. Are there some rules of thumb to set these weights?

Thank you for your help,
regards!

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

Re: some question on scaling and IK in Opensim

Post by jimmy d » Mon May 05, 2014 5:17 pm

Hi Xiaoyan,

Markers are added to match those in the experimental trial. You can think of them as either points of reference (for scaling) or tracking (for IK). They can be as arbitrary as you wish. There is no 'rules' for markers, though many model marker sets match that of generally used experimental marker sets (Plug in gait, Helen Hayes, etc).

Scaling (in respect to what you are describing) simply applies a factor to the xyz geometry of the body. The relationship of bodies with their joints and axes are maintained.

Marker weights are set based on the 'confidence' you have in that marker. In scale, it is the relationship between marker location on the model matching that of the experimental placement. In IK, it is the amount of noise that may be present in the marker during movement. There isnt an established rule of thumb.

Hope that helps,
-james

User avatar
Xiaoyan Hu
Posts: 5
Joined: Wed Apr 30, 2014 10:24 am

Re: some question on scaling and IK in Opensim

Post by Xiaoyan Hu » Tue May 06, 2014 8:12 am

Hi james,

Thank you for your help. Your detailed reply really helps me in understanding how to do model scaling and inverse kinematics in opensim.
I am now doing inverse kinematics in opensim. But the result looks not as good as I expected. In my ik setting, I only used marker trajectory which recorded a bending motion of right arm. But in my experiment, Ik seemed give a result just direct bend the elbow joint, which in our mocap data, the subject first twist radius to about 90 degrees and then do bending motion. Is this means that IK traped into a local minimal? How can I initialzize the arm to first twist about 90 degrees (using coordinate data?)

Xiaoyan

User avatar
shuyang han
Posts: 15
Joined: Mon Jan 05, 2015 9:52 am

Re: some question on scaling and IK in Opensim

Post by shuyang han » Mon Jan 12, 2015 9:08 am

Hi Xiaoyan,

I am having the same problem. Have you solved it? What marker set do you use in your experiment, and the values for scale factor and weights? Thank you!
xiaoyanhu wrote:Hi james,

Thank you for your help. Your detailed reply really helps me in understanding how to do model scaling and inverse kinematics in opensim.
I am now doing inverse kinematics in opensim. But the result looks not as good as I expected. In my ik setting, I only used marker trajectory which recorded a bending motion of right arm. But in my experiment, Ik seemed give a result just direct bend the elbow joint, which in our mocap data, the subject first twist radius to about 90 degrees and then do bending motion. Is this means that IK traped into a local minimal? How can I initialzize the arm to first twist about 90 degrees (using coordinate data?)

Xiaoyan

User avatar
shuyang han
Posts: 15
Joined: Mon Jan 05, 2015 9:52 am

Re: some question on scaling and IK in Opensim

Post by shuyang han » Mon Jan 12, 2015 9:08 am

Hi Xiaoyan,

I am having the same problem. Have you solved it? What marker set do you use in your experiment, and the values for scale factor and weights? Thank you!
xiaoyanhu wrote:Hi james,

Thank you for your help. Your detailed reply really helps me in understanding how to do model scaling and inverse kinematics in opensim.
I am now doing inverse kinematics in opensim. But the result looks not as good as I expected. In my ik setting, I only used marker trajectory which recorded a bending motion of right arm. But in my experiment, Ik seemed give a result just direct bend the elbow joint, which in our mocap data, the subject first twist radius to about 90 degrees and then do bending motion. Is this means that IK traped into a local minimal? How can I initialzize the arm to first twist about 90 degrees (using coordinate data?)

Xiaoyan

POST REPLY