Skip to content

Commit 1358221

Browse files
authored
[Needle][scene] Adjustments for the addition of the friction constraint (#36)
* Added the friction coefficient, adjusted the Gauss-Seidel tolerance of the constraint solver and increased the stiffness of the gel volume to allow for the needle to bend.
1 parent 89ee207 commit 1358221

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

scenes/NeedleInsertion.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"max":[0.125, 0.125, -0.100]
1818
} #Again all in mm
1919
g_gelMechanicalParameters = {
20-
"youngModulus":8000,
20+
"youngModulus":8e5,
2121
"poissonRatio":0.45,
2222
"method":"large"
2323
}
@@ -59,7 +59,7 @@ def createScene(root):
5959
root.addObject("ConstraintAttachButtonSetting")
6060
root.addObject("VisualStyle", displayFlags="showVisualModels hideBehaviorModels showCollisionModels hideMappings hideForceFields showWireframe showInteractionForceFields" )
6161
root.addObject("FreeMotionAnimationLoop")
62-
root.addObject("GenericConstraintSolver", tolerance=0.01, maxIt=5000, printLog=False, computeConstraintForces=True)
62+
root.addObject("GenericConstraintSolver", tolerance=0.00001, maxIt=5000, printLog=False, computeConstraintForces=True)
6363
root.addObject("CollisionLoop")
6464

6565
needleBaseMaster = root.addChild("NeedleBaseMaster")
@@ -182,8 +182,8 @@ def createScene(root):
182182
destGeom="@Volume/collision/geom_tri",
183183
fromVol="@Needle/bodyCollision/geom_body",
184184
destVol="@Volume/geom_tetra",
185-
punctureThreshold=0.05,
186-
slideDistance=0.005,
185+
punctureThreshold=2.,
186+
slideDistance=0.003,
187187
drawcollision=True,
188188
sphereRadius=0.0001
189189
#projective=True
@@ -193,6 +193,4 @@ def createScene(root):
193193
root.addObject("ConstraintUnilateral",input="@InsertionAlgo.output",directions="@punctureDirection",draw_scale="0.001")#, mu="0.001")
194194

195195
root.addObject("FirstDirection",name="bindDirection", handler="@Needle/bodyCollision/NeedleBeams")
196-
root.addObject("ConstraintInsertion",input="@InsertionAlgo.outputList", directions="@bindDirection",draw_scale="0.005")#, mu="0.001")
197-
198-
196+
root.addObject("ConstraintInsertion",input="@InsertionAlgo.outputList", directions="@bindDirection",draw_scale="0.002", frictionCoeff=0.05)

0 commit comments

Comments
 (0)