From c65af39108432a5c6f8f09f6554f17d7ce83ae77 Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Mon, 30 Sep 2024 13:14:18 +0900 Subject: [PATCH 1/2] replace DefaultContactManager with CollisionResponse --- .../UnilateralPlaneConstraint/ArticulatedTentacle.py | 4 ++-- examples/tutorials/CircularRobot/circularrobot.py | 4 ++-- examples/tutorials/PneunetGripper/pneunetgripper-tuto.html | 2 +- examples/tutorials/PneunetGripper/pneunetgripper-tuto.md | 2 +- examples/tutorials/SoftArmGripper/header.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py b/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py index c25d1df9..83b877d8 100644 --- a/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py +++ b/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py @@ -15,7 +15,7 @@ def createScene(rootNode): "Sofa.Component.Collision.Detection.Algorithm", # Needed to use components BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline "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 @@ -40,7 +40,7 @@ def createScene(rootNode): rootNode.addObject('DefaultPipeline') 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]) diff --git a/examples/tutorials/CircularRobot/circularrobot.py b/examples/tutorials/CircularRobot/circularrobot.py index 935502ce..731af7f0 100644 --- a/examples/tutorials/CircularRobot/circularrobot.py +++ b/examples/tutorials/CircularRobot/circularrobot.py @@ -118,7 +118,7 @@ def createScene(rootNode): "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", @@ -166,7 +166,7 @@ def createScene(rootNode): rootNode.addObject('DefaultPipeline') 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) diff --git a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html index a404b714..3505735e 100644 --- a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html +++ b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html @@ -214,7 +214,7 @@

Appendix

rootNode.addObject('GenericConstraintSolver', tolerance=1e-12, maxIterations=10000) rootNode.addObject('DefaultPipeline') rootNode.addObject('BruteForceDetection') - rootNode.addObject('DefaultContactManager', response='FrictionContact', responseParams='mu=0.6') + rootNode.addObject('CollisionResponse', response='FrictionContact', 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]) diff --git a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md index 0aa57afe..68471038 100644 --- a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md +++ b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md @@ -229,7 +229,7 @@ def createScene(rootNode): rootNode.addObject('GenericConstraintSolver', tolerance=1e-12, maxIterations=10000) rootNode.addObject('DefaultPipeline') 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]) diff --git a/examples/tutorials/SoftArmGripper/header.py b/examples/tutorials/SoftArmGripper/header.py index cb2cb232..fb54681b 100644 --- a/examples/tutorials/SoftArmGripper/header.py +++ b/examples/tutorials/SoftArmGripper/header.py @@ -10,7 +10,7 @@ def addHeader(node): "Sofa.Component.Collision.Detection.Algorithm", # Needed to use components BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline "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 @@ -40,6 +40,6 @@ def addHeader(node): node.addObject('DefaultPipeline') 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]) From f6b692e75b6251eb3b35f5d1f4272cfa615ddcb4 Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Mon, 30 Sep 2024 14:44:43 +0900 Subject: [PATCH 2/2] replace DefaultPipeline with CollisionPipeline --- .../constraint/CableConstraint/DisplacementVsForceControl.py | 2 +- .../UnilateralPlaneConstraint/ArticulatedTentacle.py | 4 ++-- examples/tutorials/CircularRobot/circularrobot.py | 4 ++-- examples/tutorials/PneunetGripper/pneunetgripper-tuto.html | 2 +- examples/tutorials/PneunetGripper/pneunetgripper-tuto.md | 2 +- examples/tutorials/SoftArmGripper/header.py | 4 ++-- python3/softrobots/parts/bunny/Bunny.py | 2 +- python3/softrobots/parts/finger/finger.py | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/component/constraint/CableConstraint/DisplacementVsForceControl.py b/examples/component/constraint/CableConstraint/DisplacementVsForceControl.py index 07eb418a..65c3b2eb 100644 --- a/examples/component/constraint/CableConstraint/DisplacementVsForceControl.py +++ b/examples/component/constraint/CableConstraint/DisplacementVsForceControl.py @@ -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 diff --git a/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py b/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py index 83b877d8..b4e3223b 100644 --- a/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py +++ b/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py @@ -13,7 +13,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.Response.Contact", # Needed to use components CollisionResponse "Sofa.Component.Constraint.Lagrangian.Correction", @@ -37,7 +37,7 @@ 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('CollisionResponse', response="FrictionContactConstraint", responseParams="mu=0") diff --git a/examples/tutorials/CircularRobot/circularrobot.py b/examples/tutorials/CircularRobot/circularrobot.py index 731af7f0..1410fb6b 100644 --- a/examples/tutorials/CircularRobot/circularrobot.py +++ b/examples/tutorials/CircularRobot/circularrobot.py @@ -112,7 +112,7 @@ 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", @@ -163,7 +163,7 @@ 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('CollisionResponse', response="FrictionContactConstraint", responseParams="mu=0.8") diff --git a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html index 3505735e..099151bc 100644 --- a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html +++ b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html @@ -212,7 +212,7 @@

Appendix

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('CollisionResponse', response='FrictionContact', responseParams='mu=0.6') rootNode.addObject('LocalMinDistance', name='Proximity', alarmDistance=5, contactDistance=1, angleCone=0.0) diff --git a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md index 68471038..060053bf 100644 --- a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md +++ b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md @@ -227,7 +227,7 @@ 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('CollisionResponse', response='FrictionContactConstraint', responseParams='mu=0.6') rootNode.addObject('LocalMinDistance', name='Proximity', alarmDistance=5, contactDistance=1, angleCone=0.0) diff --git a/examples/tutorials/SoftArmGripper/header.py b/examples/tutorials/SoftArmGripper/header.py index fb54681b..bf72b631 100644 --- a/examples/tutorials/SoftArmGripper/header.py +++ b/examples/tutorials/SoftArmGripper/header.py @@ -8,7 +8,7 @@ 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 CollisionResponse "Sofa.Component.Constraint.Lagrangian.Correction", # Needed to use components GenericConstraintCorrection @@ -37,7 +37,7 @@ 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('CollisionResponse', response="FrictionContactConstraint") diff --git a/python3/softrobots/parts/bunny/Bunny.py b/python3/softrobots/parts/bunny/Bunny.py index 064a08d5..4315732d 100644 --- a/python3/softrobots/parts/bunny/Bunny.py +++ b/python3/softrobots/parts/bunny/Bunny.py @@ -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 diff --git a/python3/softrobots/parts/finger/finger.py b/python3/softrobots/parts/finger/finger.py index 5d961d55..122d9ca8 100644 --- a/python3/softrobots/parts/finger/finger.py +++ b/python3/softrobots/parts/finger/finger.py @@ -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