Hello,
I am relatively new to OpenSim, basically I have managed to export data from Visual 3D in .mot format. I am trying to load this motion file to lower extremity model (Both legs with muscles) and it comes up with an error : 'Could not associate motion file to model'. However I am able to load the same motion file to a different model - 3DGiantModel2392. I am not sure why its happening, I would appreciate any help.
Regards
Jas
Unable to associate motion(.mot file) to model
- Ayman Habib
- Posts: 2239
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Unable to associate motion(.mot file) to model
Hi Jas,
For OpenSim to associate a motion file to a model, the file has to have at least some column headers that match the names of the coordinates in the model.
Hope this explains why you can associate a motion with one model but not another.
Best regards,
-Ayman
For OpenSim to associate a motion file to a model, the file has to have at least some column headers that match the names of the coordinates in the model.
Hope this explains why you can associate a motion with one model but not another.
Best regards,
-Ayman
Re: Unable to associate motion(.mot file) to model
Hi Ayman,
Thanks for your reply. Would you be able to clarify how to match the column headers with the name of the coordinates in the model? Is there an example or a tutorial that I could follow that shows me how to do it?
Thankyou
Jas
Thanks for your reply. Would you be able to clarify how to match the column headers with the name of the coordinates in the model? Is there an example or a tutorial that I could follow that shows me how to do it?
Thankyou
Jas
- Ayman Habib
- Posts: 2239
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Unable to associate motion(.mot file) to model
Hi Jas,
The motion file (.mot or .sto) is an ASCII file that you can open in notepad and see the column headers as text. These headers should match the names of the coordinates in the model. Coordinate names show up in the Coordinate view in the OpenSim GUI and can be edited by opening the model .osim file in a text editor and changing the names of the coordinates accordingly (they would be located under the <Coordinate> tags.
Hope this helps,
-Ayman
The motion file (.mot or .sto) is an ASCII file that you can open in notepad and see the column headers as text. These headers should match the names of the coordinates in the model. Coordinate names show up in the Coordinate view in the OpenSim GUI and can be edited by opening the model .osim file in a text editor and changing the names of the coordinates accordingly (they would be located under the <Coordinate> tags.
Hope this helps,
-Ayman
Re: Unable to associate motion(.mot file) to model
Hi Ayman,
Thankyou for explaining why I was unable to associate the motion to the model. What I can see is the motion file has names like hip_flexion_r whereas the model .osim file has names like r_hip_flexion. I have tried editing the model .osim file in the editor and changed the names from r_hip_flexion to hip_flexion_r exactly like the names in the motion(.mot) file.
Now I get a loading error, I cant load the edited model .osim file. I am not sure if manually editing the model .osim file is the right way to do it? or if I am just making a typing error somewhere though I used find and replace so I dont think I have missed anything.
Thankyou
Jas
Thankyou for explaining why I was unable to associate the motion to the model. What I can see is the motion file has names like hip_flexion_r whereas the model .osim file has names like r_hip_flexion. I have tried editing the model .osim file in the editor and changed the names from r_hip_flexion to hip_flexion_r exactly like the names in the motion(.mot) file.
Now I get a loading error, I cant load the edited model .osim file. I am not sure if manually editing the model .osim file is the right way to do it? or if I am just making a typing error somewhere though I used find and replace so I dont think I have missed anything.
Thankyou
Jas
- Iman Shirinbayan
- Posts: 7
- Joined: Mon Oct 20, 2014 6:39 am
Re: Unable to associate motion(.mot file) to model
Hi Jas,
I think you better change the header of your (.mot) file rather than changing your .osim file. Because sometimes in .osim file, when you change a joint's name, you have to change some other representations of that join's name such as display subroutines (that might cause the error). I think it is more convenient to adjust you .mot file to .osim. file.
Bests,
Iman
I think you better change the header of your (.mot) file rather than changing your .osim file. Because sometimes in .osim file, when you change a joint's name, you have to change some other representations of that join's name such as display subroutines (that might cause the error). I think it is more convenient to adjust you .mot file to .osim. file.
Bests,
Iman
- Mritula Chandrasekaran
- Posts: 94
- Joined: Tue Dec 19, 2017 5:36 am
Re: Unable to associate motion(.mot file) to model
Hi I have data of many subjects, it becomes impossible to change the .mot headers of so many subjects. What shall I do? I am facing the same problem
Thanks,
Mritula
Thanks,
Mritula
- Ayman Habib
- Posts: 2239
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Unable to associate motion(.mot file) to model
Hello,
You can write a script to modify all the files in python or matlab or alternatively you can change the model file to rename coordinates, just make sure you don't have other files (e.g. setup files for tools) or other places in the model that refer to the old coordinate names.
Hope this helps,
-Ayman
You can write a script to modify all the files in python or matlab or alternatively you can change the model file to rename coordinates, just make sure you don't have other files (e.g. setup files for tools) or other places in the model that refer to the old coordinate names.
Hope this helps,
-Ayman