Skip to content

Commit 8d445f6

Browse files
committed
[scene] Modified NeedleInsertionCycles scenes
1 parent 067e205 commit 8d445f6

File tree

3 files changed

+266
-4703
lines changed

3 files changed

+266
-4703
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# WARNING:
2+
# REGRESSION_TEST DOES NOT SUPPORT DASHES ("-") IN SCENE NAMES.
3+
# USE UNDERSCORES ("_") INSTEAD.
4+
5+
# The file contains the path to the reference folder. This path should be relative to this folder path. The folder
6+
# should be structured as the folder containig this file and each reference of each scene should have a relative path to
7+
# the reference folder equivalent to the relative path of the corresponding scene in this folder. e.g. for the scene in
8+
# path/to/MyScene.scn, a reference with the same name as the scene should be found in referenceFolder/path/to/
9+
# --> INFO : a special string can be use while specifying this path: `$REGRESSION_DIR`. If used at the beginning of the
10+
# path, then it will be used as an absolute path with $REGRESSION_DIR replaced by the content of the environment
11+
# variable with the same name. Use this, when the reference are not in the repository containing the examples but
12+
# directly in the repo Regression
13+
14+
### References relative path ###
15+
$REGRESSION_DIR/references/scenes
16+
17+
### CollisionAlgorithm Scenes ###
18+
scenes/NeedleInsertion.py 700 1e-7 1 1
19+
scenes/NeedleInsertionCycles.py 900 1e-7 1 1

scenes/NeedleInsertionCycles.py

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -65,27 +65,27 @@ def createScene(root):
6565

6666
needleBaseMaster = root.addChild("NeedleBaseMaster")
6767
needleBaseMaster.addObject("MechanicalObject", name="mstate_baseMaster", template="Rigid3d", showObjectScale=0.002, showObject=True, drawMode=1
68-
#, position=[0.04, 0.04, 0, 0, 0, 0, 1])
6968
, position="@reader.position")
69+
# , position=[0.04, 0.04, 0, 0, 0, 0, 1])
7070
#needleBaseMaster.addObject("LinearMovementProjectiveConstraint",indices=[0],
7171
# keyTimes=[
72-
# 0, 1, 4, 4.5, 5, 8
73-
# ,8.5,9,12,12.5,13,16
72+
# 0, 0.04, 0.25, 0.3, 0.35, 0.55
73+
# ,0.6, 0.65, 0.85, 0.95, 1.05, 1.15
7474
# ],
7575
# movements=[
76-
# [0.04, 0.04,0,0,0,0],
77-
# [0.04, 0.04,0.05,0,3.14/2,0],
78-
# [0.04, 0.04,-0.07,0,3.14/2,0],
79-
# [0.05, 0.04,-0.07,0,3.14/2 + 3.14/16,0],
80-
# [0.04, 0.04,-0.07,0,3.14/2,0],
81-
# [0.04, 0.04,0.005,0,3.14/2,0],
76+
# [0.04, 0.04, 0, 0, 0, 0],
77+
# [0.04, 0.04, 0.02, 0, 3.14/2, 0],
78+
# [0.04, 0.04, -0.07, 0, 3.14/2, 0],
79+
# [0.05, 0.04, -0.07, 0, 3.14/2 + 3.14/16, 0],
80+
# [0.04, 0.04, -0.07, 0, 3.14/2, 0],
81+
# [0.04, 0.04, 0.005,0, 3.14/2, 0],
8282
# # Change to insertion at an angle
83-
# [0.06, 0.04,0.005,0,3.14/2,0],
84-
# [0.06, 0.04,0.005,0,3.14/2 + 3.14/8,0],
85-
# [0.030866, 0.04,-0.04119,0,3.14/2 + 3.14/8,0],
86-
# [0.030866, 0.04,-0.04119,0,3.14/2,0],
87-
# [0.030866, 0.04,-0.04119,0,3.14/2 + 3.14/8,0],
88-
# [0.06, 0.04,0.005,0,3.14/2 + 3.14/8,0]
83+
# [0.06, 0.04, 0.005, 0, 3.14/2, 0],
84+
# [0.06, 0.04, 0.005, 0, 3.14/2 + 3.14/8, 0],
85+
# [0.030866, 0.04, -0.04119, 0, 3.14/2 + 3.14/8, 0],
86+
# [0.030866, 0.04, -0.04119, 0, 3.14/2, 0],
87+
# [0.030866, 0.04, -0.04119, 0, 3.14/2 + 3.14/8, 0],
88+
# [0.06, 0.04, 0.005, 0, 3.14/2 + 3.14/8, 0]
8989
# ]
9090
# ,relativeMovements=False
9191
#)
@@ -165,8 +165,7 @@ def createScene(root):
165165
volume.addObject("MechanicalObject", name="mstate_gel", template="Vec3d")
166166
volume.addObject("TetrahedronGeometry", name="geom_tetra", mstate="@mstate_gel", topology="@TetraContainer", draw=False)
167167
volume.addObject("PhongTriangleNormalHandler", name="InternalTriangles", geometry="@geom_tetra")
168-
volume.addObject("AABBBroadPhase",name="AABBTetra",geometry="@geom_tetra",nbox=[3,3,3],thread=1)
169-
volume.addObject("TetrahedronFEMForceField", name="FF",**g_gelMechanicalParameters)
168+
volume.addObject("FastTetrahedralCorotationalForceField", name="FF",**g_gelMechanicalParameters)
170169
volume.addObject("MeshMatrixMass", name="Mass",totalMass=g_gelTotalMass)
171170

172171
volume.addObject("BoxROI",name="BoxROI",box=g_gelFixedBoxROI)
@@ -181,7 +180,7 @@ def createScene(root):
181180
volumeCollision.addObject("MechanicalObject", name="mstate_gelColi",position="@../TetraContainer.position")
182181
volumeCollision.addObject("TriangleGeometry", name="geom_tri", mstate="@mstate_gelColi", topology="@TriContainer",draw=False)
183182
volumeCollision.addObject("PhongTriangleNormalHandler", name="SurfaceTriangles", geometry="@geom_tri")
184-
volumeCollision.addObject("AABBBroadPhase",name="AABBTriangles",thread=1,nbox=[2,2,3])
183+
volumeCollision.addObject("AABBBroadPhase", name="AABBTriangles", thread=1, nbox=[2,2,3], method=2)
185184

186185
volumeCollision.addObject("IdentityMapping", name="identityMappingToCollision", input="@../mstate_gel", output="@mstate_gelColi", isMechanical=True)
187186

@@ -215,4 +214,4 @@ def createScene(root):
215214
root.addObject("ConstraintUnilateral",input="@InsertionAlgo.collisionOutput",directions="@punctureDirection",draw_scale=0.001, mu=0.001)
216215

217216
root.addObject("FirstDirection",name="bindDirection", handler="@Needle/bodyCollision/NeedleBeams")
218-
root.addObject("ConstraintInsertion",input="@InsertionAlgo.insertionOutput", directions="@bindDirection",draw_scale=0.002, frictionCoeff=0.0023)
217+
root.addObject("ConstraintInsertion",input="@InsertionAlgo.insertionOutput", directions="@bindDirection",draw_scale=0.002, frictionCoeff=0.00)#23)

0 commit comments

Comments
 (0)