66g_needleRadius = 0.001 #(m)
77g_needleMechanicalParameters = {
88 "radius" :g_needleRadius ,
9- "youngModulus" :1e11 ,
9+ "youngModulus" :1e12 ,
1010 "poissonRatio" :0.3
1111}
1212g_needleTotalMass = 0.01
1717 "max" :[0.125 , 0.125 , - 0.100 ]
1818} #Again all in mm
1919g_gelMechanicalParameters = {
20- "youngModulus" :8e5 ,
20+ "youngModulus" :1e6 ,
2121 "poissonRatio" :0.45 ,
2222 "method" :"large"
2323}
@@ -65,13 +65,12 @@ def createScene(root):
6565
6666 needleBaseMaster = root .addChild ("NeedleBaseMaster" )
6767 needleBaseMaster .addObject ("MechanicalObject" , name = "mstate_baseMaster" , template = "Rigid3d" , showObjectScale = 0.002 , showObject = False , drawMode = 1
68- #, position=[0.04, 0.04, 0, 0, 0, 0, 1])
6968 , position = "@reader.position" )
70- #needleBaseMaster.addObject("LinearMovementProjectiveConstraint",indices =[0], keyTimes=[0,1,7,9],movements=
71- # [ [0.04, 0.04,0,0,0,0]
72- # , [0.04, 0.04,0.05,0, 3.14/2,0]
73- # , [0.04, 0.04,-0.07,0, 3.14/2,0]
74- # , [0.05, 0.04,-0.07,0, 3.14/2 + 3.14/16,0]
69+ # , position =[0.04, 0.04, 0, 0, 0, 0, 1])
70+ #needleBaseMaster.addObject("LinearMovementProjectiveConstraint",indices=[0], keyTimes=[0,0.5,0.7],movements=
71+ # [ [0.04, 0.04, 0.05, 0, 3.14/2, 0]
72+ # , [0.04, 0.04, -0.04, 0, 3.14/2, 0]
73+ # , [0.05, 0.04, -0.04, 0, 3.14/2 + 3.14/16, 0]
7574 #],relativeMovements=False)
7675 #needleBaseMaster.addObject("WriteState", name="writer", filename="RecordState/NeedleInsertion.txt"
7776 # , period=0.01, writeX=True, writeV=True, time=0)
@@ -189,7 +188,7 @@ def createScene(root):
189188 surfGeom = "@Volume/collision/geom_tri" ,
190189 shaftGeom = "@Needle/bodyCollision/geom_body" ,
191190 volGeom = "@Volume/geom_tetra" ,
192- punctureForceThreshold = 2. ,
191+ punctureForceThreshold = 16 ,
193192 tipDistThreshold = 0.003 ,
194193 drawcollision = True ,
195194 drawPointsScale = 0.0001
@@ -199,4 +198,4 @@ def createScene(root):
199198 root .addObject ("ConstraintUnilateral" ,input = "@InsertionAlgo.collisionOutput" ,directions = "@punctureDirection" ,draw_scale = 0.001 )
200199
201200 root .addObject ("FirstDirection" ,name = "bindDirection" , handler = "@Needle/bodyCollision/NeedleBeams" )
202- root .addObject ("ConstraintInsertion" ,input = "@InsertionAlgo.insertionOutput" , directions = "@bindDirection" ,draw_scale = 0.002 , frictionCoeff = 0.05 )
201+ root .addObject ("ConstraintInsertion" ,input = "@InsertionAlgo.insertionOutput" , directions = "@bindDirection" ,draw_scale = 0.002 , frictionCoeff = 0.002 )
0 commit comments