From edffb0cc551d0ef6139bc0b0a78df270f13051a9 Mon Sep 17 00:00:00 2001 From: Xuchen Han Date: Tue, 19 Nov 2019 23:09:49 -0800 Subject: [PATCH] update pybullet examples --- examples/pybullet/examples/deformable_anchor.py | 2 +- examples/pybullet/examples/deformable_ball.py | 4 ++-- examples/pybullet/examples/deformable_torus.py | 2 -- examples/pybullet/examples/load_soft_body.py | 1 + examples/pybullet/pybullet.c | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/pybullet/examples/deformable_anchor.py b/examples/pybullet/examples/deformable_anchor.py index 135a55c71..66753b0a6 100644 --- a/examples/pybullet/examples/deformable_anchor.py +++ b/examples/pybullet/examples/deformable_anchor.py @@ -3,7 +3,7 @@ from time import sleep physicsClient = p.connect(p.GUI) -p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) +#p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) gravZ=-10 p.setGravity(0, 0, gravZ) diff --git a/examples/pybullet/examples/deformable_ball.py b/examples/pybullet/examples/deformable_ball.py index 8803e2fb2..757994ad5 100644 --- a/examples/pybullet/examples/deformable_ball.py +++ b/examples/pybullet/examples/deformable_ball.py @@ -3,7 +3,7 @@ from time import sleep physicsClient = p.connect(p.GUI) -p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) +#p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) p.setGravity(0, 0, -10) @@ -24,4 +24,4 @@ while p.isConnected(): sleep(1./240.) #p.resetSimulation() -#p.stopStateLogging(logId) \ No newline at end of file +#p.stopStateLogging(logId) diff --git a/examples/pybullet/examples/deformable_torus.py b/examples/pybullet/examples/deformable_torus.py index ff02237d6..e71d0653c 100644 --- a/examples/pybullet/examples/deformable_torus.py +++ b/examples/pybullet/examples/deformable_torus.py @@ -3,8 +3,6 @@ from time import sleep physicsClient = p.connect(p.GUI) -p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) - p.setGravity(0, 0, -10) planeId = p.loadURDF("plane.urdf", [0,0,-2]) diff --git a/examples/pybullet/examples/load_soft_body.py b/examples/pybullet/examples/load_soft_body.py index 3c55ca2e6..1e86d59bd 100644 --- a/examples/pybullet/examples/load_soft_body.py +++ b/examples/pybullet/examples/load_soft_body.py @@ -2,6 +2,7 @@ import pybullet as p from time import sleep physicsClient = p.connect(p.GUI) +p.resetSimulation(p.RESET_USE_SOFT_MULTIBODY_WORLD) p.setGravity(0, 0, -10) planeId = p.loadURDF("plane.urdf", [0,0,-2]) boxId = p.loadURDF("cube.urdf", [0,3,2],useMaximalCoordinates = True) diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 0857ea0da..faaa971fb 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -12466,7 +12466,7 @@ initpybullet(void) //PyModule_AddIntConstant(m, "CONSTRAINT_SOLVER_LCP_NNCF",eConstraintSolverLCP_NNCG); //PyModule_AddIntConstant(m, "CONSTRAINT_SOLVER_LCP_BLOCK",eConstraintSolverLCP_BLOCK_PGS); - PyModule_AddIntConstant(m, "RESET_USE_DEFORMABLE_WORLD", RESET_USE_DEFORMABLE_WORLD); + PyModule_AddIntConstant(m, "RESET_USE_SOFT_MULTIBODY_WORLD", RESET_USE_SOFT_MULTIBODY_WORLD); PyModule_AddIntConstant(m, "RESET_USE_DISCRETE_DYNAMICS_WORLD", RESET_USE_DISCRETE_DYNAMICS_WORLD); PyModule_AddIntConstant(m, "RESET_USE_SIMPLE_BROADPHASE", RESET_USE_SIMPLE_BROADPHASE);