Hello,
I was trying to scale my data(markers, static trials) to your model, but it always ends up in a mess
I already set the reference geometry path to the models geometry path, so that does not change anything. I renamed the markers of my data and also in the static trial.trc file.
Playing around with scaling factors (using measured or manual scaling factors) also does not change a thing - the model always looks the same (see attached picture).
Have you encountered any of these problems before? Or am I missing something?
Is it possible, that my data(which I received from a colleague) uses different geometry files (i.e. also different parent frames, coordinate systems and rotations) and that messes up everything? If yes, how could I apply my markers and static trials to your model, so that it works?
I hope you understand my struggle and maybe even have a hint towards the right solution
Thanks in advance!
Daniel
Scaling with own data
- Daniel Kolb
- Posts: 4
- Joined: Sat Oct 02, 2021 1:50 am
Scaling with own data
- Attachments
-
- Scaling.PNG (62.88 KiB) Viewed 786 times
- Jacob J. Banks
- Posts: 97
- Joined: Tue Jul 15, 2014 5:17 am
Re: Scaling with own data
Hmmmm.... definitely not how the model should look!
Without having all your scale settings and markers available, my first response is to just ask you to reopen the model. We have noticed that sometimes the model appears to scale incorrectly immediately following scaling (when using the GUI) because the geometry files aren't initially found (for whatever reason), but when you reopen the model it is corrected. However, this effect usually appears as a spine above the head. If your model isn't finding the geometries files at all, you wouldn't have any ribs etc. and when you open up the 'BaseModel' they wouldn't appear (ribs especially).
It is unclear to me what your talking about with your colleagues data... I would assume this is just marker data? If it is Inverse Kinematics data, then you would need to make sure that the coordinate names align with those in our model (I can't recall if they need to appear in the same order as well). But sounds like just marker data?
Did you assign your markers correctly (affixed to the proper rigid-body segment)? Have you done this before successfully with another model? What do the 'Applied Scale Factors' (2nd tab in Scale Tool) look like? Are they reasonable? If not, your scaling something incorrectly.
Bottom line, I'm confident this is all 'fixable'. Can zoom meet at some point if your struggles continue.
Jake Banks
Without having all your scale settings and markers available, my first response is to just ask you to reopen the model. We have noticed that sometimes the model appears to scale incorrectly immediately following scaling (when using the GUI) because the geometry files aren't initially found (for whatever reason), but when you reopen the model it is corrected. However, this effect usually appears as a spine above the head. If your model isn't finding the geometries files at all, you wouldn't have any ribs etc. and when you open up the 'BaseModel' they wouldn't appear (ribs especially).
It is unclear to me what your talking about with your colleagues data... I would assume this is just marker data? If it is Inverse Kinematics data, then you would need to make sure that the coordinate names align with those in our model (I can't recall if they need to appear in the same order as well). But sounds like just marker data?
Did you assign your markers correctly (affixed to the proper rigid-body segment)? Have you done this before successfully with another model? What do the 'Applied Scale Factors' (2nd tab in Scale Tool) look like? Are they reasonable? If not, your scaling something incorrectly.
Bottom line, I'm confident this is all 'fixable'. Can zoom meet at some point if your struggles continue.
Jake Banks
- Daniel Kolb
- Posts: 4
- Joined: Sat Oct 02, 2021 1:50 am
Re: Scaling with own data
Hi Jake,
first of all thanks for the quick reply!
So reopening the saved model actually did the job - thanks a lot for that tip!
Reading your reply, I have some follow-up questions I'd like to ask:
- you said this happens when using the GUI - is there a better way to scale/use OpenSim in general? Would you recommend using Matlab or other scripting programs?
- What exactly do you mean, by 'assigning the markers correctly'. The markers from my model appear on the right rigid body (also checked by looking at the properties), /on the landmarks they should be
Some scaling factors are ridiculously low, I might have a deeper look into that, now that I know the scaling at least works
Oh, and yes, it is marker data from static and moving trials, which I want to use for Inverse Kinematics, Inverse Dynamics, Static Optimization and Joint Reaction Analaysis. I also have some motion files, ground reaction files and other external load files I'd like to apply to your model.
Again, thanks for the quick and successful help - I'm looking forward to working with your model!
Daniel
first of all thanks for the quick reply!
So reopening the saved model actually did the job - thanks a lot for that tip!
Reading your reply, I have some follow-up questions I'd like to ask:
- you said this happens when using the GUI - is there a better way to scale/use OpenSim in general? Would you recommend using Matlab or other scripting programs?
- What exactly do you mean, by 'assigning the markers correctly'. The markers from my model appear on the right rigid body (also checked by looking at the properties), /on the landmarks they should be
Some scaling factors are ridiculously low, I might have a deeper look into that, now that I know the scaling at least works
Oh, and yes, it is marker data from static and moving trials, which I want to use for Inverse Kinematics, Inverse Dynamics, Static Optimization and Joint Reaction Analaysis. I also have some motion files, ground reaction files and other external load files I'd like to apply to your model.
Again, thanks for the quick and successful help - I'm looking forward to working with your model!
Daniel
- Jacob J. Banks
- Posts: 97
- Joined: Tue Jul 15, 2014 5:17 am
Re: Scaling with own data
Good deal! Glad it worked.
- We scale using Matlab API scripts only to streamline things and minimize input errors, but you get the same results.
- I think it sounds like you are assigning the markers correctly. I originally asked/meant if you were just placing the markers on the model without regard to assigning markers to the rigid body it should controlling. I suppose this may not change the scaling, but would impact IK. Again, I think your doing it correctly.
- yeah, your scaling factors should be (depending on participant size) between .8-1.2 (? just in general). If your getting <.5 or >1.5 you may have some poorly placed markers or an abnormally sized participant! Worst case just scale dimensions relative to a head and foot marker distance (i.e., height) and you should be ok. Note: there are a lot of bodies (i.e., 17 vertebrae) you will want to assign factors too, so make sure you do.
- model should work with all the recorded data. Just note that the back kinetics are solved from the top-down (arms to pelvis) and the lower limbs are solved from the bottom-up (feet to pelvis) because the pelvis is the base segment. This means you need to account for any external loads being held as well.
Ok? Glad your using our model. Good luck with things and let me/us know if you have any other issues/questions.
Jake Banks
- We scale using Matlab API scripts only to streamline things and minimize input errors, but you get the same results.
- I think it sounds like you are assigning the markers correctly. I originally asked/meant if you were just placing the markers on the model without regard to assigning markers to the rigid body it should controlling. I suppose this may not change the scaling, but would impact IK. Again, I think your doing it correctly.
- yeah, your scaling factors should be (depending on participant size) between .8-1.2 (? just in general). If your getting <.5 or >1.5 you may have some poorly placed markers or an abnormally sized participant! Worst case just scale dimensions relative to a head and foot marker distance (i.e., height) and you should be ok. Note: there are a lot of bodies (i.e., 17 vertebrae) you will want to assign factors too, so make sure you do.
- model should work with all the recorded data. Just note that the back kinetics are solved from the top-down (arms to pelvis) and the lower limbs are solved from the bottom-up (feet to pelvis) because the pelvis is the base segment. This means you need to account for any external loads being held as well.
Ok? Glad your using our model. Good luck with things and let me/us know if you have any other issues/questions.
Jake Banks
- Daniel Kolb
- Posts: 4
- Joined: Sat Oct 02, 2021 1:50 am
Re: Scaling with own data
Good morning,
all right, I'll get started right away with properly scaling and finding my errors!
For the vertebraes and other bodies that are not scaled with the markers - should I find an "average" scale factor, or use as you said e.g. the head to foot marker distance and apply that for all the other bodies?
And could you specify what you mean with I need to account for any external loads being held as well?
For my case, I have GRF data and want to apply external forces on the sternum and the shoulders. Do you mean to create these force files and apply them on the right spots?
Because I have positions and recoreded data for that as well, if that is what you meant...
Thanks again for the help!
Daniel
all right, I'll get started right away with properly scaling and finding my errors!
For the vertebraes and other bodies that are not scaled with the markers - should I find an "average" scale factor, or use as you said e.g. the head to foot marker distance and apply that for all the other bodies?
And could you specify what you mean with I need to account for any external loads being held as well?
For my case, I have GRF data and want to apply external forces on the sternum and the shoulders. Do you mean to create these force files and apply them on the right spots?
Because I have positions and recoreded data for that as well, if that is what you meant...
Thanks again for the help!
Daniel
- Jacob J. Banks
- Posts: 97
- Joined: Tue Jul 15, 2014 5:17 am
Re: Scaling with own data
For scaling, as I mentioned prior, if all else fails just go with height. But if you have a full-body marker set you can scale things more precisely. For example, with the vertebrae, you would be better off scaling relative to a C7 to PSIS distance (for y), a C7 to sternum distance (for X), and a shoulder to shoulder or psis to psis (for Z) (all for example). OpenSim goes through this fairly well (below link). My other bit of advice would be to just state it often "more art than science":
https://simtk-confluence.stanford.edu:8 ... Scale+Tool
You'll need to model the external force on the sternum and shoulders. The 'easiest' is to just make it an external force (like a GRF.forces file, or as a part of it) and direct it where/how you want (which is what you proposed). Alternatively, if it is a rigid body (like a box or barbell) you can just add that body to the model. Up to you, but you definitely need to account for it if your interested in spine loading, as the top-down approach does not consider GRFs.
You'll also want to be sure to have a proper actuator file to account for any kinetic 'slop' and to aid in finding a solution with SOpt. I suggest making sure the Pelvis has extra optimal forces.
Ok? Let me know if anything is still unclear. Otherwise it sounds like you have a decent grasp on things, just start trying stuff out.
Jake Banks
https://simtk-confluence.stanford.edu:8 ... Scale+Tool
You'll need to model the external force on the sternum and shoulders. The 'easiest' is to just make it an external force (like a GRF.forces file, or as a part of it) and direct it where/how you want (which is what you proposed). Alternatively, if it is a rigid body (like a box or barbell) you can just add that body to the model. Up to you, but you definitely need to account for it if your interested in spine loading, as the top-down approach does not consider GRFs.
You'll also want to be sure to have a proper actuator file to account for any kinetic 'slop' and to aid in finding a solution with SOpt. I suggest making sure the Pelvis has extra optimal forces.
Ok? Let me know if anything is still unclear. Otherwise it sounds like you have a decent grasp on things, just start trying stuff out.
Jake Banks
- RANDHEER SINGH
- Posts: 6
- Joined: Thu May 13, 2021 3:14 am
Re: Scaling with own data
Hi Daniel,
I was also looking for the setup files for this full-body model, including the scale setup, RRA setup, and SO setup files. If you have access to these could you please share these with me? Thanks in anticipation.
Regards,
Randheer
randheers@iitgn.ac.in
I was also looking for the setup files for this full-body model, including the scale setup, RRA setup, and SO setup files. If you have access to these could you please share these with me? Thanks in anticipation.
Regards,
Randheer
randheers@iitgn.ac.in