sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
906 stars 309 forks source link

Bug report about a crashing component from akruszewski #1469

Open damienmarchal opened 4 years ago

damienmarchal commented 4 years ago

The following scene is crashing, he is using sofa 19.06 + STLIB + windows 10.

from stlib.scene import MainHeader, ContactHeader, Node
from stlib.physics.deformable import ElasticMaterialObject

def Finger(parentNode=None, name="Finger",
            rotation=[0.0, 0.0, 0.0], translation=[0.0, 0.0, 0.0],
            fixingBox=[0.0,0.0,0.0], pullPointLocation=[0.0,0.0,0.0]):

    finger = Node(parentNode, "Finger")
    eobject = ElasticMaterialObject(finger,
                               volumeMeshFileName="data/mesh/quiNexistepas.vtk",
                               poissonRatio=0.3,
                               youngModulus=18000,
                               totalMass=0.5,
                               surfaceColor=[0.0, 0.8, 0.7],
                               surfaceMeshFileName="data/mesh/quiNexistepas.stl",
                               rotation=rotation,
                               translation=translation)

    return finger

def createScene(rootNode):
    """This is my first scene"""
    MainHeader(rootNode, gravity=[0.0, -981.0, 0.0], plugins=["SoftRobots"])
    ContactHeader(rootNode, alarmDistance=10, contactDistance=3, frictionCoef=0.08)

    Finger(rootNode)

    return rootNode

Suggested labels:

fredroy commented 3 years ago

from stlib.physics.deformable import ElasticMaterialObject

The bug seems related to STLlib... (or SoftRobots) It would be better to backport this issue to https://github.com/SofaDefrost/STLIB/issues , @damienmarchal ?

damienmarchal commented 3 years ago

I would be very surprised this could have anything to do with STLIB. STLIB is a pure python libray that just create a Sofa scene. My first guess would be that the created scene is crashing...but the same scene would crash the same way if loaded from XML.

fredroy commented 3 years ago

Then ElasticMaterialObject is not a SOFA component so could you tell what does that do ? and what is the meaning of "akruszewski" ?

fredroy commented 3 years ago

Any news ?