Scaled model displaced when loading .mot file
- Sheeba Davis
- Posts: 56
- Joined: Sat Mar 23, 2019 5:19 am
Scaled model displaced when loading .mot file
Hello!!!
1. When I open my scaled model in GUI it looks fine but when I load the scaledstatic.mot file, it gets displaced. I checked the model offset, it looks fine.
2. Also in the scaled model, femur and tibia seems to be missing.
Can someone please help me with this.
Thanks in advance,
Sheeba
1. When I open my scaled model in GUI it looks fine but when I load the scaledstatic.mot file, it gets displaced. I checked the model offset, it looks fine.
2. Also in the scaled model, femur and tibia seems to be missing.
Can someone please help me with this.
Thanks in advance,
Sheeba
Tags:
- Michael Asmussen
- Posts: 67
- Joined: Mon Jul 11, 2016 7:46 am
Re: Scaled model displaced when loading .mot file
Hi Sheeba,
1. For the scaled model, how far is it displaced? How far is the model relative to the displayed coordinate system?
2. Where are your .vtp files located? Check to see if you model in the .xml file is calling the correct .vtp file for the femur and tibia.
I hope this helps
Mike
1. For the scaled model, how far is it displaced? How far is the model relative to the displayed coordinate system?
2. Where are your .vtp files located? Check to see if you model in the .xml file is calling the correct .vtp file for the femur and tibia.
I hope this helps
Mike
- Sheeba Davis
- Posts: 56
- Joined: Sat Mar 23, 2019 5:19 am
Re: Scaled model displaced when loading .mot file
Hi Mike
Thank you very much for your reply .
Couldn't find file 'r_tibia.vtp'.
Couldn't find file 'l_femur.vtp'.
Couldn't find file 'l_tibia.vtp'.
Thank you for all your help.
Regards
Sheeba
Thank you very much for your reply .
The model goes below the ground. I checked the model offset and all of them showed 0. When i actually open the scaled model it look fine but when i overlayed experimental markers on the model markers, the model went below the floor.1. For the scaled model, how far is it displaced? How far is the model relative to the displayed coordinate system?
I checked the .vtp files of femur & tibia which are in the same location as other segments. i am not sure about what you mean by 'Check to see if you model in the .xml file is calling the correct .vtp file for the femur and tibia'. Can you please explain me further. I have attached the scaled model (without displaying the muscles) and also the messages that i got in the message window. Couldn't find file 'r_femur.vtp'.2. Where are your .vtp files located? Check to see if you model in the .xml file is calling the correct .vtp file for the femur and tibia.
Couldn't find file 'r_tibia.vtp'.
Couldn't find file 'l_femur.vtp'.
Couldn't find file 'l_tibia.vtp'.
Thank you for all your help.
Regards
Sheeba
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Scaled model displaced when loading .mot file
Hi Sheeba,
If you did Marker Placement along with scaling, the resulting model is posed for the static trial so it's very possible it doesn't have the same coordinate values as the original model. There's nothing wrong with that since coordinate values can be changed from the GUI and have no bearing on the model function. You can set the coordinate values/sliders to match the pre-scaled model.
For the mesh files, the model you're using apparently uses custom mesh files (we renamed our mesh files in 4.0+ to avoid duplication so there's no l_femur, r_femur instead we have femur_l and femur_r). If you're not using custom generated meshes, the easiest solution is to change the names of the vtp files in the osim file so you don't need to keep dealing with this issue, and so that the model can be used by others or on different machines/versions without a problem. You can find the latest mesh filenames by opening a model from the distribution (e.g. Gait2354), selecting meshes in the 3D view and picking the filenames from the Properties window.
Hope this helps,
-Ayman
If you did Marker Placement along with scaling, the resulting model is posed for the static trial so it's very possible it doesn't have the same coordinate values as the original model. There's nothing wrong with that since coordinate values can be changed from the GUI and have no bearing on the model function. You can set the coordinate values/sliders to match the pre-scaled model.
For the mesh files, the model you're using apparently uses custom mesh files (we renamed our mesh files in 4.0+ to avoid duplication so there's no l_femur, r_femur instead we have femur_l and femur_r). If you're not using custom generated meshes, the easiest solution is to change the names of the vtp files in the osim file so you don't need to keep dealing with this issue, and so that the model can be used by others or on different machines/versions without a problem. You can find the latest mesh filenames by opening a model from the distribution (e.g. Gait2354), selecting meshes in the 3D view and picking the filenames from the Properties window.
Hope this helps,
-Ayman
- Sheeba Davis
- Posts: 56
- Joined: Sat Mar 23, 2019 5:19 am
Re: Scaled model displaced when loading .mot file
Hi Ayman
Thank you very much for your reply.
Also, matlab crashes when I run the code.
Thanks in advance,
Regards
Sheeba
Thank you very much for your reply.
When I open the scaled model, this is how it looks, but when I load a motion file, then the model goes below the ground, I am unable to understand where might be the problem.If you did Marker Placement along with scaling, the resulting model is posed for the static trial so it's very possible it doesn't have the same coordinate values as the original model. There's nothing wrong with that since coordinate values can be changed from the GUI and have no bearing on the model function. You can set the coordinate values/sliders to match the pre-scaled model.
I have renamed the femur and tibia segments in the properties window of my model based on the names of the bodies provided in Gait2354 model, but still the scaled model is the same with the absence of those segments. Is anything missing in what I have done?For the mesh files, the model you're using apparently uses custom mesh files (we renamed our mesh files in 4.0+ to avoid duplication so there's no l_femur, r_femur instead we have femur_l and femur_r). If you're not using custom generated meshes, the easiest solution is to change the names of the vtp files in the osim file so you don't need to keep dealing with this issue, and so that the model can be used by others or on different machines/versions without a problem. You can find the latest mesh filenames by opening a model from the distribution (e.g. Gait2354), selecting meshes in the 3D view and picking the filenames from the Properties window.
Also, matlab crashes when I run the code.
Thanks in advance,
Regards
Sheeba
- Axel Koussou
- Posts: 56
- Joined: Mon Aug 10, 2020 12:07 am
Re: Scaled model displaced when loading .mot file
Hi Sheeba,
I'm using the Rajagopal model and I had the same problem of missing femur and tibia after scaling.
So, as explained by Ayman, I renamed my .vtp files in my osim file. For example, if you look at the attachments, for the tibia I renamed from l_tibia.vtp to tibia_l.vtp.
I can't explain to you why but it seems to work.
Hope it will help.
I'm using the Rajagopal model and I had the same problem of missing femur and tibia after scaling.
So, as explained by Ayman, I renamed my .vtp files in my osim file. For example, if you look at the attachments, for the tibia I renamed from l_tibia.vtp to tibia_l.vtp.
I can't explain to you why but it seems to work.
Hope it will help.
- Attachments
-
- Capture.PNG (27.28 KiB) Viewed 1613 times
- Sheeba Davis
- Posts: 56
- Joined: Sat Mar 23, 2019 5:19 am
Re: Scaled model displaced when loading .mot file
Hi Axel
Thanks for your response.
Ya, I renamed the vtp files as Ayman mentioned and I can now see the femur and tibia in my scaled model.
Thanks,
Sheeba
Thanks for your response.
Ya, I renamed the vtp files as Ayman mentioned and I can now see the femur and tibia in my scaled model.
Thanks,
Sheeba
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Scaled model displaced when loading .mot file
Hi Sheeba,
The pose of the scaled model suggests that the static trial was collected in a different coordinate system from OpenSim (Y up, X forward). For static trial and scaling that maybe ok, but for other motions moving forward you need to preview and transform experimental data using the File->Preview Experimental Data... feature of the application.
Hope this helps,
-Ayman
The pose of the scaled model suggests that the static trial was collected in a different coordinate system from OpenSim (Y up, X forward). For static trial and scaling that maybe ok, but for other motions moving forward you need to preview and transform experimental data using the File->Preview Experimental Data... feature of the application.
Hope this helps,
-Ayman
- Sheeba Davis
- Posts: 56
- Joined: Sat Mar 23, 2019 5:19 am
Re: Scaled model displaced when loading .mot file
Hi Ayman
Thank you very much for your response.
I realized that the data's orientation is same as that of OpenSim and so I didn't have to rotate. But now I find another problem that I have added some new markers to the model based on experimental data and included them for scaling the model (in sclaemeasurementSet.xml & scaletask.xml files). Of course the errors were large, at the same I also observed that when I load the static motion file to the scaled model (as I wanted to overlay experimental markers on the model markers to see how far are the new model markers from the experimental markers) and what I observe is shown below (the new markers are displayed away from the scaled model). Can you please let me know what might be the problem? Thanks for all your help.
Regards
Sheeba
Thank you very much for your response.
I realized that the data's orientation is same as that of OpenSim and so I didn't have to rotate. But now I find another problem that I have added some new markers to the model based on experimental data and included them for scaling the model (in sclaemeasurementSet.xml & scaletask.xml files). Of course the errors were large, at the same I also observed that when I load the static motion file to the scaled model (as I wanted to overlay experimental markers on the model markers to see how far are the new model markers from the experimental markers) and what I observe is shown below (the new markers are displayed away from the scaled model). Can you please let me know what might be the problem? Thanks for all your help.
Regards
Sheeba
- Sheeba Davis
- Posts: 56
- Joined: Sat Mar 23, 2019 5:19 am
Re: Scaled model displaced when loading .mot file
Hi Ayman
I solved the issue. The new markers were not connected to parent body but to the ground.
Another question: In order to reduce rms and max marker errors, I slightly moved the new markers manually close to experimental markers and scaled it again. This procedure reduced the errors. But is it right to keep moving all the markers this way? I tried to move only the new markers that I placed manually (also reduced their weights in scaletask file) and did not touch the original model markers. Can you please give your opinion on this?
Thanks
Sheeba
I solved the issue. The new markers were not connected to parent body but to the ground.
Another question: In order to reduce rms and max marker errors, I slightly moved the new markers manually close to experimental markers and scaled it again. This procedure reduced the errors. But is it right to keep moving all the markers this way? I tried to move only the new markers that I placed manually (also reduced their weights in scaletask file) and did not touch the original model markers. Can you please give your opinion on this?
Thanks
Sheeba