Hello, I am trying to run the static optimization tool and when I load my motion file and start to run I get this error:
Exception:
Error loading mesh file: scapula.obj. The file should exist in same folder
with model.
Loading is aborted.
This scapula file is in the exact same folder that my model is saved in. I have run the forward dynamics tool with the exact folder and model but when I try to run the static optimization tool I'm getting the error above.
Is there something I am doing wrong?
Error loading mesh file
- Clarissa LeVasseur
- Posts: 8
- Joined: Mon May 18, 2015 1:28 pm
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Error loading mesh file
You can open the .osim file of the model and examine how the scapula.obj file is included in the model
or
In the first case, OpenSim searches for the scapula.obj either in the model directory or the global geometry path, which is located in the OpenSim installation path (e.g., C:\OpenSim X.X\Geometry). You can copy the scapula.obj in the Geometry folder as a last resolve.
Code: Select all
<geometry_file>scapula.obj</geometry_file>
Code: Select all
<geometry_file>some relative path/scapula.obj</geometry_file>
- Clarissa LeVasseur
- Posts: 8
- Joined: Mon May 18, 2015 1:28 pm
Re: Error loading mesh file
What if I have the file in the main folder that the model is in and the geometry folder?
Also this is a contact geometry file so the code reads:
<filename>scapula.obj</filename>
Also this is a contact geometry file so the code reads:
<filename>scapula.obj</filename>
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Error loading mesh file
This repository has done something similar (contact geometries) and the .obj files are placed next to the .osim file:
https://github.com/msdemers/landing-opt ... -framework
Are you able to correctly load the model in the OpenSim GUI?
If yes, then there might be some bug in the StaticOptimization tool. It is possible that the StaticOptimization changes the working directory. Try to read the message window for more information.
Maybe you can find a workaround by copying the .obj files in the Geometry folder.
https://github.com/msdemers/landing-opt ... -framework
Are you able to correctly load the model in the OpenSim GUI?
If yes, then there might be some bug in the StaticOptimization tool. It is possible that the StaticOptimization changes the working directory. Try to read the message window for more information.
Maybe you can find a workaround by copying the .obj files in the Geometry folder.
- Clarissa LeVasseur
- Posts: 8
- Joined: Mon May 18, 2015 1:28 pm
Re: Error loading mesh file
Yes it loads correctly in the GUI. Would trying OpenSim 4.0 potentially fix the bug? I will look at the link you sent me as well.
- Colin Holtkamp
- Posts: 10
- Joined: Tue Jan 22, 2019 10:44 am
Re: Error loading mesh file
did you every resolve this issue. I am having the same issue. My model loads correctly in the GUI however when I go to scale it using the scale tool, i get the same message.
"Error loading Mesh file:./tibial_plane.obj. The file should exist in the same folder as the model. Loading aborted."
The .obj file is clearly in the same folder as the model
Any help would be great. Thanks!
"Error loading Mesh file:./tibial_plane.obj. The file should exist in the same folder as the model. Loading aborted."
The .obj file is clearly in the same folder as the model
Any help would be great. Thanks!