From 95a74883106ac7fb7c00a32a359e71c12fc64bf8 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Fri, 13 Sep 2019 07:38:00 -0700 Subject: [PATCH] PyBullet: fix createMultiBodyBatch.py example --- examples/pybullet/examples/createMultiBodyBatch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pybullet/examples/createMultiBodyBatch.py b/examples/pybullet/examples/createMultiBodyBatch.py index 3d95973875..dd53d99b08 100644 --- a/examples/pybullet/examples/createMultiBodyBatch.py +++ b/examples/pybullet/examples/createMultiBodyBatch.py @@ -117,14 +117,14 @@ batchPositions.append( [x * meshScale[0] * 5.5, y * meshScale[1] * 5.5, (0.5 + z) * meshScale[2] * 2.5]) -bodyUid = p.createMultiBody(baseMass=0, +bodyUids = p.createMultiBody(baseMass=0, baseInertialFramePosition=[0, 0, 0], baseCollisionShapeIndex=collisionShapeId, baseVisualShapeIndex=visualShapeId, basePosition=[0, 0, 2], batchPositions=batchPositions, useMaximalCoordinates=True) -p.changeVisualShape(bodyUid, -1, textureUniqueId=texUid) +p.changeVisualShape(bodyUids[0], -1, textureUniqueId=texUid) p.syncBodyInfo() print("numBodies=", p.getNumBodies())