Error loading mesh file

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Clarissa LeVasseur
Posts: 8
Joined: Mon May 18, 2015 1:28 pm

Error loading mesh file

Post by Clarissa LeVasseur » Mon May 06, 2019 8:01 pm

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?

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Error loading mesh file

Post by Dimitar Stanev » Mon May 06, 2019 11:47 pm

You can open the .osim file of the model and examine how the scapula.obj file is included in the model

Code: Select all

<geometry_file>scapula.obj</geometry_file>
or

Code: Select all

<geometry_file>some relative path/scapula.obj</geometry_file>
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.

User avatar
Clarissa LeVasseur
Posts: 8
Joined: Mon May 18, 2015 1:28 pm

Re: Error loading mesh file

Post by Clarissa LeVasseur » Tue May 07, 2019 5:13 am

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>

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Error loading mesh file

Post by Dimitar Stanev » Tue May 07, 2019 7:23 am

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.

User avatar
Clarissa LeVasseur
Posts: 8
Joined: Mon May 18, 2015 1:28 pm

Re: Error loading mesh file

Post by Clarissa LeVasseur » Tue May 07, 2019 8:13 am

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.

User avatar
Colin Holtkamp
Posts: 10
Joined: Tue Jan 22, 2019 10:44 am

Re: Error loading mesh file

Post by Colin Holtkamp » Tue Dec 31, 2019 11:01 am

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!

POST REPLY