Upper extremity model and markers ?
- Kazutaka Takahashi
- Posts: 16
- Joined: Tue Jan 29, 2008 4:48 pm
Upper extremity model and markers ?
I am trying to reconstruct as many joint angles as possible from markers placed on an arm and fingers. Can we midify the upper extremity model so that we can add a set of markers whose locations are defined relative to landmarks in the segments in the upper extremity model ?
Thanks !
Thanks !
- Daniel Leib
- Posts: 75
- Joined: Mon Sep 11, 2006 6:44 am
RE: Upper extremity model and markers ?
Good evening,
This is indeed possible. To do so, assuming you already have all of the segments of interest to you defined as bodies, you must add to the your_name_marker_set.xml file and then any other xml documents that reference these values as well.
One of the markers defined in an example xml file is:
<Marker name="R.Acromium">
<location>-0.03 0.44 0.15</location>
<fixed>false</fixed>
<body>torso</body>
</Marker>
The name is the name of the marker in your collected data.
Location is the "expected" position of the marker relative to the origin of the body it will be attached to in antero-posterior, vertical, medio-lateral coordinates. While you can't say, for instance, "deltoid tuberosity," you can get a good approximation with a numerical value, then the error will be mitigated by the 'fixed' value.
Fixed as false means that the marker will be moved from the "expected" location on the body to where the experimentally collected coordinate actually is during the scaling analysis. If set to true, this adjustment will not happen.
Body is the name of the segment you have defined you would like the marker to influence.
Have a good one,
-Dan
This is indeed possible. To do so, assuming you already have all of the segments of interest to you defined as bodies, you must add to the your_name_marker_set.xml file and then any other xml documents that reference these values as well.
One of the markers defined in an example xml file is:
<Marker name="R.Acromium">
<location>-0.03 0.44 0.15</location>
<fixed>false</fixed>
<body>torso</body>
</Marker>
The name is the name of the marker in your collected data.
Location is the "expected" position of the marker relative to the origin of the body it will be attached to in antero-posterior, vertical, medio-lateral coordinates. While you can't say, for instance, "deltoid tuberosity," you can get a good approximation with a numerical value, then the error will be mitigated by the 'fixed' value.
Fixed as false means that the marker will be moved from the "expected" location on the body to where the experimentally collected coordinate actually is during the scaling analysis. If set to true, this adjustment will not happen.
Body is the name of the segment you have defined you would like the marker to influence.
Have a good one,
-Dan
- Kazutaka Takahashi
- Posts: 16
- Joined: Tue Jan 29, 2008 4:48 pm
RE: Upper extremity model and markers ?
Thank you so much for your reply and sorry for my very late reply, Dan !
OK, let me try that out and see. Also, I am wondering if I can combine two existing models, the wrist and the upper extremity models available in OpenSim already...
OK, let me try that out and see. Also, I am wondering if I can combine two existing models, the wrist and the upper extremity models available in OpenSim already...
- Ayman Habib
- Posts: 2253
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Upper extremity model and markers ?
Dear Kazutaka,
The only way to combine models as of now is to edit the XML files and manually merge corresponding XML elements (e.g. <ActuatorSet>, <DynamicsEngine>, ..) in both models.
This is an error prone process, and we hope to address it in the near future..
Best,
-Ayman
The only way to combine models as of now is to edit the XML files and manually merge corresponding XML elements (e.g. <ActuatorSet>, <DynamicsEngine>, ..) in both models.
This is an error prone process, and we hope to address it in the near future..
Best,
-Ayman
- Kazutaka Takahashi
- Posts: 16
- Joined: Tue Jan 29, 2008 4:48 pm
RE: Upper extremity model and markers ?
Hi. Sorry for a late reply.
I made a marker set file as in the example based on an arm model, but when I scale it with an actual data obtained from Vicon, when I just choose "Scale Model" option, then the marker locations relatively fine, but one of the elbow bearing goes off.
Then, when I choose both "Scale Model" and "Adjust Model Markers", the arm gets into a very strange position and all the markers are way off from the arm and offsets are too huge.
The data in TRC file to be read looks fine, so I don't know what I have been doing wrong...
I made a marker set file as in the example based on an arm model, but when I scale it with an actual data obtained from Vicon, when I just choose "Scale Model" option, then the marker locations relatively fine, but one of the elbow bearing goes off.
Then, when I choose both "Scale Model" and "Adjust Model Markers", the arm gets into a very strange position and all the markers are way off from the arm and offsets are too huge.
The data in TRC file to be read looks fine, so I don't know what I have been doing wrong...
- Ayman Habib
- Posts: 2253
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Upper extremity model and markers ?
Hi,
What options are you using for Scaling (manual vs. measurement)? Scaling does nothing more than just scaling the multibody system and muscles by 3 scale factors in X,Y,Z directions. You either specify these factors or have the software compute them from measurements. If an experimental marker disappears that would be because there's no corresponding marker in the model with the same name.
If that doesn't help, please file a bug-report and include both the model, trc file and settings file for scaling and I'll check it out.
-Ayman
What options are you using for Scaling (manual vs. measurement)? Scaling does nothing more than just scaling the multibody system and muscles by 3 scale factors in X,Y,Z directions. You either specify these factors or have the software compute them from measurements. If an experimental marker disappears that would be because there's no corresponding marker in the model with the same name.
If that doesn't help, please file a bug-report and include both the model, trc file and settings file for scaling and I'll check it out.
-Ayman
- Kazutaka Takahashi
- Posts: 16
- Joined: Tue Jan 29, 2008 4:48 pm
RE: Upper extremity model and markers ?
Thank you for your quick reply.
I am using measurement based scaling.
All marker names are in TRC and they are consistent with the OpenSim model I am using to scale.
OK, then I can file a bug report.
I am using measurement based scaling.
All marker names are in TRC and they are consistent with the OpenSim model I am using to scale.
OK, then I can file a bug report.
- Ayman Habib
- Posts: 2253
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Upper extremity model and markers ?
Hi,
In terms of scaling I think what you're seeing is the expected behavior (that the new scaled model is loaded in the GUI but "DISPLAYED" with offset so you can see both the pre and post-scaling models.
You can change this offset using the "popup-menu" of the model's node in the Navigator window, then select Display->Model Offset.
A couple observations on the model/data:
1. The trc file you're using has over 37K frames and goes for a long time, you may need to cut on that for scaling. Is this a static trial?
2. The mass is 0. so I don't know how to set the preserve mass distribution checkbox.
3. You didn't send/post the measurements you're using to scale segments.
One other note related to the model is that units are probably mm so you may want to adjust display of Muscles and markers using Edit->Preferences (and multiply the sizes by 1000) for better viewing.
Adjust model markers is optionally done after scaling to move markers that were not placed during static trial at the exact position as the markers in the model, for that you either use a .trc from static trial or use any .trc file but pick a very small number of frames where you don't expect markers to move.
Hope this helps,
-Ayman
In terms of scaling I think what you're seeing is the expected behavior (that the new scaled model is loaded in the GUI but "DISPLAYED" with offset so you can see both the pre and post-scaling models.
You can change this offset using the "popup-menu" of the model's node in the Navigator window, then select Display->Model Offset.
A couple observations on the model/data:
1. The trc file you're using has over 37K frames and goes for a long time, you may need to cut on that for scaling. Is this a static trial?
2. The mass is 0. so I don't know how to set the preserve mass distribution checkbox.
3. You didn't send/post the measurements you're using to scale segments.
One other note related to the model is that units are probably mm so you may want to adjust display of Muscles and markers using Edit->Preferences (and multiply the sizes by 1000) for better viewing.
Adjust model markers is optionally done after scaling to move markers that were not placed during static trial at the exact position as the markers in the model, for that you either use a .trc from static trial or use any .trc file but pick a very small number of frames where you don't expect markers to move.
Hope this helps,
-Ayman
- Kazutaka Takahashi
- Posts: 16
- Joined: Tue Jan 29, 2008 4:48 pm
RE: Upper extremity model and markers ?
Thank you for your reply on saturday!
It seems that I sent you a wrong setting file!
I did specify the mass (7kg) and the averange measurements are taken from 3.9 to 4 seconds from that data in TRC. I used humerus, ulna, ulna1, radius, and radius1 with specified measurement with markers on the shoulder, elbow, and forearm (the end of the ulna/radius).
Well, the display offset is one thing, but I do get an elbow socket to be detached from the elbow of the model and the markers are still off quite a bit. Also, I could set the dimension in Edit->Preference as there are no muscles in my model at this point.
It seems that I sent you a wrong setting file!
I did specify the mass (7kg) and the averange measurements are taken from 3.9 to 4 seconds from that data in TRC. I used humerus, ulna, ulna1, radius, and radius1 with specified measurement with markers on the shoulder, elbow, and forearm (the end of the ulna/radius).
Well, the display offset is one thing, but I do get an elbow socket to be detached from the elbow of the model and the markers are still off quite a bit. Also, I could set the dimension in Edit->Preference as there are no muscles in my model at this point.
- Ayman Habib
- Posts: 2253
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Upper extremity model and markers ?
Dear kazutaka,
Can you attach the corrected setup file to the bug report please. As I indicated earlier marker placement/(or Move Model Markers) does nothing to the model other than solving one frame of IK (that's the average over the time specified).
Please keep in mind that the averaged frames are supposed to be from a static pose so you should select a range of frames where segment lengths do not change significantly.
-Ayman
Can you attach the corrected setup file to the bug report please. As I indicated earlier marker placement/(or Move Model Markers) does nothing to the model other than solving one frame of IK (that's the average over the time specified).
Please keep in mind that the averaged frames are supposed to be from a static pose so you should select a range of frames where segment lengths do not change significantly.
-Ayman