Home › Forum › SOFA › Using SOFA › Crashes After Contact
Tagged: 64_bits, contact, crash, Linux_ubuntu, Plugin_SoftRobots, SOFA_1906, Soft Robots
- This topic has 1 reply, 2 voices, and was last updated 5 years ago by Hugo.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
9 November 2019 at 03:01 #14572jayyangBlocked
I couldn’t figure out why this is the case after hours of searching, but my simulation often crashes immediately after contact. As a test case I have written Python script that puts a VTK mesh of a distal phalange above a floor. 1.24 simulation seconds after the phalange hits the floor, the simulation crashes. Would really appreciate some guidance on this issue!
The crash comes with this in the console:
Received signal 11 SEGV_MAPERR 0008018f9df8# -*- coding: utf-8 -*- import Sofa from stlib.visuals import ShowGrid from stlib.solver import DefaultSolver from stlib.physics.rigid import Floor from stlib.physics.deformable import ElasticMaterialObject from stlib.physics.constraints import FixedBox from stlib.scene import Node from softrobots.actuators import PullingCable from stlib.physics.collision import CollisionMesh from splib.loaders import loadPointListFromFile def DP(parentNode=None, name="DP", rotation=[0.0, 0.0, 0.0], translation=[0.0, 0.0, 0.0], fixingBox=[-5.0,0.0,0.0,10.0,15.0,20.0], pullPointLocation=[0.0,0.0,0.0]): dp = parentNode.createChild("DP") ### Mechanical model #totalMass = 0.37 #volume = 373.77 #inertiaMatrix = [1.0, 0.0, 0.0, # 0.0, 1.0, 0.0, # 0.0, 0.0, 1.0] dp.createObject('MechanicalObject', name="DOF", template="Rigid3", translation=translation, rotation=rotation) #dp.createObject('UniformMass', name="vertexMass", vertexMass=[totalMass, volume, inertiaMatrix[:]]) dp.createObject('UniformMass', template="Rigid3", totalMass=0.37) dp.createObject('UncoupledConstraintCorrection') #dp.createObject('LinearSolverConstraintCorrection') #dp.createObject('PrecomputedConstraintCorrection') dp.createObject('EulerImplicit', name='odesolver') dp.createObject('CGLinearSolver', name='Solver') visual = dp.createChild("DPVisual") visual.createObject('MeshVTKLoader', name='myLoader', filename="data/mesh/DPV2.vtk") visual.createObject('OglModel', name="Visual", src="@myLoader") visual.createObject('RigidMapping') collision = dp.createChild("DPCollisionModel") collision.createObject('MeshVTKLoader', name="myLoader", filename="data/mesh/DPV2.vtk", triangulate="true", scale=1.0) collision.createObject('Mesh', src="@myLoader") collision.createObject('MechanicalObject') collision.createObject('Triangle') collision.createObject('Line') collision.createObject('Point') collision.createObject('RigidMapping') return dp def createScene(rootNode): from stlib.scene import MainHeader, ContactHeader m = MainHeader(rootNode, dt=0.01, gravity=[0.0, -981.0, 0.0],plugins=["SoftRobots"]) #m.getObject("VisualStyle").displayFlags='showForceFields showBehaviorModels showInteractionForceFields' ContactHeader(rootNode, alarmDistance=8, contactDistance=3, frictionCoef=0.08) DP(rootNode, rotation=[0,0,0]) floor = Floor(rootNode, name="Floor", translation=[0.0, -200.0, 0.0], uniformScale=1.0, isAStaticObject=True) #createMesh(rootNode) return rootNode
9 November 2019 at 20:08 #14577HugoKeymasterHi @jayyang
I am really sorry, I am not at ease with the STL lib. Does this issue ring a bell to you @damien-marchaluniv-lille1-fr ?
Best wishes,Hugo
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.