Home › Forum › SOFA › Using SOFA › Clarification of mapping GUI
Tagged: 64_bits, GUI, mapping, Plugin_SoftRobots, pneunet, SOFA_1906, Windows_10
- This topic has 11 replies, 2 voices, and was last updated 3 years, 6 months ago by Hugo.
-
AuthorPosts
-
2 December 2020 at 03:59 #17824twxuBlocked
Hi,
I posted before about some mapping issues and wanted to make sure I’m understanding the SOFA mapping GUI correctly.
When just the “Mapping” checkbox is on, my understanding is that the yellow nodes/dots correspond to the corners of each mesh element.
Then, the green lines connecting the yellow nodes appear when there are 2 connected meshes (e.g. a body and inner cavity), and represent the correspondence between the nodes of each mesh. In the case of a body mesh and a pressurized cavity, the green lines will represent which body mesh nodes experience pressure when the cavity is pressurized.Can anyone confirm whether this is correct?
(I’m asking because I have a pneunet which seems to have good mapping/correspondences, but bends opposite to the expected bending direction for some reason)
18 December 2020 at 22:29 #18054HugoKeymasterHi @twxu
It is indeed.
You have the cavity mapped onto a 3D volumetric mesh. The pressure force (if some) applied on your cavity will therefore be interpolated / spread on the connected points on the body mesh as shown by the Mapping lines.Are you normal well oriented?
Best,
Hugo
4 January 2021 at 00:09 #18100twxuBlockedHi @Hugo,
Apologies for the delayed response.
That makes sense, thank you. Unfortunately for some reason I cannot view the normals (I see SEGFAULT errors and SOFA crashes). What should well-oriented normals look like?14 January 2021 at 08:52 #18203HugoKeymasterHi @twxu
Strange that it crashes when viewing the normals. Your mesh must have partial information. Could you try to add a TopologyModifier (e.g. TetrahedronSetTopologyModifier if you use a tetrahedral topology) with your topology description?
If it does not work, could you share more with us? files/scene
Best
Hugo
15 January 2021 at 04:44 #18231twxuBlockedHi @Hugo,
I added TetrahedronSetTopologyModifier, though SOFA still crashes with the same SEGFAULT errors when I try to view the normals using the SOFA GUI.
The mesh files I’m using are here (the pneunet files are the ones I’m trying to view normals of): drive link
Here is how my scene is organized:
<root node> <FreeMotionAnimationLoop /> <GenericConstraintSolver /> <DefaultPipeline /> <BruteForceDetection /> <MinProximityIntersection /> <DefaultContactManager /> <pneunet node> <EulerImplicitSolver /> <SparseLDLSolver /> <MeshVTKLoader /> <TetrahedronSetTopologyContainer /> <TetrahedronSetTopologyModifier /> <TetrahedronSetGeometryAlgorithms /> <MechanicalObject /> <UniformMass /> <TetrahedronFEMForceField /> <BoxROI> <stiffLayer node> <TetrahedronSetTopologyContainer /> <TetrahedronSetTopologyModifier /> <TetrahedronSetGeometryAlgorithms /> <TetrahedronFEMForceField /> </node> <LinearSolverConstraintCorrection /> <cavity node> <MeshSTLLoader /> <Mesh /> <MechanicalObject /> <SurfacePressureConstraint /> <BarycentricMapping /> </node> <pneunet collision node> <MeshSTLLoader /> <Mesh /> <MechanicalObject /> <TriangleCollisionModel /> <Line /> <Point /> <BarycentricMapping /> </node> </node> </node>
Let me know if any additional info would help; I can definitely share the full scene file but I’d have to clean it up and simplify it (e.g. not use absolute file paths) first
1 February 2021 at 11:20 #18459HugoKeymasterHi @twxu
You shared the structure of the scene but not the file itself.
Could you share your full scene file? The crashing log would be useful as well.Could you explain as well the purpose of the stiffLayer node ?
Best wishes,
Hugo
1 February 2021 at 16:10 #18467twxuBlockedHi @Hugo,
The scene file and object files are here: https://github.com/thomaswxu/SOFA
I’m not sure how to save the crash log; is that saved by adding a “printLog” argument to one of the SOFA components?The purpose of the stiffLayer node is to make the bottom layer of the pneunet object have a higher stiffness/elastic modulus. (It mimics a real-life pneunet prototype which has a paper layer on the bottom.)
Please feel free to contact me if you experience any issues running the scene!
11 February 2021 at 17:59 #18575HugoKeymasterHi @twxu
Could you please create a simplified scene (without plugins if possible) that I could run and test?
I found some scene bu none of them are working.Best,
Hugo
11 February 2021 at 19:28 #18590twxuBlockedHi @Hugo,
Apologies for the issues with the scenes.
I’ve uploaded a simplified version of the scene to the same GitHub repo linked above, could you please try running that?
Link: github.com/thomaswxu/SOFA/blob/main/scenes/singleFinger_wObject_simple.pyscnIt should be self-contained and shouldn’t require extra plugins outside of default SOFA, though it does assume the same file/folder layout as in the GitHub repo. Please feel free to contact me if you experience any other issues getting the scene to run.
1 March 2021 at 11:18 #18777HugoKeymasterHi @twxu Thomas
Thanks for making the effort it helps !
I run the scene on my side it seems to work fine. What is the issue again? Scene seems to run fine here, I might be missing something.Best
Hugo
1 March 2021 at 17:48 #18782twxuBlockedHi @Hugo,
No problem; I’m glad the scene is working on your end!
The original issue was that the pneunet object was bending in an unexpected direction. You recommended viewing the normals using the SOFA GUI to see if they are well oriented, though when I try viewing the normals the scene immediately crashes (SIG11 SIGSEGV segfault).
Are you able to view the normals on your end?
31 March 2021 at 09:05 #19026HugoKeymasterHi @twxu
I get an error, for this:
ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find edge 0 [2120, 2110] in triangle 4238 [ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find edge 0 [2120, 2110] in triangle 4238 [WARNING] [TetrahedronSetTopologyContainer(container)] TrianglesAroundEdge buffer can't be created as EdgesInTriangle buffer creation failed. [ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find triangle 0 [2497, 3440, 3460] in tetrahedron 0 [ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find triangle 0 [2497, 3440, 3460] in tetrahedron 0 [WARNING] [TetrahedronSetTopologyContainer(container)] TetrahedraAroundTriangle buffer can't be created as trianglesInTetrahedron buffer creation failed. ########## SIG 11 - SIGSEGV: segfault ########## -> /data/Softwares/sofa/build/build-master/lib/libSofaHelper.so.20.12.99(sofa::helper::BackTrace::dump()+0x20) [0x7f66bc152e00] -> /data/Softwares/sofa/build/build-master/lib/libSofaHelper.so.20.12.99(sofa::helper::BackTrace::sig(int)+0x364) [0x7f66bc153384] -> /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f66bbaa8210] -> /data/Softwares/sofa/build/build-master/lib/libSofaBaseTopology.so.20.12.99(sofa::component::topology::TriangleSetGeometryAlgorithms<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3u, double>, sofa::type::Vec<3u, double>, double> >::reorderTrianglesOrientationFromNormals()+0x33c) [0x7f66bd4c9e8c]
In such cases, I advise to use the option
createSubelements="1"
in the MeshLoader. In your case:finger.createObject('MeshVTKLoader', name='loader', filename=feaVTK_path, translation=fingerTrans, rotation=fingerRot, createSubelements="1")
It should therefore solve your problem.
Best wishes,Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.