From e74ffa2f6583090680402d826c2224565b4b4a85 Mon Sep 17 00:00:00 2001 From: Chuyuan Fu Date: Tue, 3 Sep 2019 14:27:19 -0700 Subject: [PATCH] add body type info to dynamics info --- examples/pybullet/examples/load_soft_body.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/pybullet/examples/load_soft_body.py b/examples/pybullet/examples/load_soft_body.py index 401c25a92..1d1052c88 100644 --- a/examples/pybullet/examples/load_soft_body.py +++ b/examples/pybullet/examples/load_soft_body.py @@ -5,6 +5,7 @@ physicsClient = p.connect(p.DIRECT) p.setGravity(0, 0, -10) planeId = p.loadURDF("plane.urdf") +boxId = p.loadURDF("cube.urdf", useMaximalCoordinates = True) bunnyId = p.loadSoftBody("bunny.obj") #meshData = p.getMeshData(bunnyId) #print("meshData=",meshData) @@ -14,6 +15,10 @@ useRealTimeSimulation = 1 if (useRealTimeSimulation): p.setRealTimeSimulation(1) +print(p.getDynamicsInfo(planeId, -1)) +print(p.getDynamicsInfo(bunnyId, 0)) +print(p.getDynamicsInfo(boxId, -1)) + while p.isConnected(): p.setGravity(0, 0, -10) if (useRealTimeSimulation):