Home › Forum › SOFA › Using SOFA › [SOLVED] Crash in collision response computation
Tagged: 64_bits, SOFA_other, Windows_10
- This topic has 2 replies, 2 voices, and was last updated 5 years, 7 months ago by CamilleK.
-
AuthorPosts
-
1 April 2019 at 18:54 #13323CamilleKBlocked
Hello,
I have a scene in which I’d like to simulate collisions between an animated object (with a BeamFEMForceField model and a collision model) and an unanimated object (with only a collision model).
A specificity of the scene is that my animated object includes a BilateralInteractionConstraint between two sets of connected beam elements.
Everything works fine in the beginning, but as soon as collision is detected, runSofa crashes with
########## SIG 11 - SIGSEGV: segfault ##########
Using debug, I have the additional information :
[ERROR] [vector] in vector<Vec<3,double>> 300e0570 size 0 : invalid index 0
It seems that this occurs in the collision response phase of the collision pipeline, when using the distanceLMConstraint response.Here is the corresponding scene:
<Node name="root" dt="0.0002" gravity="0 -9.81 0"> <RequiredPlugin name="SofaSparseSolver" pluginName="SofaSparseSolver"/> <VisualStyle displayFlags="showBehaviorModels showForceFields showCollisionModels" /> <FreeMotionAnimationLoop /> <GenericConstraintSolver tolerance="0.001" maxIterations="1000"/> <!-- Collision pipeline --> <DefaultPipeline verbose="0" draw="0"/> <!-- Collision detection --> <BruteForceDetection name="N2" /> <!-- Broad phase --> <MinProximityIntersection name="Proximity" alarmDistance="2e-1" contactDistance="1e-1"/> <!-- Narrow phase --> <!-- Collision response --> <DefaultContactManager name="CollisionResponse" response="distanceLMConstraint"/> <Node name="Beams" > <EulerImplicitSolver name="odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="0.1" /> <SparseLUSolver verbose="true" /> <MechanicalObject template="Rigid3d" name="DOFs" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 2 0 0 0 0 0 1 3 0 0 0 0 0 1 4 0 0 0 0 0 1 5 0 0 0 0 0 1 6 0 0 0 0 0 1 7 0 0 0 0 0 1 0 0 0 0 0 -0.707107 0.707107 0 -1 0 0 0-0.707107 0.707107 0 -2 0 0 0 -0.707107 0.707107 0 -3 0 0 0 -0.707107 0.707107 0 -4 0 0 0 -0.707107 0.707107 0 -5 0 0 0 -0.707107 0.707107 0 -6 0 0 0 -0.707107 0.707107 0 -7 0 0 0 -0.707107 0.707107" /> <MeshTopology name="lines" lines="0 1 1 2 2 3 3 4 4 5 5 6 6 7 8 9 9 10 10 11 11 12 12 13 13 14 14 15" /> <UniformMass totalMass="1" printLog="false" showAxisSizeFactor="1e-1" /> <BeamFEMForceField name="FEM" poissonRatio="0.3" radius="0.1" youngModulus="2e11" /> <FixedConstraint name="FixedConstraint" indices="7" /> <LinearSolverConstraintCorrection /> <BilateralInteractionConstraint template="Rigid3d" object1="@DOFs" object2="@DOFs" first_point="0" second_point="8" keepOrientationDifference="1" /> <ConstantForceField name="FF" indices="15" forces="100000 0 0 0 0 0" arrowSizeCoef="0.00001" showColor="0.961 0.635 0.906" /> <Node name="Collision"> <MechanicalObject template="Vec3d" name="collisionDOFs" position="0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 0 0 0 0 -1 0 0 -2 0 0 -3 0 0 -4 0 0 -5 0 0 -6 0 0 -7 0" /> <MeshTopology name="lines" lines="0 1 1 2 2 3 3 4 4 5 5 6 6 7 8 9 9 10 10 11 11 12 12 13 13 14 14 15" /> <TLineModel template="Vec3d" name="beamLine"/> <TPointModel name="beamPoint"/> <IdentityMapping /> </Node> </Node> <!-- end node "Beams" --> <Node name="Floor"> <MeshObjLoader name="loader" filename="floor2b.obj" scale="0.1" translation="0 -9.25 0" /> <MeshTopology name="floorTopo" src="@loader"/> <MechanicalObject src="@loader" name="floorDoFs" /> <TTriangleModel name="floorTriangle" simulated="0" moving="0" /> </Node> </Node>
Best regards,
Camille
PS: I’m using SOFA’s master version (commit 95d33bff from 12/02/2019), on Windows 10 64bits
1 April 2019 at 19:13 #13324HugoKeymasterHi @krewcunc (works well for a forum pseudo!)
The issue comes from your DefaultContactManager.
The implementation defaultLMConstraint is deprecated, not LM are solved in another way (see the LM constraint doc page). We will therefore remove them from the options. Thanks for the notice, I create an issue on the topic.In your case, using:
<DefaultContactManager name="CollisionResponse" response="FrictionContact"/>
should solve the issue.
Best wishes,Hugo
4 April 2019 at 14:22 #13372 -
AuthorPosts
- You must be logged in to reply to this topic.