Difficulty getting Geometry to Load in Tutorial1-Bouncing Sphere and Tutorial 2 Bouncing Ellipsoids

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
RA Miller
Posts: 1
Joined: Tue Jan 05, 2021 2:34 pm

Difficulty getting Geometry to Load in Tutorial1-Bouncing Sphere and Tutorial 2 Bouncing Ellipsoids

Post by RA Miller » Sun Jan 10, 2021 4:42 pm

Good Morning,

I need some guidance.

I am working through the tutorial provided in Contact Modeling with OpenSim: a User's Approach. I am unable to load the .osim file (for either model) in the OpenSim GUI. For the bouncing sphere, it gives me this error:

Loaded model bouncing_sphere from file /Users/ruthann/Documents/OpenSim/4.1/Models/Tutorial 1 - Bouncing Sphere/bouncing_sphereA.osim
Visualizer couldn't open sphere1.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 '/Users/ruthann/Documents/OpenSim/4.1/Models/Tutorial 1 - Bouncing Sphere/Geometry/sphere1.vtp' failed with message:
SimTK Exception thrown at PolygonalMesh.cpp:310:
Error detected by Simbody method PolygonalMesh::loadVtpFile(): Expected to see document tag <VTKFile> but saw <_Root> instead.
(Required condition 'vtp.getRootTag() == "VTKFile"' was not met.)

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

For the bouncing ellipsoids it gives me this error:

Loaded model bouncing_ellipsoidsA from file /Users/ruthann/Documents/OpenSim/4.1/Models/Tutorial 2 - Bouncing Ellipsoids/bouncing_ellipsoidsA.osim
Visualizer couldn't open sphere_display.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 '/Users/ruthann/Documents/OpenSim/4.1/Models/Tutorial 2 - Bouncing Ellipsoids/Geometry/sphere_display.vtp' failed with message:
SimTK Exception thrown at Xml.cpp:108:
Error detected by Simbody method Xml::readFromFile(): Failed to load the Xml file '/Users/ruthann/Documents/OpenSim/4.1/Models/Tutorial 2 - Bouncing Ellipsoids/Geometry/sphere_display.vtp' with error 'Error reading Element value. (line=0, col=0)'.
(Required condition 'loadOK' was not met.)

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

Visualizer couldn't open ellipsoid_display.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 '/Users/ruthann/Documents/OpenSim/4.1/Models/Tutorial 2 - Bouncing Ellipsoids/Geometry/ellipsoid_display.vtp' failed with message:
SimTK Exception thrown at Xml.cpp:108:
Error detected by Simbody method Xml::readFromFile(): Failed to load the Xml file '/Users/ruthann/Documents/OpenSim/4.1/Models/Tutorial 2 - Bouncing Ellipsoids/Geometry/ellipsoid_display.vtp' with error 'Error reading Element value. (line=0, col=0)'.
(Required condition 'loadOK' was not met.)

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


I have looked for a similar error on the forum: Geometry that Displayed Properly in OpenSim 3.3 Display Incorrrectly in OpenSim 4.x (viewtopicPhpbb.php?f=91&t=12635&p=0&sta ... 5aa9197ba8) . The guidance given is that the VTK is no longer being used. How do I modify the mesh files associated with these tutorials so that they will work with OpenSim 4.1 ?

Thank you for you help.

Tags:

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

Re: Difficulty getting Geometry to Load in Tutorial1-Bouncing Sphere and Tutorial 2 Bouncing Ellipsoids

Post by Ayman Habib » Sun Jan 10, 2021 5:40 pm

Hello,

Since we didn't provide these mesh files it's hard to conjecture why they can't load in version 4.x, the solution depends on the reason but generally if you open the files in paraview or Meshlab and save them as stl files, then change the reference to these files in the .osim file to .stl files that may do the trick (since the issue seems to be related to parsing vtp files). You may also file a bug and attach one of the models and all needed mesh files and we'll try troubleshooting on our side. (if the files are are already available publicly just send us a link).

Best regards,
-Ayman

POST REPLY