diff --git a/examples/component/constraint/CableConstraint/CableSmoothActuation.py b/examples/component/constraint/CableConstraint/CableSmoothActuation.py index 30ea4db1..9a4d5287 100644 --- a/examples/component/constraint/CableConstraint/CableSmoothActuation.py +++ b/examples/component/constraint/CableConstraint/CableSmoothActuation.py @@ -35,7 +35,7 @@ def createScene(rootNode): rootNode.addObject('VisualStyle', displayFlags='showVisualModels hideBehaviorModels showCollisionModels hideBoundingCollisionModels hideForceFields showInteractionForceFields hideWireframe') rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', printLog='0') + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', printLog='0') ################################################################################################################ ################################################### Bunny ###################################################### diff --git a/examples/component/constraint/CableConstraint/Finger.py b/examples/component/constraint/CableConstraint/Finger.py index 57def8b5..c5107430 100644 --- a/examples/component/constraint/CableConstraint/Finger.py +++ b/examples/component/constraint/CableConstraint/Finger.py @@ -35,7 +35,7 @@ def createScene(rootNode): #  of the actuator's parameters. # rootNode.addObject('QPInverseProblemSolver', printLog=False) # Otherwise use a GenericConstraintSolver - rootNode.addObject('GenericConstraintSolver', tolerance=1e-5, maxIterations=100) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-5, maxIterations=100) rootNode.gravity = [0, -9810, 0] rootNode.dt = 0.01 diff --git a/examples/component/constraint/CableConstraint/FingerWithSTLIB.py b/examples/component/constraint/CableConstraint/FingerWithSTLIB.py index 98e256b4..b96c4103 100644 --- a/examples/component/constraint/CableConstraint/FingerWithSTLIB.py +++ b/examples/component/constraint/CableConstraint/FingerWithSTLIB.py @@ -36,7 +36,7 @@ def createScene(rootNode): rootNode.addObject("FreeMotionAnimationLoop") rootNode.addObject('DefaultVisualManagerLoop') - rootNode.addObject("GenericConstraintSolver", maxIterations=1000, tolerance=0.001) + rootNode.addObject("ProjectedGaussSeidelConstraintSolver", maxIterations=1000, tolerance=0.001) finger = ElasticMaterialObject(name="finger", volumeMeshFileName="mesh/finger.vtk", diff --git a/examples/component/constraint/JointConstraint/JointConstraint.py b/examples/component/constraint/JointConstraint/JointConstraint.py index d96431ba..ffc71c87 100644 --- a/examples/component/constraint/JointConstraint/JointConstraint.py +++ b/examples/component/constraint/JointConstraint/JointConstraint.py @@ -28,7 +28,7 @@ def createScene(rootNode): rootNode.gravity = [0., -9810., 0.] rootNode.addObject('VisualStyle', displayFlags='showBehaviorModels') rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', maxIterations=500, tolerance=1e-4) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=500, tolerance=1e-4) # Simulation node simulation = rootNode.addChild('Simulation') diff --git a/examples/component/constraint/PositionConstraint/PositionConstraint.py b/examples/component/constraint/PositionConstraint/PositionConstraint.py index c3eedad8..6df3d279 100644 --- a/examples/component/constraint/PositionConstraint/PositionConstraint.py +++ b/examples/component/constraint/PositionConstraint/PositionConstraint.py @@ -3,7 +3,7 @@ def createScene(rootnode): rootnode.addObject('RequiredPlugin', name='SoftRobots') rootnode.addObject('FreeMotionAnimationLoop') - rootnode.addObject('GenericConstraintSolver', maxIterations=1e4, tolerance=1e-5, printLog=True) + rootnode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1e4, tolerance=1e-5, printLog=True) rootnode.gravity = [0, -9.81, 0] rootnode.addObject('VisualStyle', displayFlags='showForceFields') diff --git a/examples/component/constraint/SurfacePressureConstraint/PressureVsVolumeGrowthControl.py b/examples/component/constraint/SurfacePressureConstraint/PressureVsVolumeGrowthControl.py index 1c17e0fe..27c242bf 100644 --- a/examples/component/constraint/SurfacePressureConstraint/PressureVsVolumeGrowthControl.py +++ b/examples/component/constraint/SurfacePressureConstraint/PressureVsVolumeGrowthControl.py @@ -36,7 +36,7 @@ def createScene(rootNode): rootNode.addObject('FreeMotionAnimationLoop') rootNode.addObject('DefaultVisualManagerLoop') - rootNode.addObject('GenericConstraintSolver', maxIterations=500, printLog=False, tolerance=0.0000001) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=500, printLog=False, tolerance=0.0000001) Bunny(rootNode, name='BunnyPressure', controlType='pressure', initialValue=2) Bunny(rootNode, translation=[15, 0, 0], controlType='volumeGrowth', name='BunnyVolume', initialValue=40) diff --git a/examples/component/constraint/SurfacePressureConstraint/Springy.py b/examples/component/constraint/SurfacePressureConstraint/Springy.py index 47cdec2a..c36b580e 100644 --- a/examples/component/constraint/SurfacePressureConstraint/Springy.py +++ b/examples/component/constraint/SurfacePressureConstraint/Springy.py @@ -33,7 +33,7 @@ def createScene(rootNode): rootNode.addObject('FreeMotionAnimationLoop') rootNode.addObject('DefaultVisualManagerLoop') - rootNode.addObject('GenericConstraintSolver', maxIterations=1000, tolerance=1e-3) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1000, tolerance=1e-3) rootNode.addObject('BackgroundSetting', color=[0, 0.168627, 0.211765, 1]) rootNode.findData('gravity').value = [0, 0, -981.0] diff --git a/examples/component/constraint/SurfacePressureConstraint/SurfacePressureConstraint.py b/examples/component/constraint/SurfacePressureConstraint/SurfacePressureConstraint.py index 51ca68f5..2b67ec2d 100644 --- a/examples/component/constraint/SurfacePressureConstraint/SurfacePressureConstraint.py +++ b/examples/component/constraint/SurfacePressureConstraint/SurfacePressureConstraint.py @@ -32,7 +32,7 @@ def createScene(rootNode): rootNode.addObject('FreeMotionAnimationLoop') rootNode.addObject('DefaultVisualManagerLoop') - rootNode.addObject('GenericConstraintSolver', maxIterations=100, tolerance=0.0000001) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=100, tolerance=0.0000001) # bunny bunny = rootNode.addChild('bunny') diff --git a/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py b/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py index b4e3223b..1a340c2e 100644 --- a/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py +++ b/examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py @@ -35,7 +35,7 @@ def createScene(rootNode): rootNode.addObject('VisualStyle', displayFlags="showVisualModels hideBehaviorModels showCollisionModels hideBoundingCollisionModels hideForceFields showInteractionForceFields hideWireframe") rootNode.addObject('FreeMotionAnimationLoop') rootNode.addObject('DefaultVisualManagerLoop') - rootNode.addObject('GenericConstraintSolver', maxIterations=1000, tolerance=1e-3) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1000, tolerance=1e-3) rootNode.addObject('CollisionPipeline') rootNode.addObject('BruteForceBroadPhase', name="N2") diff --git a/examples/component/controller/CommunicationController/SimulationDirect_Receiver.py b/examples/component/controller/CommunicationController/SimulationDirect_Receiver.py index 65a1f648..1dabab1c 100644 --- a/examples/component/controller/CommunicationController/SimulationDirect_Receiver.py +++ b/examples/component/controller/CommunicationController/SimulationDirect_Receiver.py @@ -26,7 +26,7 @@ def createScene(rootNode): rootNode.addObject('FreeMotionAnimationLoop') rootNode.addObject('DefaultVisualManagerLoop') - rootNode.addObject('GenericConstraintSolver', maxIterations=1000, tolerance=1e-14) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1000, tolerance=1e-14) rootNode.gravity.value = [0, 0, -981.0] rootNode.dt.value = 0.01 diff --git a/examples/component/controller/CommunicationController/SimulationInverse_Sender.py b/examples/component/controller/CommunicationController/SimulationInverse_Sender.py index 372565f2..388af8d8 100644 --- a/examples/component/controller/CommunicationController/SimulationInverse_Sender.py +++ b/examples/component/controller/CommunicationController/SimulationInverse_Sender.py @@ -35,7 +35,7 @@ def createScene(rootNode): rootNode.addObject('RequiredPlugin', name='SoftRobots.Inverse') rootNode.addObject('QPInverseProblemSolver', epsilon=1e-1, maxIterations=1000, tolerance=1e-14) else: - rootNode.addObject('GenericConstraintSolver', maxIterations=500, tolerance=1e-5) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=500, tolerance=1e-5) rootNode.gravity.value = [0, 0, -981.0] rootNode.dt.value = 0.01 diff --git a/examples/component/controller/DataVariationLimiter/DataVariationLimiter.py b/examples/component/controller/DataVariationLimiter/DataVariationLimiter.py index da4c5c37..2c1f7219 100644 --- a/examples/component/controller/DataVariationLimiter/DataVariationLimiter.py +++ b/examples/component/controller/DataVariationLimiter/DataVariationLimiter.py @@ -53,7 +53,7 @@ def createScene(rootNode): rootNode.addObject('RequiredPlugin', name='SoftRobots.Inverse') rootNode.addObject('QPInverseProblemSolver', epsilon=1e-1, maxIterations=1000, tolerance=1e-14) else: - rootNode.addObject('GenericConstraintSolver', maxIterations=500, tolerance=1e-5) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=500, tolerance=1e-5) rootNode.gravity.value = [0, 0, -981.0] rootNode.dt.value = 0.01 diff --git a/examples/thematicalDocs/T4-DirectActuation/Actuators/Cable/CableDisplacement.py b/examples/thematicalDocs/T4-DirectActuation/Actuators/Cable/CableDisplacement.py index a67ebb8e..99194a9c 100644 --- a/examples/thematicalDocs/T4-DirectActuation/Actuators/Cable/CableDisplacement.py +++ b/examples/thematicalDocs/T4-DirectActuation/Actuators/Cable/CableDisplacement.py @@ -15,7 +15,7 @@ def createScene(rootNode): rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', tolerance=1e-5, maxIterations=100) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-5, maxIterations=100) rootNode.addObject('BackgroundSetting', color=[0, 0.168627, 0.211765, 1]) rootNode.addObject('OglSceneFrame', style="Arrows", alignment="TopRight") diff --git a/examples/thematicalDocs/T4-DirectActuation/Actuators/Cable/CableForce.py b/examples/thematicalDocs/T4-DirectActuation/Actuators/Cable/CableForce.py index 9269c1df..e4f17dd9 100644 --- a/examples/thematicalDocs/T4-DirectActuation/Actuators/Cable/CableForce.py +++ b/examples/thematicalDocs/T4-DirectActuation/Actuators/Cable/CableForce.py @@ -15,7 +15,7 @@ def createScene(rootNode): rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', tolerance=1e-5, maxIterations=100) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-5, maxIterations=100) rootNode.addObject('BackgroundSetting', color=[0, 0.168627, 0.211765, 1]) rootNode.addObject('OglSceneFrame', style="Arrows", alignment="TopRight") diff --git a/examples/thematicalDocs/T4-DirectActuation/Actuators/Pneumatic/SurfaceConstraintPressure.py b/examples/thematicalDocs/T4-DirectActuation/Actuators/Pneumatic/SurfaceConstraintPressure.py index 726ea218..f06a655a 100644 --- a/examples/thematicalDocs/T4-DirectActuation/Actuators/Pneumatic/SurfaceConstraintPressure.py +++ b/examples/thematicalDocs/T4-DirectActuation/Actuators/Pneumatic/SurfaceConstraintPressure.py @@ -14,7 +14,7 @@ def createScene(rootNode): displayFlags='showVisualModels hideBehaviorModels showCollisionModels hideBoundingCollisionModels hideForceFields showInteractionForceFields hideWireframe') rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', maxIterations=100, tolerance=0.0000001) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=100, tolerance=0.0000001) # bunny mechanical model bunny = rootNode.addChild('bunny') diff --git a/examples/thematicalDocs/T4-DirectActuation/Actuators/Pneumatic/SurfaceConstraintVolume.py b/examples/thematicalDocs/T4-DirectActuation/Actuators/Pneumatic/SurfaceConstraintVolume.py index fa3fa709..7f9d8181 100644 --- a/examples/thematicalDocs/T4-DirectActuation/Actuators/Pneumatic/SurfaceConstraintVolume.py +++ b/examples/thematicalDocs/T4-DirectActuation/Actuators/Pneumatic/SurfaceConstraintVolume.py @@ -12,7 +12,7 @@ def createScene(rootNode): displayFlags='showVisualModels hideBehaviorModels showCollisionModels hideBoundingCollisionModels hideForceFields showInteractionForceFields hideWireframe') rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', maxIterations=100, tolerance=0.0000001) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=100, tolerance=0.0000001) # bunny mechanical model bunny = rootNode.addChild('bunny') diff --git a/examples/thematicalDocs/T4-DirectActuation/DriveTheRobot/Simulation.py b/examples/thematicalDocs/T4-DirectActuation/DriveTheRobot/Simulation.py index d5958820..b531f805 100644 --- a/examples/thematicalDocs/T4-DirectActuation/DriveTheRobot/Simulation.py +++ b/examples/thematicalDocs/T4-DirectActuation/DriveTheRobot/Simulation.py @@ -16,7 +16,7 @@ def createScene(rootNode): rootNode.gravity = [0., 0., -9810] rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', tolerance=1e-6, maxIterations=50000) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-6, maxIterations=50000) rootNode.addObject('BackgroundSetting', color=[0, 0.168627, 0.211765, 1]) rootNode.addObject('OglSceneFrame', style="Arrows", alignment="TopRight") diff --git a/examples/tutorials/CableGripper/details/step3.py b/examples/tutorials/CableGripper/details/step3.py index cf183b47..6b8c6e43 100644 --- a/examples/tutorials/CableGripper/details/step3.py +++ b/examples/tutorials/CableGripper/details/step3.py @@ -54,7 +54,7 @@ def createScene(rootNode): MainHeader(rootNode, plugins=["SoftRobots"]) rootNode.VisualStyle.displayFlags = "showBehavior showCollisionModels" rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', tolerance=1e-5, maxIterations=100) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-5, maxIterations=100) Finger(rootNode) diff --git a/examples/tutorials/CircularRobot/circularrobot.py b/examples/tutorials/CircularRobot/circularrobot.py index 1410fb6b..96c82dcb 100644 --- a/examples/tutorials/CircularRobot/circularrobot.py +++ b/examples/tutorials/CircularRobot/circularrobot.py @@ -160,7 +160,7 @@ def createScene(rootNode): rootNode.addObject('QPInverseProblemSolver', epsilon=2e-0, maxIterations=2500, tolerance=1e-7, responseFriction=0.8) else: - rootNode.addObject('GenericConstraintSolver', maxIterations=500, tolerance=1e-5) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=500, tolerance=1e-5) # Contact detection methods rootNode.addObject('CollisionPipeline') diff --git a/examples/tutorials/DiamondRobot/DiamondRobot.py b/examples/tutorials/DiamondRobot/DiamondRobot.py index e628c849..1711c3a5 100644 --- a/examples/tutorials/DiamondRobot/DiamondRobot.py +++ b/examples/tutorials/DiamondRobot/DiamondRobot.py @@ -35,7 +35,7 @@ def createScene(rootNode): # Constraint solver, here we use a Gauss Seidel algorithm rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', maxIterations=500, tolerance=1e-8) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=500, tolerance=1e-8) # Robot robot = rootNode.addChild('Robot') diff --git a/examples/tutorials/PneunetGripper/details/step6-pneumaticActuatorAndPythonScriptController.py b/examples/tutorials/PneunetGripper/details/step6-pneumaticActuatorAndPythonScriptController.py index f8ae1416..d7dbfac2 100644 --- a/examples/tutorials/PneunetGripper/details/step6-pneumaticActuatorAndPythonScriptController.py +++ b/examples/tutorials/PneunetGripper/details/step6-pneumaticActuatorAndPythonScriptController.py @@ -25,7 +25,7 @@ def createScene(rootNode): rootNode.gravity.value = [-9810, 0, 0] rootNode.addObject('AttachBodyButtonSetting', stiffness=10) rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', tolerance=1e-7, maxIterations=1000) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-7, maxIterations=1000) finger = rootNode.addChild('Finger') finger.addObject('EulerImplicitSolver', rayleighStiffness=0.1, rayleighMass=0.1) diff --git a/examples/tutorials/PneunetGripper/details/step7-grabTheCube.py b/examples/tutorials/PneunetGripper/details/step7-grabTheCube.py index 831d5fd0..8211dc6c 100644 --- a/examples/tutorials/PneunetGripper/details/step7-grabTheCube.py +++ b/examples/tutorials/PneunetGripper/details/step7-grabTheCube.py @@ -48,7 +48,7 @@ def createScene(rootNode): 'showInteractionForceFields hideWireframe') rootNode.gravity.value = [-9810, 0, 0] rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', tolerance=1e-7, maxIterations=1000) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-7, maxIterations=1000) rootNode.addObject('CollisionPipeline') rootNode.addObject('BruteForceBroadPhase') rootNode.addObject('BVHNarrowPhase') diff --git a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html index 099151bc..a92030e1 100644 --- a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html +++ b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.html @@ -127,9 +127,9 @@

Pneumatic Actuator and
rootNode.addObject('PythonScriptController', filename="controllerGripper.py", classname="controller")

In this case, the controller allows to interactively inflate the cavity by pressing ctrl + ‘+’ and deflate it by pressing ctrl + ‘-’.

Solving the constraints

-

To solve the constraints, such as the one define by the pressure actuator, we have to add to the rootNode the component FreeMotionAnimationLoop that will build up the system including constraints. The component GenericConstraintSolver will also be added to solve the constraints problem. Finally, we add the component LinearConstraintCorrection to the finger Node to take into account the correction due to the cavity constraint to the velocity and position:

+

To solve the constraints, such as the one define by the pressure actuator, we have to add to the rootNode the component FreeMotionAnimationLoop that will build up the system including constraints. The component ProjectedGaussSeidelConstraintSolver will also be added to solve the constraints problem. Finally, we add the component LinearConstraintCorrection to the finger Node to take into account the correction due to the cavity constraint to the velocity and position:

rootNode.addObject('FreeMotionAnimationLoop')
-rootNode.addObject('GenericConstraintSolver', maxIterations=10000, tolerance=1e-3)
+rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=10000, tolerance=1e-3)
finger.addObject('LinearSolverConstraintCorrection', solverName='directSolver')

With all these components, the scene is now runable and can be used to inflate and deflate the finger.

Real images

@@ -211,7 +211,7 @@

Appendix

rootNode.addObject('VisualStyle', displayFlags='showVisualModels hideBehaviorModels hideCollisionModels hideBoundingCollisionModels hideForceFields showInteractionForceFields hideWireframe') rootNode.findData('gravity').value=[-9810, 0, 0]; rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', tolerance=1e-12, maxIterations=10000) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-12, maxIterations=10000) rootNode.addObject('CollisionPipeline') rootNode.addObject('BruteForceDetection') rootNode.addObject('CollisionResponse', response='FrictionContact', responseParams='mu=0.6') diff --git a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md index 060053bf..953c8174 100644 --- a/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md +++ b/examples/tutorials/PneunetGripper/pneunetgripper-tuto.md @@ -101,10 +101,10 @@ In this case, the controller allows to interactively inflate the cavity by press ## Solving the constraints - To solve the constraints, such as the one define by the pressure actuator, we have to add to the rootNode the component FreeMotionAnimationLoop that will build up the system including constraints. The component GenericConstraintSolver will also be added to solve the constraints problem. Finally, we add the component LinearConstraintCorrection to the finger Node to take into account the correction due to the cavity constraint to the velocity and position: + To solve the constraints, such as the one define by the pressure actuator, we have to add to the rootNode the component FreeMotionAnimationLoop that will build up the system including constraints. The component ProjectedGaussSeidelConstraintSolver will also be added to solve the constraints problem. Finally, we add the component LinearConstraintCorrection to the finger Node to take into account the correction due to the cavity constraint to the velocity and position: ```python rootNode.addObject('FreeMotionAnimationLoop') -rootNode.addObject('GenericConstraintSolver', maxIterations=10000, tolerance=1e-3) +rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=10000, tolerance=1e-3) ``` ```python @@ -226,7 +226,7 @@ def createScene(rootNode): rootNode.addObject('VisualStyle', displayFlags='showVisualModels hideBehaviorModels hideCollisionModels hideBoundingCollisionModels hideForceFields showInteractionForceFields hideWireframe') rootNode.findData('gravity').value=[-9810, 0, 0]; rootNode.addObject('FreeMotionAnimationLoop') - rootNode.addObject('GenericConstraintSolver', tolerance=1e-12, maxIterations=10000) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-12, maxIterations=10000) rootNode.addObject('CollisionPipeline') rootNode.addObject('BruteForceDetection') rootNode.addObject('CollisionResponse', response='FrictionContactConstraint', responseParams='mu=0.6') diff --git a/examples/tutorials/SoftArmGripper/header.py b/examples/tutorials/SoftArmGripper/header.py index bf72b631..54f6e25a 100644 --- a/examples/tutorials/SoftArmGripper/header.py +++ b/examples/tutorials/SoftArmGripper/header.py @@ -36,7 +36,7 @@ def addHeader(node): node.addObject('RequiredPlugin', name='SoftRobots.Inverse') node.addObject('QPInverseProblemSolver') else: - node.addObject('GenericConstraintSolver', maxIterations=100, tolerance=0.001) + node.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=100, tolerance=0.001) node.addObject('CollisionPipeline') node.addObject('BruteForceBroadPhase') node.addObject('BVHNarrowPhase') diff --git a/examples/tutorials/SoftFingerDesign/details/actuated_arm.py b/examples/tutorials/SoftFingerDesign/details/actuated_arm.py index 04da5102..e8aec201 100644 --- a/examples/tutorials/SoftFingerDesign/details/actuated_arm.py +++ b/examples/tutorials/SoftFingerDesign/details/actuated_arm.py @@ -102,7 +102,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.dt = 0.01 scene.gravity = [0., -9810., 0.] diff --git a/examples/tutorials/SoftFingerDesign/details/actuated_finger.py b/examples/tutorials/SoftFingerDesign/details/actuated_finger.py index a64fea31..f86a299d 100644 --- a/examples/tutorials/SoftFingerDesign/details/actuated_finger.py +++ b/examples/tutorials/SoftFingerDesign/details/actuated_finger.py @@ -129,7 +129,7 @@ def __init__(self, *args, **kwargs): self.numContact = 0 # Computation of the contact force applied on the object to grasp - self.node.getRoot().GenericConstraintSolver.computeConstraintForces.value = True + self.node.getRoot().ProjectedGaussSeidelConstraintSolver.computeConstraintForces.value = True def onKeypressedEvent(self, event): key = event['key'] @@ -150,7 +150,7 @@ def onAnimateBeginEvent(self, eventType): self.actuator.ServoMotor.angleIn = angleInit + angularStep # Computation of the contact force applied on the object to grasp - contactForces = self.node.getRoot().GenericConstraintSolver.constraintForces.value + contactForces = self.node.getRoot().ProjectedGaussSeidelConstraintSolver.constraintForces.value # print the number of nodes in contact and the norm of the largest contact force self.numContact = 0 @@ -183,7 +183,7 @@ def createScene(rootNode): # Set up the pipeline for the collision computation scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 diff --git a/examples/tutorials/SoftFingerDesign/details/s90_servo.py b/examples/tutorials/SoftFingerDesign/details/s90_servo.py index 0c7a81c0..e5d3c934 100644 --- a/examples/tutorials/SoftFingerDesign/details/s90_servo.py +++ b/examples/tutorials/SoftFingerDesign/details/s90_servo.py @@ -109,7 +109,7 @@ def animation(target, factor): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=1e3, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1e3, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.dt = 0.01 diff --git a/examples/tutorials/Tripod/details/actuatedarm.py b/examples/tutorials/Tripod/details/actuatedarm.py index ecd1c15a..2ac65363 100644 --- a/examples/tutorials/Tripod/details/actuatedarm.py +++ b/examples/tutorials/Tripod/details/actuatedarm.py @@ -112,7 +112,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.VisualStyle.displayFlags = 'showBehavior' scene.dt = 0.01 diff --git a/examples/tutorials/Tripod/details/s90servo.py b/examples/tutorials/Tripod/details/s90servo.py index 42ef2332..4b6fac60 100644 --- a/examples/tutorials/Tripod/details/s90servo.py +++ b/examples/tutorials/Tripod/details/s90servo.py @@ -130,7 +130,7 @@ def animation(target, factor): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=1e3, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1e3, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.dt = 0.01 diff --git a/examples/tutorials/Tripod/details/step4-1.py b/examples/tutorials/Tripod/details/step4-1.py index 938d2b03..c068140d 100644 --- a/examples/tutorials/Tripod/details/step4-1.py +++ b/examples/tutorials/Tripod/details/step4-1.py @@ -70,7 +70,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 rootNode.dt = 0.01 diff --git a/examples/tutorials/Tripod/details/step4-2.py b/examples/tutorials/Tripod/details/step4-2.py index a485551f..f8dc589e 100644 --- a/examples/tutorials/Tripod/details/step4-2.py +++ b/examples/tutorials/Tripod/details/step4-2.py @@ -97,7 +97,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.VisualStyle.displayFlags = "showBehavior" diff --git a/examples/tutorials/Tripod/details/step4-3.py b/examples/tutorials/Tripod/details/step4-3.py index 8c42b30f..05c3be76 100644 --- a/examples/tutorials/Tripod/details/step4-3.py +++ b/examples/tutorials/Tripod/details/step4-3.py @@ -107,7 +107,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.05 diff --git a/examples/tutorials/Tripod/details/step4.py b/examples/tutorials/Tripod/details/step4.py index c53c8319..f7a0b62f 100644 --- a/examples/tutorials/Tripod/details/step4.py +++ b/examples/tutorials/Tripod/details/step4.py @@ -39,7 +39,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.05 diff --git a/examples/tutorials/Tripod/details/step5.py b/examples/tutorials/Tripod/details/step5.py index 3af8cbde..401c6bb5 100644 --- a/examples/tutorials/Tripod/details/step5.py +++ b/examples/tutorials/Tripod/details/step5.py @@ -43,7 +43,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.005 scene.Settings.mouseButton.stiffness = 10 diff --git a/examples/tutorials/Tripod/details/step7.py b/examples/tutorials/Tripod/details/step7.py index 7b27df13..69a31273 100644 --- a/examples/tutorials/Tripod/details/step7.py +++ b/examples/tutorials/Tripod/details/step7.py @@ -113,7 +113,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.VisualStyle.displayFlags = "showBehavior" scene.Settings.mouseButton.stiffness = 10 diff --git a/examples/tutorials/Tripod/details/step8-maze.py b/examples/tutorials/Tripod/details/step8-maze.py index 29feccd9..3d429306 100644 --- a/examples/tutorials/Tripod/details/step8-maze.py +++ b/examples/tutorials/Tripod/details/step8-maze.py @@ -120,7 +120,7 @@ def createScene(rootNode): scene = Scene(rootNode, gravity=[0., -9810, 0.], dt=0.01, iterative=False, plugins=pluginList) ContactHeader(rootNode, alarmDistance=15, contactDistance=0.5, frictionCoef=0) - scene.removeObject(scene.GenericConstraintSolver) + scene.removeObject(scene.ProjectedGaussSeidelConstraintSolver) goalNode = EffectorGoal(rootNode, [0, 30, 0]) diff --git a/examples/tutorials/Tripod/details/tripod.py b/examples/tutorials/Tripod/details/tripod.py index 50fb34ba..92e151b6 100644 --- a/examples/tutorials/Tripod/details/tripod.py +++ b/examples/tutorials/Tripod/details/tripod.py @@ -135,7 +135,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.05 diff --git a/examples/tutorials/Tripod/details/tutorial.py b/examples/tutorials/Tripod/details/tutorial.py index 8f4e0960..1e8c3b34 100644 --- a/examples/tutorials/Tripod/details/tutorial.py +++ b/examples/tutorials/Tripod/details/tutorial.py @@ -71,7 +71,7 @@ def Scene(parent, **kwargs): Modelling(scene) Simulation(scene) parent.addObject("FreeMotionAnimationLoop") - parent.addObject("GenericConstraintSolver", maxIterations=250, tolerance=1e-20) + parent.addObject("ProjectedGaussSeidelConstraintSolver", maxIterations=250, tolerance=1e-20) ctx = scene.Config ctx.addObject("MeshSTLLoader", name="loader", filename=getLoadingLocation("data/mesh/blueprint.stl", __file__)) diff --git a/examples/tutorials/Tripod/myproject/actuatedarm.py b/examples/tutorials/Tripod/myproject/actuatedarm.py index ecd1c15a..2ac65363 100644 --- a/examples/tutorials/Tripod/myproject/actuatedarm.py +++ b/examples/tutorials/Tripod/myproject/actuatedarm.py @@ -112,7 +112,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.VisualStyle.displayFlags = 'showBehavior' scene.dt = 0.01 diff --git a/examples/tutorials/Tripod/myproject/parts/actuatedarm.py b/examples/tutorials/Tripod/myproject/parts/actuatedarm.py index 1042347f..a13b7bee 100644 --- a/examples/tutorials/Tripod/myproject/parts/actuatedarm.py +++ b/examples/tutorials/Tripod/myproject/parts/actuatedarm.py @@ -98,7 +98,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.VisualStyle.displayFlags = 'showBehavior' scene.dt = 0.01 diff --git a/examples/tutorials/Tripod/myproject/parts/s90servo.py b/examples/tutorials/Tripod/myproject/parts/s90servo.py index 6f7b900d..819aad90 100644 --- a/examples/tutorials/Tripod/myproject/parts/s90servo.py +++ b/examples/tutorials/Tripod/myproject/parts/s90servo.py @@ -111,7 +111,7 @@ def animation(target, factor): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=1e3, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1e3, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.dt = 0.01 diff --git a/examples/tutorials/Tripod/myproject/parts/tripod.py b/examples/tutorials/Tripod/myproject/parts/tripod.py index ee5cb52a..00ef72b5 100644 --- a/examples/tutorials/Tripod/myproject/parts/tripod.py +++ b/examples/tutorials/Tripod/myproject/parts/tripod.py @@ -112,7 +112,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.05 diff --git a/examples/tutorials/Tripod/myproject/parts/tutorial.py b/examples/tutorials/Tripod/myproject/parts/tutorial.py index df1fc5bc..f7de0628 100644 --- a/examples/tutorials/Tripod/myproject/parts/tutorial.py +++ b/examples/tutorials/Tripod/myproject/parts/tutorial.py @@ -71,7 +71,7 @@ def Scene(parent, **kwargs): Modelling(scene) Simulation(scene) parent.addObject("FreeMotionAnimationLoop") - parent.addObject("GenericConstraintSolver", maxIterations=250, tolerance=1e-20) + parent.addObject("ProjectedGaussSeidelConstraintSolver", maxIterations=250, tolerance=1e-20) ctx = scene.Config ctx.addObject("MeshSTLLoader", name="loader", filename=getLoadingLocation("data/mesh/blueprint.stl", __file__)) diff --git a/examples/tutorials/Tripod/myproject/s90servo.py b/examples/tutorials/Tripod/myproject/s90servo.py index 42ef2332..4b6fac60 100644 --- a/examples/tutorials/Tripod/myproject/s90servo.py +++ b/examples/tutorials/Tripod/myproject/s90servo.py @@ -130,7 +130,7 @@ def animation(target, factor): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=1e3, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1e3, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.dt = 0.01 diff --git a/examples/tutorials/Tripod/myproject/step4-1.py b/examples/tutorials/Tripod/myproject/step4-1.py index 938d2b03..c068140d 100644 --- a/examples/tutorials/Tripod/myproject/step4-1.py +++ b/examples/tutorials/Tripod/myproject/step4-1.py @@ -70,7 +70,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 rootNode.dt = 0.01 diff --git a/examples/tutorials/Tripod/myproject/step4-2.py b/examples/tutorials/Tripod/myproject/step4-2.py index a485551f..f8dc589e 100644 --- a/examples/tutorials/Tripod/myproject/step4-2.py +++ b/examples/tutorials/Tripod/myproject/step4-2.py @@ -97,7 +97,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.VisualStyle.displayFlags = "showBehavior" diff --git a/examples/tutorials/Tripod/myproject/step4-3.py b/examples/tutorials/Tripod/myproject/step4-3.py index 8c42b30f..05c3be76 100644 --- a/examples/tutorials/Tripod/myproject/step4-3.py +++ b/examples/tutorials/Tripod/myproject/step4-3.py @@ -107,7 +107,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.05 diff --git a/examples/tutorials/Tripod/myproject/step4.py b/examples/tutorials/Tripod/myproject/step4.py index 5f1b09df..c65bdd45 100644 --- a/examples/tutorials/Tripod/myproject/step4.py +++ b/examples/tutorials/Tripod/myproject/step4.py @@ -39,7 +39,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.05 diff --git a/examples/tutorials/Tripod/myproject/step5.py b/examples/tutorials/Tripod/myproject/step5.py index 3af8cbde..401c6bb5 100644 --- a/examples/tutorials/Tripod/myproject/step5.py +++ b/examples/tutorials/Tripod/myproject/step5.py @@ -43,7 +43,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.005 scene.Settings.mouseButton.stiffness = 10 diff --git a/examples/tutorials/Tripod/myproject/step7.py b/examples/tutorials/Tripod/myproject/step7.py index 7b27df13..69a31273 100644 --- a/examples/tutorials/Tripod/myproject/step7.py +++ b/examples/tutorials/Tripod/myproject/step7.py @@ -113,7 +113,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.VisualStyle.displayFlags = "showBehavior" scene.Settings.mouseButton.stiffness = 10 diff --git a/examples/tutorials/Tripod/myproject/step8-maze.py b/examples/tutorials/Tripod/myproject/step8-maze.py index 40891e15..be3cabcb 100644 --- a/examples/tutorials/Tripod/myproject/step8-maze.py +++ b/examples/tutorials/Tripod/myproject/step8-maze.py @@ -120,7 +120,7 @@ def createScene(rootNode): scene = Scene(rootNode, gravity=[0., -9810, 0.], dt=0.01, iterative=False, plugins=pluginList) ContactHeader(rootNode, alarmDistance=15, contactDistance=0.5, frictionCoef=0) - scene.removeObject(scene.GenericConstraintSolver) + scene.removeObject(scene.ProjectedGaussSeidelConstraintSolver) goalNode = EffectorGoal(rootNode, [0, 30, 0]) diff --git a/examples/tutorials/Tripod/myproject/step8.py b/examples/tutorials/Tripod/myproject/step8.py index 1683d681..c911ff10 100644 --- a/examples/tutorials/Tripod/myproject/step8.py +++ b/examples/tutorials/Tripod/myproject/step8.py @@ -97,7 +97,7 @@ def createScene(rootNode): # Inverse Solver scene.addObject('FreeMotionAnimationLoop') # TODO: Replace the constraint solver with the inverse solver - scene.Simulation.addObject('GenericConstraintSolver') + scene.Simulation.addObject('ProjectedGaussSeidelConstraintSolver') scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 diff --git a/examples/tutorials/Tripod/myproject/tripod.py b/examples/tutorials/Tripod/myproject/tripod.py index 50fb34ba..92e151b6 100644 --- a/examples/tutorials/Tripod/myproject/tripod.py +++ b/examples/tutorials/Tripod/myproject/tripod.py @@ -135,7 +135,7 @@ def createScene(rootNode): scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.05 diff --git a/examples/tutorials/Tripod/myproject/tutorial.py b/examples/tutorials/Tripod/myproject/tutorial.py index 8f4e0960..1e8c3b34 100644 --- a/examples/tutorials/Tripod/myproject/tutorial.py +++ b/examples/tutorials/Tripod/myproject/tutorial.py @@ -71,7 +71,7 @@ def Scene(parent, **kwargs): Modelling(scene) Simulation(scene) parent.addObject("FreeMotionAnimationLoop") - parent.addObject("GenericConstraintSolver", maxIterations=250, tolerance=1e-20) + parent.addObject("ProjectedGaussSeidelConstraintSolver", maxIterations=250, tolerance=1e-20) ctx = scene.Config ctx.addObject("MeshSTLLoader", name="loader", filename=getLoadingLocation("data/mesh/blueprint.stl", __file__)) diff --git a/examples/tutorials/Tripod/tripod-tuto.html b/examples/tutorials/Tripod/tripod-tuto.html index e9a25f94..2a72bf61 100644 --- a/examples/tutorials/Tripod/tripod-tuto.html +++ b/examples/tutorials/Tripod/tripod-tuto.html @@ -552,7 +552,7 @@

At the end of this ste scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 rootNode.dt = 0.01 @@ -706,7 +706,7 @@

At the end of this ste scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.VisualStyle.displayFlags = "showBehavior" @@ -874,7 +874,7 @@

At the end of this ste scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Settings.mouseButton.stiffness = 10 scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.05 @@ -1024,7 +1024,7 @@

At the end of this ste scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.Simulation.TimeIntegrationSchema.rayleighStiffness = 0.005 scene.Settings.mouseButton.stiffness = 10 @@ -1457,7 +1457,7 @@

At the end of this ste scene.addMainHeader() scene.addObject('DefaultVisualManagerLoop') scene.addObject('FreeMotionAnimationLoop') - scene.addObject('GenericConstraintSolver', maxIterations=50, tolerance=1e-5) + scene.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=50, tolerance=1e-5) scene.Simulation.addObject('GenericConstraintCorrection') scene.VisualStyle.displayFlags = "showBehavior" scene.Settings.mouseButton.stiffness = 10 @@ -1934,7 +1934,7 @@

STEP 8.3: I scene = Scene(rootNode, gravity=[0., -9810, 0.], dt=0.01, iterative=False, plugins=pluginList) ContactHeader(rootNode, alarmDistance=15, contactDistance=0.5, frictionCoef=0) - scene.removeObject(scene.GenericConstraintSolver) + scene.removeObject(scene.ProjectedGaussSeidelConstraintSolver) goalNode = EffectorGoal(rootNode, [0, 30, 0]) diff --git a/examples/tutorials/Trunk/trunk.py b/examples/tutorials/Trunk/trunk.py index cdd6233c..a7148be1 100644 --- a/examples/tutorials/Trunk/trunk.py +++ b/examples/tutorials/Trunk/trunk.py @@ -175,7 +175,7 @@ def createScene(rootNode): rootNode.addObject('QPInverseProblemSolver', epsilon=1e-1) else: # For direct resolution, i.e direct control of the cable displacement - rootNode.addObject('GenericConstraintSolver', maxIterations=100, tolerance=1e-5) + rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=100, tolerance=1e-5) simulation = rootNode.addChild('Simulation') diff --git a/tests/component/constraint/scenes/SurfacePressureConstraint.scn b/tests/component/constraint/scenes/SurfacePressureConstraint.scn index ea97dbe0..ea411096 100644 --- a/tests/component/constraint/scenes/SurfacePressureConstraint.scn +++ b/tests/component/constraint/scenes/SurfacePressureConstraint.scn @@ -35,7 +35,7 @@ - +