OpenSim 4.5 visualization problem
- Mina Salehi
- Posts: 11
- Joined: Sun Nov 05, 2023 8:49 am
OpenSim 4.5 visualization problem
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.)
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.)
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Re: OpenSim 4.5 visualization problem
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.
When I open the RajagpolalLaiUlrich model that comes by default with the software (V2.5), the upper body is not displayed.
- Mohammadreza Rezaie
- Posts: 393
- Joined: Fri Nov 24, 2017 12:48 am
Re: OpenSim 4.5 visualization problem
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 (you can also use absolute path)
https://simtk-confluence.stanford.edu:8 ... ry%20files
1. go to Edit > Preferences
2. put .\Geometry in the Paths: Geometry Search Path section (you can also use absolute path)
https://simtk-confluence.stanford.edu:8 ... ry%20files
- Ayman Habib
- Posts: 2239
- Joined: Fri Apr 01, 2005 12:24 pm
Re: OpenSim 4.5 visualization problem
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
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
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Re: OpenSim 4.5 visualization problem
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?
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?
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Re: OpenSim 4.5 visualization problem
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
The model now appears to be correct, but I still get the error related to the tib_plat_.vtp
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Re: OpenSim 4.5 visualization problem
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.
- Ayman Habib
- Posts: 2239
- Joined: Fri Apr 01, 2005 12:24 pm
Re: OpenSim 4.5 visualization problem
Awesome, thanks for the update, glad all is working/visible now.
Best regards,
-Ayman
Best regards,
-Ayman
- Mina Salehi
- Posts: 11
- Joined: Sun Nov 05, 2023 8:49 am
Re: OpenSim 4.5 visualization problem
Thank you all. I changed the Geometry path as well and the problem was solved.
Best,
Mina
Best,
Mina