Home › Forum › SoftRobots › Using SoftRobots › [SOLVED] Importing STL file via RigidObjects
Tagged: SOFA_2012, SofaPython, softrobots, STlib, Windows_10
- This topic has 4 replies, 2 voices, and was last updated 3 years, 4 months ago by Anonymous.
-
AuthorPosts
-
19 July 2021 at 19:33 #20041AnonymousInactive
Hi,
Sorry to bother the forums again. I have been struggling with an error for the past couple of days regarding importing an object via STLIB.Physics.Rigid.RigidObjects. The error that shows up is:
[ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find edge 1 [172, 184] in triangle 0
[ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find edge 1 [172, 184] in triangle 0
[WARNING] [TetrahedronSetTopologyContainer(container)] TrianglesAroundEdge buffer can’t be created as EdgesInTriangle buffer creation failed.
[ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find triangle 0 [155, 152, 226] in tetrahedron 0
[WARNING] [TetrahedronSetTopologyContainer(container)] In getTetrahedronArray, cannot find edge for tetrahedron 0and edge 1
[ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find triangle 0 [155, 152, 226] in tetrahedron 0
[WARNING] [TetrahedronSetTopologyContainer(container)] TetrahedraAroundTriangle buffer can’t be created as trianglesInTetrahedron buffer creation failed.
[ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find edge 1 [172, 184] in triangle 0
[ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find edge 1 [172, 184] in triangle 0
… etc.The item is being imported into the SOFA environment but is not being completely drawn, and exists as a point object at [0,0,0] (there was no translation applied to the object). Curiously, after my first attempt at using the RigidObject, reloading any other working scenes that utilized STLIB would result in this error despite nothing actually changing in the scene (it still works and functions as it did before this error showed up).
Best regards,
Geoffrey Liu29 July 2021 at 09:12 #20096HugoKeymasterHey @geofliu
I think your question is directly linked to this solved post.
It basically explains that your mesh might have some issues. Could you confirm this? What is the meshtool you used?
Best
Hugo
29 July 2021 at 20:22 #20099AnonymousInactiveHi @Hugo,
Thank you for getting back to me on this. I did see this post and interpreted the solution as someone needing to clean up the mesh file, and I didn’t think an STL file of a simple rectangle was complicated enough to be faulty.
I will check on gmsh and see if I can generate the appropriate file for SOFA.
For reference, I used SolidWorks to design the shape and export it to an STL file.Best regards,
Geoffrey Liu30 July 2021 at 03:43 #20100AnonymousInactiveHi @Hugo,
I have been working on using gmsh to try to generate a file that can be properly read and constructed in the SOFA environment to no avail.
I initially did not have problems with SoftRobots fingers.stl file so the issue does not seem like it is related to running an STL file.
I have spent the day using gmsh to convert my .stl file (which is just a rectangular prism, so not complicated) to .msh, .vtk, .mesh, etc, and also tested all different version types for .msh as beichun mentions in the linked forum post. None of them worked and the same error pops up.
However, I have identified that the error posted above is related to the fingers and still work. Commenting out the fingers leaves me with these error messages.
Traceback (most recent call last):
File “<string>”, line 1, in <module>
NameError: name ‘SofaPython’ is not defined
[INFO] [DAGNode(root)] There is already one animation manager in this scene…why do you need a second one ?
Extension not handled in STLIB/python/stlib/visuals for file: data/mesh/craneGameNoHolesV5.msh
[ERROR] [OglModel(unnamed)] Source object “@loader” NOT FOUND.
[INFO] [SceneCheckerVisitor] Validating node “root” with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias]
[INFO] [SceneCheckerVisitor] Finished validating node “root”.
[ERROR] [DAGNode(root)] Node.getChild(“finger1”) not found.
[ERROR] [DAGNode(root)] Node.getChild(“finger2”) not found.
[ERROR] [DAGNode(root)] Node.getChild(“finger3”) not found.
Traceback (most recent call last):
File “pythonControllers\testController.py”, line 43, in initGraph
AttributeError: ‘NoneType’ object has no attribute ‘getChild’Best regards,
Geoffrey Liu5 August 2021 at 22:49 #20133AnonymousInactiveHi,
I have solved the issue of generating the initial STL file in ASCII rather than Binary. I did not know the option was in SolidWorks initially and the other post mentioned taking someone elses file and exporting it as an ASCII stl file which lead me to believe that I could do the same with either gmsh or VTK (taking the stl file I generated it and creating a new one in ASCII).
I just stumbled across it after going into SolidWorks and changing random settings to potentially “clean up” the stl file.
Thanks!
Best regards,
Geoffrey Liu -
AuthorPosts
- You must be logged in to reply to this topic.