Skip to content

Commit

Permalink
Merge pull request #306 from fredroy/rename_collisionresponse
Browse files Browse the repository at this point in the history
Replace Collision aliases
  • Loading branch information
hugtalbot authored Sep 30, 2024
2 parents fe2d9d2 + f6b692e commit 38e0f8d
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def createScene(rootNode):
rootNode.addObject('RequiredPlugin', pluginName=[
"Sofa.Component.AnimationLoop", # Needed to use components FreeMotionAnimationLoop
"Sofa.Component.Collision.Detection.Algorithm",
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, CollisionPipeline
"Sofa.Component.Collision.Detection.Intersection", # Needed to use components LocalMinDistance
"Sofa.Component.Collision.Geometry",
# Needed to use components LineCollisionModel, PointCollisionModel, TriangleCollisionModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def createScene(rootNode):
rootNode.addObject('RequiredPlugin', pluginName=[
"Sofa.Component.AnimationLoop", # Needed to use components FreeMotionAnimationLoop
"Sofa.Component.Collision.Detection.Algorithm",
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, CollisionPipeline
"Sofa.Component.Collision.Detection.Intersection", # Needed to use components LocalMinDistance
"Sofa.Component.Collision.Response.Contact", # Needed to use components DefaultContactManager
"Sofa.Component.Collision.Response.Contact", # Needed to use components CollisionResponse
"Sofa.Component.Constraint.Lagrangian.Correction",
# Needed to use components LinearSolverConstraintCorrection
"Sofa.Component.Constraint.Lagrangian.Solver", # Needed to use components GenericConstraintSolver
Expand All @@ -37,10 +37,10 @@ def createScene(rootNode):
rootNode.addObject('DefaultVisualManagerLoop')
rootNode.addObject('GenericConstraintSolver', maxIterations=1000, tolerance=1e-3)

rootNode.addObject('DefaultPipeline')
rootNode.addObject('CollisionPipeline')
rootNode.addObject('BruteForceBroadPhase', name="N2")
rootNode.addObject('BVHNarrowPhase')
rootNode.addObject('DefaultContactManager', response="FrictionContactConstraint", responseParams="mu=0")
rootNode.addObject('CollisionResponse', response="FrictionContactConstraint", responseParams="mu=0")
rootNode.addObject('LocalMinDistance', name="Proximity", alarmDistance=1, contactDistance=0.1)

rootNode.addObject('BackgroundSetting', color=[0, 0.168627, 0.211765, 1])
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/CircularRobot/circularrobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ def createScene(rootNode):
"Sofa.Component.AnimationLoop",
# Needed to use components FreeMotionAnimationLoop
"Sofa.Component.Collision.Detection.Algorithm",
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, CollisionPipeline
"Sofa.Component.Collision.Detection.Intersection",
# Needed to use components LocalMinDistance
"Sofa.Component.Collision.Geometry",
# Needed to use components LineCollisionModel, PointCollisionModel, TriangleCollisionModel
"Sofa.Component.Collision.Response.Contact",
# Needed to use components DefaultContactManager
# Needed to use components CollisionResponse
"Sofa.Component.Constraint.Lagrangian.Correction",
# Needed to use components GenericConstraintCorrection, UncoupledConstraintCorrection
"Sofa.Component.Constraint.Lagrangian.Solver",
Expand Down Expand Up @@ -163,10 +163,10 @@ def createScene(rootNode):
rootNode.addObject('GenericConstraintSolver', maxIterations=500, tolerance=1e-5)

# Contact detection methods
rootNode.addObject('DefaultPipeline')
rootNode.addObject('CollisionPipeline')
rootNode.addObject('BruteForceBroadPhase')
rootNode.addObject('BVHNarrowPhase')
rootNode.addObject('DefaultContactManager', response="FrictionContactConstraint", responseParams="mu=0.8")
rootNode.addObject('CollisionResponse', response="FrictionContactConstraint", responseParams="mu=0.8")
rootNode.addObject('LocalMinDistance', alarmDistance=5, contactDistance=1, angleCone=0.0)

Floor(rootNode)
Expand Down
4 changes: 2 additions & 2 deletions examples/tutorials/PneunetGripper/pneunetgripper-tuto.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ <h2 id="appendix">Appendix</h2>
<a class="sourceLine" id="cb18-25" title="25"> rootNode.findData(<span class="st">&#39;gravity&#39;</span>).value<span class="op">=</span>[<span class="op">-</span><span class="dv">9810</span>, <span class="dv">0</span>, <span class="dv">0</span>]<span class="op">;</span></a>
<a class="sourceLine" id="cb18-26" title="26"> rootNode.addObject(<span class="st">&#39;FreeMotionAnimationLoop&#39;</span>)</a>
<a class="sourceLine" id="cb18-27" title="27"> rootNode.addObject(<span class="st">&#39;GenericConstraintSolver&#39;</span>, tolerance<span class="op">=</span><span class="fl">1e-12</span>, maxIterations<span class="op">=</span><span class="dv">10000</span>)</a>
<a class="sourceLine" id="cb18-28" title="28"> rootNode.addObject(<span class="st">&#39;DefaultPipeline&#39;</span>)</a>
<a class="sourceLine" id="cb18-28" title="28"> rootNode.addObject(<span class="st">&#39;CollisionPipeline&#39;</span>)</a>
<a class="sourceLine" id="cb18-29" title="29"> rootNode.addObject(<span class="st">&#39;BruteForceDetection&#39;</span>)</a>
<a class="sourceLine" id="cb18-30" title="30"> rootNode.addObject(<span class="st">&#39;DefaultContactManager&#39;</span>, response<span class="op">=</span><span class="st">&#39;FrictionContact&#39;</span>, responseParams<span class="op">=</span><span class="st">&#39;mu=0.6&#39;</span>)</a>
<a class="sourceLine" id="cb18-30" title="30"> rootNode.addObject(<span class="st">&#39;CollisionResponse&#39;</span>, response<span class="op">=</span><span class="st">&#39;FrictionContact&#39;</span>, responseParams<span class="op">=</span><span class="st">&#39;mu=0.6&#39;</span>)</a>
<a class="sourceLine" id="cb18-31" title="31"> rootNode.addObject(<span class="st">&#39;LocalMinDistance&#39;</span>, name<span class="op">=</span><span class="st">&#39;Proximity&#39;</span>, alarmDistance<span class="op">=</span><span class="dv">5</span>, contactDistance<span class="op">=</span><span class="dv">1</span>, angleCone<span class="op">=</span><span class="fl">0.0</span>)</a>
<a class="sourceLine" id="cb18-32" title="32"></a>
<a class="sourceLine" id="cb18-33" title="33"> rootNode.addObject(<span class="st">&#39;BackgroundSetting&#39;</span>, color<span class="op">=</span>[<span class="dv">0</span>, <span class="fl">0.168627</span>, <span class="fl">0.211765</span>])</a>
Expand Down
4 changes: 2 additions & 2 deletions examples/tutorials/PneunetGripper/pneunetgripper-tuto.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ def createScene(rootNode):
rootNode.findData('gravity').value=[-9810, 0, 0];
rootNode.addObject('FreeMotionAnimationLoop')
rootNode.addObject('GenericConstraintSolver', tolerance=1e-12, maxIterations=10000)
rootNode.addObject('DefaultPipeline')
rootNode.addObject('CollisionPipeline')
rootNode.addObject('BruteForceDetection')
rootNode.addObject('DefaultContactManager', response='FrictionContactConstraint', responseParams='mu=0.6')
rootNode.addObject('CollisionResponse', response='FrictionContactConstraint', responseParams='mu=0.6')
rootNode.addObject('LocalMinDistance', name='Proximity', alarmDistance=5, contactDistance=1, angleCone=0.0)

rootNode.addObject('BackgroundSetting', color=[0, 0.168627, 0.211765])
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/SoftArmGripper/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ def addHeader(node):
node.addObject('RequiredPlugin', pluginName=[
"Sofa.Component.AnimationLoop", # Needed to use components FreeMotionAnimationLoop
"Sofa.Component.Collision.Detection.Algorithm",
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, CollisionPipeline
"Sofa.Component.Collision.Detection.Intersection", # Needed to use components LocalMinDistance
"Sofa.Component.Collision.Response.Contact", # Needed to use components DefaultContactManager
"Sofa.Component.Collision.Response.Contact", # Needed to use components CollisionResponse
"Sofa.Component.Constraint.Lagrangian.Correction", # Needed to use components GenericConstraintCorrection
"Sofa.Component.Constraint.Lagrangian.Solver", # Needed to use components GenericConstraintSolver
"Sofa.Component.IO.Mesh", # Needed to use components MeshOBJLoader
Expand All @@ -37,9 +37,9 @@ def addHeader(node):
node.addObject('QPInverseProblemSolver')
else:
node.addObject('GenericConstraintSolver', maxIterations=100, tolerance=0.001)
node.addObject('DefaultPipeline')
node.addObject('CollisionPipeline')
node.addObject('BruteForceBroadPhase')
node.addObject('BVHNarrowPhase')
node.addObject('DefaultContactManager', response="FrictionContactConstraint")
node.addObject('CollisionResponse', response="FrictionContactConstraint")
node.addObject('LocalMinDistance', alarmDistance=5, contactDistance=1)
node.addObject('BackgroundSetting', color=[0, 0, 0, 1])
2 changes: 1 addition & 1 deletion python3/softrobots/parts/bunny/Bunny.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def createScene(rootNode):
"Sofa.GL.Component.Rendering3D", # Needed to use components OglModel
"Sofa.Component.AnimationLoop", # Needed to use components FreeMotionAnimationLoop
"Sofa.Component.Collision.Detection.Algorithm",
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, CollisionPipeline
"Sofa.Component.Collision.Detection.Intersection", # Needed to use components LocalMinDistance
"Sofa.Component.Collision.Response.Contact", # Needed to use components RuleBasedContactManager
"Sofa.Component.Constraint.Lagrangian.Solver", # Needed to use components GenericConstraintSolver
Expand Down
2 changes: 1 addition & 1 deletion python3/softrobots/parts/finger/finger.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def createScene(rootNode):
rootNode.addObject('RequiredPlugin', pluginName=[
"Sofa.Component.AnimationLoop", # Needed to use components FreeMotionAnimationLoop
"Sofa.Component.Collision.Detection.Algorithm",
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline
# Needed to use components BVHNarrowPhase, BruteForceBroadPhase, CollisionPipeline
"Sofa.Component.Collision.Detection.Intersection", # Needed to use components LocalMinDistance
"Sofa.Component.Collision.Geometry",
# Needed to use components LineCollisionModel, PointCollisionModel, TriangleCollisionModel
Expand Down

0 comments on commit 38e0f8d

Please sign in to comment.