Hello all,
Is there a way to export the location coordinates of a joint's center in OpenSim during a motion?
Thank you,
Matthew
Joint Center Location
- Florian Schellenberg
- Posts: 7
- Joined: Thu Aug 16, 2012 8:08 am
Re: Joint Center Location
Hi Matthew,
Which joint center do you like to export? There is a workaround for ball-socket-joints, however, for knee joints (joints that are including translation) the way is more complex. I'm also searching for the same problem.
For a ball-socket-joint:
First, you can attach a marker to the exact joint location. Use the trc-file to find your joint center position.
Second, using point analysis, you can export the joint center location from a motion.
Please also let me know if you've found a more practicable solution, even for non-ball-socket-joints.
All the best,
Florian
Which joint center do you like to export? There is a workaround for ball-socket-joints, however, for knee joints (joints that are including translation) the way is more complex. I'm also searching for the same problem.
For a ball-socket-joint:
First, you can attach a marker to the exact joint location. Use the trc-file to find your joint center position.
Second, using point analysis, you can export the joint center location from a motion.
Please also let me know if you've found a more practicable solution, even for non-ball-socket-joints.
All the best,
Florian
- Matthew Edwards
- Posts: 7
- Joined: Fri Sep 19, 2014 10:55 am
Re: Joint Center Location
I am trying to find the center of the elbow joint. I was thinking about putting three markers around the joint and calculating the center like that. If I am understanding it correctly, in order for OpenSim to do inverse dynamics, it has to know where the center of the joint is. So, it has to track the joint's center throughout the movement. I just want to export those points.
- William Anderton
- Posts: 2
- Joined: Thu Dec 12, 2013 7:12 am
Re: Joint Center Location
I have thought about doing this too, but have not had the need or time to do so. Our lab uses another software package to compute biomechanics (MotionMonitor) but we sometimes take data from there into Opensim to explore the unknown. MotionMonitor software forces the user to create a bio mechanical model by specifying joint center locations which is required for inverse dynamics. For the hip joint center, the best way I know of is to do a "functional" method where you calculate the joint center from several positions forming, somewhat, a cone.
To track joint centers in OpenSim, this would be my approach if I was going to pursue it without turning myself into something analogous to a OpenSim developer where I have to download the code and alter things myself:
1) Each bone segment has geometry. Somewhere on or relative to that geometry is a joint center. For example, the ball of the humerus encloses the shoulder joint center and the distal end of the humerus is pretty close to the elbow joint center.
2) In each osim file, segments have a definition of which segment is the parent and where relative to the parent the child is located. So for the femur, the parent is the pelvis and the location is pre-defined and changes when the model is scaled. Not sure how that works precisely...
3) to track a joint center, place a <false> child segment (a segment that has no affect on the rest of the model) at the location of the joint center. This way, maybe if you are lucky, when the model is scaled the fake segment will move accordingly and you can now track that coordinate for any kinematics you can come up with. Be sure to link the fake child to the parent with a weld joint, making it a rigid pair so the joint center moves rigidly with the parent.
So to be more clear, if I had a bone segment called "humerus", I would create a fake bone called "humerus_jc" with small or no mass, and define it to be a child of "humerus" with location in parent equal to the location of the joint center as defined in the geometry file. Then make sure it is a weld joint between "humerus_jc" and "humerus."
The real challenge here is that you'll have to do some work with the geometry files (stl?) to determine where to place the joint centers.
In conclusion, I haven't tried this myself so I'm sorry if it turns out to be impossible or just plain bad
. I'm also sorry if there is a more obvious way and I didn't think of it. But I think you should be able to get what you want using this method.
Cheers
To track joint centers in OpenSim, this would be my approach if I was going to pursue it without turning myself into something analogous to a OpenSim developer where I have to download the code and alter things myself:
1) Each bone segment has geometry. Somewhere on or relative to that geometry is a joint center. For example, the ball of the humerus encloses the shoulder joint center and the distal end of the humerus is pretty close to the elbow joint center.
2) In each osim file, segments have a definition of which segment is the parent and where relative to the parent the child is located. So for the femur, the parent is the pelvis and the location is pre-defined and changes when the model is scaled. Not sure how that works precisely...
3) to track a joint center, place a <false> child segment (a segment that has no affect on the rest of the model) at the location of the joint center. This way, maybe if you are lucky, when the model is scaled the fake segment will move accordingly and you can now track that coordinate for any kinematics you can come up with. Be sure to link the fake child to the parent with a weld joint, making it a rigid pair so the joint center moves rigidly with the parent.
So to be more clear, if I had a bone segment called "humerus", I would create a fake bone called "humerus_jc" with small or no mass, and define it to be a child of "humerus" with location in parent equal to the location of the joint center as defined in the geometry file. Then make sure it is a weld joint between "humerus_jc" and "humerus."
The real challenge here is that you'll have to do some work with the geometry files (stl?) to determine where to place the joint centers.
In conclusion, I haven't tried this myself so I'm sorry if it turns out to be impossible or just plain bad
![Crying or Very Sad :cry:](./images/smilies/icon_cry.gif)
Cheers
- Florian Schellenberg
- Posts: 7
- Joined: Thu Aug 16, 2012 8:08 am
Re: Joint Center Location
Hi all,
Thanks William for your reply.
In the end, your suggestion would work, however, I think there is a easier one:
If you have no translation as a function of an angle (i.g. as one would find in the knee) and if the joint is defined as a pure rotation only (i.g. hip joint), you can add a marker on the the child segment, normally with its origin [0 0 0] or on the parent segment with it's position, where the child frame is attached. Use the tag <fixed>true</fixed>, so the marker is not moving relative to its attached segment during the scaling process.
Using IK-Tool and this marker, you are able to extract the joint center data as a .sto file. Alternatively, you can use the PointKinematics in the Analyze Tool.
For the "Hip Joint Center", the code looks like:
<Marker name="JC_hip_r">
<!--Body segment in the model on which the marker resides.-->
<body>pelvis</body>
<!--Location of a marker on the body segment.-->
<location> -0.0707 -0.0661 0.0835</location>
<!--Flag (true or false) specifying whether or not a marker should be kept fixed in the marker placement step. i.e. If false, the marker is allowed to move.-->
<fixed>true</fixed>
</Marker>
If you have further suggestion, recommendations or questions, please let me know.
Hope this helps, all the best,
Florian
Thanks William for your reply.
In the end, your suggestion would work, however, I think there is a easier one:
If you have no translation as a function of an angle (i.g. as one would find in the knee) and if the joint is defined as a pure rotation only (i.g. hip joint), you can add a marker on the the child segment, normally with its origin [0 0 0] or on the parent segment with it's position, where the child frame is attached. Use the tag <fixed>true</fixed>, so the marker is not moving relative to its attached segment during the scaling process.
Using IK-Tool and this marker, you are able to extract the joint center data as a .sto file. Alternatively, you can use the PointKinematics in the Analyze Tool.
For the "Hip Joint Center", the code looks like:
<Marker name="JC_hip_r">
<!--Body segment in the model on which the marker resides.-->
<body>pelvis</body>
<!--Location of a marker on the body segment.-->
<location> -0.0707 -0.0661 0.0835</location>
<!--Flag (true or false) specifying whether or not a marker should be kept fixed in the marker placement step. i.e. If false, the marker is allowed to move.-->
<fixed>true</fixed>
</Marker>
If you have further suggestion, recommendations or questions, please let me know.
Hope this helps, all the best,
Florian
- Pagnon David
- Posts: 86
- Joined: Mon Jan 06, 2014 3:13 am
Re: Joint Center Location
Hi all,
I'm also interested in this issue.
However, I thought that joint centers were calculated inside Opensim, so we would just need to find a way to export them to *.trc (or equivalent). I am very new to Opensim so this question might be naive, but how do they compute joint angles if they don't know joint centers' location ?
Florian, I don't understand how you are able to extract a marker from the IK-Tool (nor from the Analyse one. I don't know how to use this tool yet so please accept my apologies if this is obvious).
I'm also interested in this issue.
However, I thought that joint centers were calculated inside Opensim, so we would just need to find a way to export them to *.trc (or equivalent). I am very new to Opensim so this question might be naive, but how do they compute joint angles if they don't know joint centers' location ?
Florian, I don't understand how you are able to extract a marker from the IK-Tool (nor from the Analyse one. I don't know how to use this tool yet so please accept my apologies if this is obvious).
Last edited by Pagnon David on Wed May 06, 2015 7:01 pm, edited 1 time in total.
- afafa dfadfadfadf
- Posts: 2
- Joined: Fri Apr 17, 2015 4:18 am
Re: Joint Center Location
3) to track a joint center, place a <false> child segment (a segment that has no affect on the rest of the model) at the location of the joint center. This way, maybe if you are lucky, when the model is scaled the fake segment will move accordingly and you can now track that coordinate for any kinematics you can come up with. Be sure to link the fake child to the parent with a weld joint, making it a rigid pair so the joint center moves rigidly with the parent.
You can get score highest marks in cert killer dumps exam using and test 350-080 pdf king which are prepared by top certified professionals, Tabor College ccna wireless training; both are marvelous in www.the-bac.edu
Re: Joint Center Location
The joint centers are defined in your model. For the hip, the joint center is at {0, 0,0} of the femur body. Open the model (.osim) in a text editor (notepad++) and look up the joints
Florian's solution is the clearest and most simple to implement. Put a model marker at the location of the joint center and include the <report_marker_locations> true </report_marker_locations> tag in your IK setup file. It will print the XYZ locations of all the model markers to file.
Cheers,
-James
Florian's solution is the clearest and most simple to implement. Put a model marker at the location of the joint center and include the <report_marker_locations> true </report_marker_locations> tag in your IK setup file. It will print the XYZ locations of all the model markers to file.
Cheers,
-James