Page 1 of 1

OpenSim 4.5 visualization problem

Posted: Mon Mar 04, 2024 12:31 am
by 1minasalehi
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.)

Re: OpenSim 4.5 visualization problem

Posted: Mon Mar 04, 2024 6:09 am
by basvanhooren
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.

Re: OpenSim 4.5 visualization problem

Posted: Mon Mar 04, 2024 9:25 am
by kernalnet
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 1172 times
(you can also use absolute path)
https://simtk-confluence.stanford.edu:8 ... ry%20files

Re: OpenSim 4.5 visualization problem

Posted: Tue Mar 05, 2024 12:05 pm
by aymanh
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

Re: OpenSim 4.5 visualization problem

Posted: Wed Mar 06, 2024 12:07 am
by basvanhooren
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?

Re: OpenSim 4.5 visualization problem

Posted: Wed Mar 06, 2024 7:21 am
by basvanhooren
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

Re: OpenSim 4.5 visualization problem

Posted: Wed Mar 06, 2024 12:02 pm
by basvanhooren
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.

Re: OpenSim 4.5 visualization problem

Posted: Wed Mar 06, 2024 7:21 pm
by aymanh
Awesome, thanks for the update, glad all is working/visible now.

Best regards,
-Ayman

Re: OpenSim 4.5 visualization problem

Posted: Thu Mar 07, 2024 12:46 am
by 1minasalehi
Thank you all. I changed the Geometry path as well and the problem was solved.

Best,
Mina