OpenSim 4.5 visualization problem

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Mina Salehi
Posts: 11
Joined: Sun Nov 05, 2023 8:49 am

OpenSim 4.5 visualization problem

Post by Mina Salehi » Mon Mar 04, 2024 12:31 am

Hello all,

I just installed OpenSim v 4.5 and when I want to open my models from version 4.4, I face the below error for visualizing the bodies.
does anyone have any idea what is the problem?
Thanks in advance.


Updating Model file from 40000 to latest format...
Loaded model LFBModel from file D:\Lifting project\Mina_LIFT\Data_analysis\MoCap\S09\OpenSim\LFB_model.osim
Couldn't find file 'r_pelvis.vtp'.
Couldn't find file 'l_pelvis.vtp'.
Couldn't find file 'sacrum.vtp'.
Couldn't find file 'femur_r.vtp'.
Couldn't find file 'r_patella.vtp'.
Couldn't find file 'tibia_r.vtp'.
Couldn't find file 'fibula_r.vtp'.

.
.
.
.
.

Visualizer couldn't open r_pelvis.vtp because: SimTK Exception thrown at PolygonalMesh.cpp:411:
Error detected by Simbody method PolygonalMesh::loadVtpFile(): Attempt to load a VTK PolyData (.vtp) file from file name 'C:\OpenSim 4.4\opensim\..\\Geometry\r_pelvis.vtp' failed with message:
SimTK Exception thrown at Xml.cpp:108:
Error detected by Simbody method Xml::readFromFile(): Failed to load the Xml file 'C:\OpenSim 4.4\opensim\..\\Geometry\r_pelvis.vtp' with error 'Failed to open file (line=0, col=0)'.
(Required condition 'loadOK' was not met.)

User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Re: OpenSim 4.5 visualization problem

Post by Bas Van Hooren » Mon Mar 04, 2024 6:09 am

I get a more or less similar problem.

When I open the RajagpolalLaiUlrich model that comes by default with the software (V2.5), the upper body is not displayed.

User avatar
Mohammadreza Rezaie
Posts: 407
Joined: Fri Nov 24, 2017 12:48 am

Re: OpenSim 4.5 visualization problem

Post by Mohammadreza Rezaie » Mon Mar 04, 2024 9:25 am

Hi, it seems that the new version is loading the former settings. This might help:
1. go to Edit > Preferences
2. put .\Geometry in the Paths: Geometry Search Path section
Annotation 2024-03-04 195342.jpg
Annotation 2024-03-04 195342.jpg (31.96 KiB) Viewed 2377 times
(you can also use absolute path)
https://simtk-confluence.stanford.edu:8 ... ry%20files

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: OpenSim 4.5 visualization problem

Post by Ayman Habib » Tue Mar 05, 2024 12:05 pm

Hello,

The missing files issue can be fixed by setting the search path as explained by Mohammadreza (if you do have the files locally). The last error is caused by using a binary vtp file which is no longer supported since 4.0. You should try to find an ascii version of the file or some online tools to convert the file to ascii format or to stl/obj format that we can use. We did this conversion for the models that we distribute with OpenSim a while ago, please notify the model developers to do the same if possible.

Hope this helps,
-Ayman

User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Re: OpenSim 4.5 visualization problem

Post by Bas Van Hooren » Wed Mar 06, 2024 12:07 am

I have adjusted the geometry path to different folders, but the following error keeps showing regardless of where I set the path to:

Visualizer couldn't open tib_plat.vtp because: SimTK Exception thrown at PolygonalMesh.cpp:411:
Error detected by Simbody method PolygonalMesh::loadVtpFile(): Attempt to load a VTK PolyData (.vtp) file from file name 'C:\OpenSim 4.5-2024-01-10-3b63585\Geometry\tib_plat.vtp' failed with message:
SimTK Exception thrown at Xml.cpp:108:
Error detected by Simbody method Xml::readFromFile(): Failed to load the Xml file 'C:\OpenSim 4.5-2024-01-10-3b63585\Geometry\tib_plat.vtp' with error 'Failed to open file (line=0, col=0)'.
(Required condition 'loadOK' was not met.)

(Required condition '!"failed"' was not met.)


I do also not see a tib_plat.vtp file in any of the geometry folders, so perhaps it is not distributed with the new version (although I did also not see this file in OS 4.2 or 3.3)? That being said, I could not find a reference in the Rajagopal model to a tib_plat.vtp file for visualization so I don't know why it is searching for this file.

The pelvis does not visualize (even though the error refers to tib_plat). I opened the pelvis vtp files that are provided with the 4.5 installation in notepad++, and they are ascii file formats so I don't think this should be the issue? I also tried replacing the pelvis vtp files in the default geometry folder by the ones provided with the new Rajogopal model but this did not solve the issue.

Any other ideas why the pelvis in the Rajogapol model is not showing up?

User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Re: OpenSim 4.5 visualization problem

Post by Bas Van Hooren » Wed Mar 06, 2024 7:21 am

Update: I found why the pelvis is not showing up. The model I was using was searching for a pelvis vtp file with _Rajagopal as underscore added to the file name.

The model now appears to be correct, but I still get the error related to the tib_plat_.vtp

User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Re: OpenSim 4.5 visualization problem

Post by Bas Van Hooren » Wed Mar 06, 2024 12:02 pm

Another update: I found the error: I was simply checking the wrong model in Notepad. The model that produced the error was indeed missing some .vtp files. When added to the folder everything appears. Also for the original Rajagopal model everything was visible.

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: OpenSim 4.5 visualization problem

Post by Ayman Habib » Wed Mar 06, 2024 7:21 pm

Awesome, thanks for the update, glad all is working/visible now.

Best regards,
-Ayman

User avatar
Mina Salehi
Posts: 11
Joined: Sun Nov 05, 2023 8:49 am

Re: OpenSim 4.5 visualization problem

Post by Mina Salehi » Thu Mar 07, 2024 12:46 am

Thank you all. I changed the Geometry path as well and the problem was solved.

Best,
Mina

POST REPLY