From 15e29e4b86eeb5d1357107ea7c9a95f8cdd7b90a Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:36:00 +0530 Subject: [PATCH 001/109] Update biped2d_pybullet.py --- examples/pybullet/examples/biped2d_pybullet.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/biped2d_pybullet.py b/examples/pybullet/examples/biped2d_pybullet.py index 9b7cf687f..acf7ebeed 100644 --- a/examples/pybullet/examples/biped2d_pybullet.py +++ b/examples/pybullet/examples/biped2d_pybullet.py @@ -5,7 +5,9 @@ import time GRAVITY = -9.8 dt = 1e-3 iters = 2000 +import pybullet_data +p.setAdditionalSearchPath(pybullet_data.getDataPath()) physicsClient = p.connect(p.GUI) p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.resetSimulation() From 06e6350aa85ac2fda9986f5fa9495ce64b7cdb1b Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:37:12 +0530 Subject: [PATCH 002/109] Update changeDynamicsMass.py --- examples/pybullet/examples/changeDynamicsMass.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/changeDynamicsMass.py b/examples/pybullet/examples/changeDynamicsMass.py index 8e14711cd..715085ce1 100644 --- a/examples/pybullet/examples/changeDynamicsMass.py +++ b/examples/pybullet/examples/changeDynamicsMass.py @@ -1,7 +1,9 @@ import pybullet as p import time +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) cube2 = p.loadURDF("cube.urdf", [0, 0, 3], useFixedBase=True) cube = p.loadURDF("cube.urdf", useFixedBase=True) p.setGravity(0, 0, -10) From cf4441cdbd22f567683a2dd4d7621c5e5e10d282 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:40:02 +0530 Subject: [PATCH 003/109] Update changeTexture.py --- examples/pybullet/examples/changeTexture.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/changeTexture.py b/examples/pybullet/examples/changeTexture.py index e14ec39cf..9f1f5cf01 100644 --- a/examples/pybullet/examples/changeTexture.py +++ b/examples/pybullet/examples/changeTexture.py @@ -1,6 +1,9 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) planeUidA = p.loadURDF("plane_transparent.urdf", [0, 0, 0]) planeUid = p.loadURDF("plane_transparent.urdf", [0, 0, -1]) From 97bfc4d5beb95cce3607d6a25d947a778d2927bd Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:42:14 +0530 Subject: [PATCH 004/109] Update collisionFilter.py --- examples/pybullet/examples/collisionFilter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/collisionFilter.py b/examples/pybullet/examples/collisionFilter.py index e2eae0a12..13abacee9 100644 --- a/examples/pybullet/examples/collisionFilter.py +++ b/examples/pybullet/examples/collisionFilter.py @@ -1,6 +1,9 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) planeId = p.loadURDF("plane.urdf", useMaximalCoordinates=False) cubeId = p.loadURDF("cube_collisionfilter.urdf", [0, 0, 3], useMaximalCoordinates=False) From faa59f3799521de2fdb469bd9f2f1055ce2a99c9 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:43:53 +0530 Subject: [PATCH 005/109] Update commandLogAndPlayback.py --- examples/pybullet/examples/commandLogAndPlayback.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/commandLogAndPlayback.py b/examples/pybullet/examples/commandLogAndPlayback.py index 94f1848cb..3ff834412 100644 --- a/examples/pybullet/examples/commandLogAndPlayback.py +++ b/examples/pybullet/examples/commandLogAndPlayback.py @@ -1,7 +1,9 @@ import pybullet as p import time +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) logId = p.startStateLogging(p.STATE_LOGGING_ALL_COMMANDS, "commandLog.bin") p.loadURDF("plane.urdf") p.loadURDF("r2d2.urdf", [0, 0, 1]) From ade9056de278e3f41f8a0e978efd8dee07f0eb4d Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:44:56 +0530 Subject: [PATCH 006/109] Update configureDebugVisualizer.py --- examples/pybullet/examples/configureDebugVisualizer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/pybullet/examples/configureDebugVisualizer.py b/examples/pybullet/examples/configureDebugVisualizer.py index e1d755708..988454715 100644 --- a/examples/pybullet/examples/configureDebugVisualizer.py +++ b/examples/pybullet/examples/configureDebugVisualizer.py @@ -2,8 +2,10 @@ import pybullet as p import math import time dt = 1./240. +import pybullet_data -p.connect(p.GUI)#SHARED_MEMORY_GUI) +p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("r2d2.urdf",[0,0,1]) p.loadURDF("plane.urdf") p.setGravity(0,0,-10) @@ -18,4 +20,4 @@ while (1): p.configureDebugVisualizer(lightPosition=[radius*math.sin(t),radius*math.cos(t),3]) p.stepSimulation() - time.sleep(dt) \ No newline at end of file + time.sleep(dt) From 1c2493a031d03b0de63e5b92154cf862a8449b38 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:45:29 +0530 Subject: [PATCH 007/109] Update constraint.py --- examples/pybullet/examples/constraint.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/constraint.py b/examples/pybullet/examples/constraint.py index 0d8dc0e3c..70d4a6fe9 100644 --- a/examples/pybullet/examples/constraint.py +++ b/examples/pybullet/examples/constraint.py @@ -2,7 +2,9 @@ import pybullet as p import time import math +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf") cubeId = p.loadURDF("cube_small.urdf", 0, 0, 1) From 5e23b8f2b84b09e387a181c4e8c1d41c46364609 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:49:30 +0530 Subject: [PATCH 008/109] Update contactFriction.py --- examples/pybullet/examples/contactFriction.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/contactFriction.py b/examples/pybullet/examples/contactFriction.py index 334e5ab71..0b113d11e 100644 --- a/examples/pybullet/examples/contactFriction.py +++ b/examples/pybullet/examples/contactFriction.py @@ -1,5 +1,8 @@ import pybullet as p +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) useMaximalCoordinates = False p.loadURDF("plane.urdf", useMaximalCoordinates=useMaximalCoordinates) #p.loadURDF("sphere2.urdf",[0,0,1]) From f2e7d026daedbd0210e341b81dbd1feceaad5f5b Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:52:17 +0530 Subject: [PATCH 009/109] Update createMesh.py --- examples/pybullet/examples/createMesh.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/createMesh.py b/examples/pybullet/examples/createMesh.py index 6bbb09aa3..ce7fc80d2 100644 --- a/examples/pybullet/examples/createMesh.py +++ b/examples/pybullet/examples/createMesh.py @@ -1,8 +1,10 @@ import pybullet as p import time import math +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) #don't create a ground plane, to allow for gaps etc p.resetSimulation() #p.createCollisionShape(p.GEOM_PLANE) From 23e67a9733798c092eb62b8f13b1dbd4f8941473 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:55:42 +0530 Subject: [PATCH 010/109] Update createMultiBodyBatch.py --- examples/pybullet/examples/createMultiBodyBatch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/pybullet/examples/createMultiBodyBatch.py b/examples/pybullet/examples/createMultiBodyBatch.py index dd53d99b0..87fde9c84 100644 --- a/examples/pybullet/examples/createMultiBodyBatch.py +++ b/examples/pybullet/examples/createMultiBodyBatch.py @@ -1,10 +1,11 @@ import pybullet as p import time import math - +import pybullet_data cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI, options="--minGraphicsUpdateTimeMs=16000") +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setPhysicsEngineParameter(numSolverIterations=4, minimumSolverIslandSize=1024) p.setTimeStep(1. / 120.) From f8ce0ebf08c9ed97adc4a40c3fc5330897ecefb1 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:57:05 +0530 Subject: [PATCH 011/109] Update createMultiBodyLinks.py --- examples/pybullet/examples/createMultiBodyLinks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/createMultiBodyLinks.py b/examples/pybullet/examples/createMultiBodyLinks.py index 292c887f8..cbaa6abc6 100644 --- a/examples/pybullet/examples/createMultiBodyLinks.py +++ b/examples/pybullet/examples/createMultiBodyLinks.py @@ -1,7 +1,9 @@ import pybullet as p import time +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.createCollisionShape(p.GEOM_PLANE) p.createMultiBody(0, 0) From bd33c7c43c4297335e466340044a3d8399ab4764 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:59:53 +0530 Subject: [PATCH 012/109] Update createObstacleCourse.py --- examples/pybullet/examples/createObstacleCourse.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/createObstacleCourse.py b/examples/pybullet/examples/createObstacleCourse.py index df2d37d3c..a9ab11908 100644 --- a/examples/pybullet/examples/createObstacleCourse.py +++ b/examples/pybullet/examples/createObstacleCourse.py @@ -1,8 +1,10 @@ import pybullet as p import time import math +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) #don't create a ground plane, to allow for gaps etc p.resetSimulation() #p.createCollisionShape(p.GEOM_PLANE) From 7807de7fa67ad7448fa31be22f6b59eec03de0a6 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:00:14 +0530 Subject: [PATCH 013/109] Update createSphereMultiBodies.py --- examples/pybullet/examples/createSphereMultiBodies.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/createSphereMultiBodies.py b/examples/pybullet/examples/createSphereMultiBodies.py index 689205ca3..67f562d70 100644 --- a/examples/pybullet/examples/createSphereMultiBodies.py +++ b/examples/pybullet/examples/createSphereMultiBodies.py @@ -2,8 +2,10 @@ import pybullet as p import time useMaximalCoordinates = 0 +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) #p.loadSDF("stadium.sdf",useMaximalCoordinates=useMaximalCoordinates) monastryId = concaveEnv = p.createCollisionShape(p.GEOM_MESH, fileName="samurai_monastry.obj", From 09ed4d54de409148f154602640dfa73558ac8b5d Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:01:42 +0530 Subject: [PATCH 014/109] Update createTexturedMeshVisualShape.py --- examples/pybullet/examples/createTexturedMeshVisualShape.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/createTexturedMeshVisualShape.py b/examples/pybullet/examples/createTexturedMeshVisualShape.py index b84933741..00e2b6252 100644 --- a/examples/pybullet/examples/createTexturedMeshVisualShape.py +++ b/examples/pybullet/examples/createTexturedMeshVisualShape.py @@ -1,6 +1,7 @@ import pybullet as p import time import math +import pybullet_data def getRayFromTo(mouseX, mouseY): @@ -35,6 +36,7 @@ def getRayFromTo(mouseX, mouseY): cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setPhysicsEngineParameter(numSolverIterations=10) p.setTimeStep(1. / 120.) logId = p.startStateLogging(p.STATE_LOGGING_PROFILE_TIMINGS, "visualShapeBench.json") From 18ec4610becc2b96ec8e7830f5cc7314b5002612 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:02:12 +0530 Subject: [PATCH 015/109] Update createVisualShape.py --- examples/pybullet/examples/createVisualShape.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/createVisualShape.py b/examples/pybullet/examples/createVisualShape.py index 9407feba3..26506ca96 100644 --- a/examples/pybullet/examples/createVisualShape.py +++ b/examples/pybullet/examples/createVisualShape.py @@ -1,6 +1,7 @@ import pybullet as p import time import math +import pybullet_data def getRayFromTo(mouseX, mouseY): @@ -36,6 +37,8 @@ def getRayFromTo(mouseX, mouseY): cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setPhysicsEngineParameter(numSolverIterations=10) p.setTimeStep(1. / 120.) logId = p.startStateLogging(p.STATE_LOGGING_PROFILE_TIMINGS, "visualShapeBench.json") From 09630941dab0c440c84faea85b81d17eb81fc43c Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:02:45 +0530 Subject: [PATCH 016/109] Update createVisualShapeArray.py --- examples/pybullet/examples/createVisualShapeArray.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/createVisualShapeArray.py b/examples/pybullet/examples/createVisualShapeArray.py index 713738eb1..6156d808c 100644 --- a/examples/pybullet/examples/createVisualShapeArray.py +++ b/examples/pybullet/examples/createVisualShapeArray.py @@ -1,6 +1,7 @@ import pybullet as p import time import math +import pybullet_data def getRayFromTo(mouseX, mouseY): @@ -35,6 +36,8 @@ def getRayFromTo(mouseX, mouseY): cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setPhysicsEngineParameter(numSolverIterations=10) p.setTimeStep(1. / 120.) logId = p.startStateLogging(p.STATE_LOGGING_PROFILE_TIMINGS, "visualShapeBench.json") From 19016528e60f3c1fb0f560db25995700887484d5 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:03:12 +0530 Subject: [PATCH 017/109] Update debugDrawItems.py --- examples/pybullet/examples/debugDrawItems.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/debugDrawItems.py b/examples/pybullet/examples/debugDrawItems.py index 0aac654bc..3b2137445 100644 --- a/examples/pybullet/examples/debugDrawItems.py +++ b/examples/pybullet/examples/debugDrawItems.py @@ -1,9 +1,12 @@ import pybullet as p import time +import pybullet_data cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf") kuka = p.loadURDF("kuka_iiwa/model.urdf") p.addUserDebugText("tip", [0, 0, 0.1], From 304700408a6aec7e66b2bca401ca6e9a073f72b6 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:03:43 +0530 Subject: [PATCH 018/109] Update deformable_anchor.py --- examples/pybullet/examples/deformable_anchor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/deformable_anchor.py b/examples/pybullet/examples/deformable_anchor.py index 666334628..1c01ed6d4 100644 --- a/examples/pybullet/examples/deformable_anchor.py +++ b/examples/pybullet/examples/deformable_anchor.py @@ -2,6 +2,9 @@ import pybullet as p from time import sleep physicsClient = p.connect(p.GUI) +import pybullet_data + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) gravZ=-10 From 3cd7cca8f86c21be0fc375577478dfad1dd77cd1 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:04:18 +0530 Subject: [PATCH 019/109] Update deformable_ball.py --- examples/pybullet/examples/deformable_ball.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/deformable_ball.py b/examples/pybullet/examples/deformable_ball.py index 279737fa4..ffda4e6b7 100644 --- a/examples/pybullet/examples/deformable_ball.py +++ b/examples/pybullet/examples/deformable_ball.py @@ -1,7 +1,9 @@ import pybullet as p from time import sleep +import pybullet_data physicsClient = p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) From 0fba23d602342dd9627f6f31606f43f9f2ec8d03 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:04:45 +0530 Subject: [PATCH 020/109] Update deformable_torus.py --- examples/pybullet/examples/deformable_torus.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/deformable_torus.py b/examples/pybullet/examples/deformable_torus.py index eedc1ea83..2801944d8 100644 --- a/examples/pybullet/examples/deformable_torus.py +++ b/examples/pybullet/examples/deformable_torus.py @@ -1,8 +1,11 @@ import pybullet as p from time import sleep +import pybullet_data physicsClient = p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) p.setGravity(0, 0, -10) From 83f506ebeffa450187140e4cb94353b1b3eb0ab5 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:05:14 +0530 Subject: [PATCH 021/109] Update eglRenderTest.py --- examples/pybullet/examples/eglRenderTest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/pybullet/examples/eglRenderTest.py b/examples/pybullet/examples/eglRenderTest.py index 13dbf2091..9270cdbbb 100644 --- a/examples/pybullet/examples/eglRenderTest.py +++ b/examples/pybullet/examples/eglRenderTest.py @@ -2,9 +2,10 @@ import pybullet as p import time import pkgutil egl = pkgutil.get_loader('eglRenderer') +import pybullet_data -p.connect(p.DIRECT) - +p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) plugin = p.loadPlugin(egl.get_filename(), "_eglRendererPlugin") print("plugin=", plugin) From 2c80ac1bb76a56ef4491e9326f174319cffca9e7 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:05:24 +0530 Subject: [PATCH 022/109] Update experimentalCcdSphereRadius.py --- examples/pybullet/examples/experimentalCcdSphereRadius.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/experimentalCcdSphereRadius.py b/examples/pybullet/examples/experimentalCcdSphereRadius.py index 6f3604b1b..ca7dd664a 100644 --- a/examples/pybullet/examples/experimentalCcdSphereRadius.py +++ b/examples/pybullet/examples/experimentalCcdSphereRadius.py @@ -1,7 +1,9 @@ import pybullet as p import time +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setPhysicsEngineParameter(allowedCcdPenetration=0.0) terrain_mass = 0 From a0e98e310de8ce3f951a40fad2f9ccde02a59c5c Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:05:32 +0530 Subject: [PATCH 023/109] Update externalTorqueControlledSphere.py --- examples/pybullet/examples/externalTorqueControlledSphere.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/externalTorqueControlledSphere.py b/examples/pybullet/examples/externalTorqueControlledSphere.py index 45b2cfe70..544811667 100644 --- a/examples/pybullet/examples/externalTorqueControlledSphere.py +++ b/examples/pybullet/examples/externalTorqueControlledSphere.py @@ -1,9 +1,11 @@ import pybullet as p import pybullet_data import time +import pybullet_data p.connect(p.GUI) p.setAdditionalSearchPath(pybullet_data.getDataPath()) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadSDF("stadium.sdf") p.setGravity(0, 0, -10) objects = p.loadMJCF("mjcf/sphere.xml") From 93cb25cb39bb5e59eb49bd7fa2222af3187f3b5f Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:05:41 +0530 Subject: [PATCH 024/109] Update fileIOPlugin.py --- examples/pybullet/examples/fileIOPlugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/fileIOPlugin.py b/examples/pybullet/examples/fileIOPlugin.py index d4a9ce606..9b3c2b546 100644 --- a/examples/pybullet/examples/fileIOPlugin.py +++ b/examples/pybullet/examples/fileIOPlugin.py @@ -1,7 +1,9 @@ import pybullet as p import time +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) fileIO = p.loadPlugin("fileIOPlugin") if (fileIO >= 0): #we can have a zipfile (pickup.zip) inside a zipfile (pickup2.zip) From a555fee4f6fd17e981069e9baaf989749684fb21 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:07:26 +0530 Subject: [PATCH 025/109] Update forcetorquesensor.py --- examples/pybullet/examples/forcetorquesensor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/pybullet/examples/forcetorquesensor.py b/examples/pybullet/examples/forcetorquesensor.py index 5293ab1e1..5b7e3987e 100644 --- a/examples/pybullet/examples/forcetorquesensor.py +++ b/examples/pybullet/examples/forcetorquesensor.py @@ -1,5 +1,8 @@ import pybullet as p -p.connect(p.DIRECT) +import pybullet_data + +p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) hinge = p.loadURDF("hinge.urdf") print("mass of linkA = 1kg, linkB = 1kg, total mass = 2kg") From d91369c345ce819c2b67dd54d0e0b4e40e9edf5a Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:07:33 +0530 Subject: [PATCH 026/109] Update frictionCone.py --- examples/pybullet/examples/frictionCone.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/frictionCone.py b/examples/pybullet/examples/frictionCone.py index f12a6abd3..b5d60ecfb 100644 --- a/examples/pybullet/examples/frictionCone.py +++ b/examples/pybullet/examples/frictionCone.py @@ -2,7 +2,10 @@ import pybullet as p import time import math +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) useMaximalCoordinates = False p.setGravity(0, 0, -10) From a747a035de0dc977598c7557e66ef22d78aee653 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:08:04 +0530 Subject: [PATCH 027/109] Update getAABB.py --- examples/pybullet/examples/getAABB.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/getAABB.py b/examples/pybullet/examples/getAABB.py index b80a6fe6d..a94e581f0 100644 --- a/examples/pybullet/examples/getAABB.py +++ b/examples/pybullet/examples/getAABB.py @@ -1,4 +1,5 @@ import pybullet as p +import pybullet_data draw = 1 printtext = 0 @@ -6,6 +7,8 @@ if (draw): p.connect(p.GUI) else: p.connect(p.DIRECT) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) r2d2 = p.loadURDF("r2d2.urdf") From 2c6a5c5b96d7166faacf077e145bd9829363cb33 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:08:29 +0530 Subject: [PATCH 028/109] Update getCameraImageTest.py --- examples/pybullet/examples/getCameraImageTest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/getCameraImageTest.py b/examples/pybullet/examples/getCameraImageTest.py index c68888577..ceae99566 100644 --- a/examples/pybullet/examples/getCameraImageTest.py +++ b/examples/pybullet/examples/getCameraImageTest.py @@ -2,10 +2,12 @@ import matplotlib.pyplot as plt import numpy as np import pybullet as p import time +import pybullet_data direct = p.connect(p.GUI) #, options="--window_backend=2 --render_device=0") #egl = p.loadPlugin("eglRendererPlugin") +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF('plane.urdf') p.loadURDF("r2d2.urdf", [0, 0, 1]) p.loadURDF('cube_small.urdf', basePosition=[0.0, 0.0, 0.025]) From 20d8be383f5c537932bd79efdb23bca9603e9af1 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:08:36 +0530 Subject: [PATCH 029/109] Update getClosestPoints.py --- examples/pybullet/examples/getClosestPoints.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/getClosestPoints.py b/examples/pybullet/examples/getClosestPoints.py index c8db4dfb0..55311f58d 100644 --- a/examples/pybullet/examples/getClosestPoints.py +++ b/examples/pybullet/examples/getClosestPoints.py @@ -1,6 +1,9 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) useCollisionShapeQuery = True p.configureDebugVisualizer(p.COV_ENABLE_GUI, 0) geom = p.createCollisionShape(p.GEOM_SPHERE, radius=0.1) From cdb01e6354a31e88595a3b40d57cc5608ad2b0d9 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:08:41 +0530 Subject: [PATCH 030/109] Update getTextureUid.py --- examples/pybullet/examples/getTextureUid.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/getTextureUid.py b/examples/pybullet/examples/getTextureUid.py index e8fbe1462..f4a31b2f0 100644 --- a/examples/pybullet/examples/getTextureUid.py +++ b/examples/pybullet/examples/getTextureUid.py @@ -1,5 +1,8 @@ import pybullet as p +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) plane = p.loadURDF("plane.urdf") visualData = p.getVisualShapeData(plane, p.VISUAL_SHAPE_DATA_TEXTURE_UNIQUE_IDS) print(visualData) From 0500154739a50b05e871d5529b1c11f9e7e9b58c Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:09:24 +0530 Subject: [PATCH 031/109] Update grpcClient.py --- examples/pybullet/examples/grpcClient.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/grpcClient.py b/examples/pybullet/examples/grpcClient.py index e28e1112a..98b2ba853 100644 --- a/examples/pybullet/examples/grpcClient.py +++ b/examples/pybullet/examples/grpcClient.py @@ -1,4 +1,6 @@ import pybullet as p +import pybullet_data + usePort = True @@ -13,5 +15,7 @@ if (id < 0): exit(0) print("Connected to GRPC") + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) r2d2 = p.loadURDF("r2d2.urdf") print("numJoints = ", p.getNumJoints(r2d2)) From 168578245f2f734a8f78833aa001889c122f7b7e Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:09:52 +0530 Subject: [PATCH 032/109] Update grpcServer.py --- examples/pybullet/examples/grpcServer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/grpcServer.py b/examples/pybullet/examples/grpcServer.py index 7b4e62485..24385706e 100644 --- a/examples/pybullet/examples/grpcServer.py +++ b/examples/pybullet/examples/grpcServer.py @@ -4,7 +4,10 @@ import time useDirect = False usePort = True +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) id = p.loadPlugin("grpcPlugin") #dynamically loading the plugin #id = p.loadPlugin("E:/develop/bullet3/bin/pybullet_grpcPlugin_vs2010_x64_debug.dll", postFix="_grpcPlugin") From e27a8df07bd5f7cdd365f13651b54172a3a23970 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:10:23 +0530 Subject: [PATCH 033/109] Update hand.py --- examples/pybullet/examples/hand.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/hand.py b/examples/pybullet/examples/hand.py index 5f1b0793a..165a9c193 100644 --- a/examples/pybullet/examples/hand.py +++ b/examples/pybullet/examples/hand.py @@ -8,6 +8,8 @@ import serial import time import pybullet as p +import pybullet_data + #first try to connect to shared memory (VR), if it fails use local GUI c = p.connect(p.SHARED_MEMORY) @@ -15,6 +17,8 @@ print(c) if (c < 0): p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + #load the MuJoCo MJCF hand objects = p.loadMJCF("MPL/MPL.xml") From e9163d0987f46218a5eadda9f41140ea373c644e Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:10:49 +0530 Subject: [PATCH 034/109] Update hello_pybullet.py --- examples/pybullet/examples/hello_pybullet.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/hello_pybullet.py b/examples/pybullet/examples/hello_pybullet.py index 389f2dc67..fdca83cce 100644 --- a/examples/pybullet/examples/hello_pybullet.py +++ b/examples/pybullet/examples/hello_pybullet.py @@ -1,8 +1,12 @@ import pybullet as p from time import sleep +import pybullet_data + physicsClient = p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + p.setGravity(0, 0, -10) planeId = p.loadURDF("plane.urdf") cubeStartPos = [0, 0, 1] From 844c5b62f4f6e3bae99198826f55a722f6890cfd Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:11:16 +0530 Subject: [PATCH 035/109] Update humanoidMotionCapture.py --- examples/pybullet/examples/humanoidMotionCapture.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/humanoidMotionCapture.py b/examples/pybullet/examples/humanoidMotionCapture.py index f810f533e..ac0afda48 100644 --- a/examples/pybullet/examples/humanoidMotionCapture.py +++ b/examples/pybullet/examples/humanoidMotionCapture.py @@ -1,12 +1,15 @@ import pybullet as p import json import time +import pybullet_data + useGUI = True if useGUI: p.connect(p.GUI) else: p.connect(p.DIRECT) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) useZUp = False useYUp = not useZUp From 02b62d858e006bc9fbc8c934897885472abe87b7 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:11:29 +0530 Subject: [PATCH 036/109] Update humanoid_benchmark.py --- examples/pybullet/examples/humanoid_benchmark.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/humanoid_benchmark.py b/examples/pybullet/examples/humanoid_benchmark.py index c063f9006..6666f2c03 100644 --- a/examples/pybullet/examples/humanoid_benchmark.py +++ b/examples/pybullet/examples/humanoid_benchmark.py @@ -1,6 +1,9 @@ import pybullet as p import time +import pybullet_data + p.connect(p.DIRECT) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setGravity(0, 0, -10) p.setPhysicsEngineParameter(numSolverIterations=5) p.setPhysicsEngineParameter(fixedTimeStep=1. / 240.) From 079d3189652446e27c4644b813519c05ab75c8ed Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:11:53 +0530 Subject: [PATCH 037/109] Update humanoid_knee_position_control.py --- examples/pybullet/examples/humanoid_knee_position_control.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/pybullet/examples/humanoid_knee_position_control.py b/examples/pybullet/examples/humanoid_knee_position_control.py index f43a7cb1e..17188c6d2 100644 --- a/examples/pybullet/examples/humanoid_knee_position_control.py +++ b/examples/pybullet/examples/humanoid_knee_position_control.py @@ -1,5 +1,8 @@ import pybullet as p import time +import pybullet_data + + cid = p.connect(p.SHARED_MEMORY) if (cid < 0): @@ -11,6 +14,8 @@ useRealTime = 0 p.setRealTimeSimulation(useRealTime) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + p.setGravity(0, 0, -10) p.loadSDF("stadium.sdf") From 451be4437709d8013e852484d109d7267f943325 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:12:05 +0530 Subject: [PATCH 038/109] Update humanoid_manual_control.py --- examples/pybullet/examples/humanoid_manual_control.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/humanoid_manual_control.py b/examples/pybullet/examples/humanoid_manual_control.py index e6170f43a..891cfab6a 100644 --- a/examples/pybullet/examples/humanoid_manual_control.py +++ b/examples/pybullet/examples/humanoid_manual_control.py @@ -1,7 +1,10 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) obUids = p.loadMJCF("mjcf/humanoid.xml") humanoid = obUids[1] From abcdf44e97caf088e4d44071220db71e17d05341 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:12:06 +0530 Subject: [PATCH 039/109] Update ik_end_effector_orientation.py --- examples/pybullet/examples/ik_end_effector_orientation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/ik_end_effector_orientation.py b/examples/pybullet/examples/ik_end_effector_orientation.py index 5163fbad3..2c9cf3403 100644 --- a/examples/pybullet/examples/ik_end_effector_orientation.py +++ b/examples/pybullet/examples/ik_end_effector_orientation.py @@ -4,7 +4,10 @@ import math from datetime import datetime from time import sleep +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf", [0, 0, -0.3]) kukaId = p.loadURDF("kuka_iiwa/model.urdf", [0, 0, 0]) p.resetBasePositionAndOrientation(kukaId, [0, 0, 0], [0, 0, 0, 1]) From 4a4cdb44c57f14768159917bd4a25461b1575793 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:12:15 +0530 Subject: [PATCH 040/109] Update integrate.py --- examples/pybullet/examples/integrate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/integrate.py b/examples/pybullet/examples/integrate.py index a706dd00e..f711e09f9 100644 --- a/examples/pybullet/examples/integrate.py +++ b/examples/pybullet/examples/integrate.py @@ -1,5 +1,8 @@ import pybullet as p +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) cube = p.loadURDF("cube.urdf") frequency = 240 timeStep = 1. / frequency From a6f99317ed9ab4b66526b86d89a07c361e3efaef Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:12:19 +0530 Subject: [PATCH 041/109] Update internalEdge.py --- examples/pybullet/examples/internalEdge.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/internalEdge.py b/examples/pybullet/examples/internalEdge.py index fa8dbcb9b..7cd303b9f 100644 --- a/examples/pybullet/examples/internalEdge.py +++ b/examples/pybullet/examples/internalEdge.py @@ -1,7 +1,10 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) if (1): box_collision_shape_id = p.createCollisionShape(shapeType=p.GEOM_BOX, From b767c5c819ae666569222d53671474e3688c1fe4 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:13:05 +0530 Subject: [PATCH 042/109] Update inverse_kinematics.py --- examples/pybullet/examples/inverse_kinematics.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/inverse_kinematics.py b/examples/pybullet/examples/inverse_kinematics.py index 11ec4ed4f..bf198ff32 100644 --- a/examples/pybullet/examples/inverse_kinematics.py +++ b/examples/pybullet/examples/inverse_kinematics.py @@ -2,12 +2,15 @@ import pybullet as p import time import math from datetime import datetime +import pybullet_data clid = p.connect(p.SHARED_MEMORY) if (clid < 0): p.connect(p.GUI) #p.connect(p.SHARED_MEMORY_GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + p.loadURDF("plane.urdf", [0, 0, -0.3]) kukaId = p.loadURDF("kuka_iiwa/model.urdf", [0, 0, 0]) p.resetBasePositionAndOrientation(kukaId, [0, 0, 0], [0, 0, 0, 1]) From cdf1e10671211483a43169a04ddf43fefa37720d Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:13:32 +0530 Subject: [PATCH 043/109] Update inverse_kinematics_husky_kuka.py --- examples/pybullet/examples/inverse_kinematics_husky_kuka.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/inverse_kinematics_husky_kuka.py b/examples/pybullet/examples/inverse_kinematics_husky_kuka.py index 7b3bb793d..256d57ae6 100644 --- a/examples/pybullet/examples/inverse_kinematics_husky_kuka.py +++ b/examples/pybullet/examples/inverse_kinematics_husky_kuka.py @@ -3,8 +3,11 @@ import time import math from datetime import datetime from datetime import datetime +import pybullet_data clid = p.connect(p.SHARED_MEMORY) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) if (clid < 0): p.connect(p.GUI) p.loadURDF("plane.urdf", [0, 0, -0.3]) From 73e6f5fd203426f6bad2fbae4784b7de5ae7f454 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:13:49 +0530 Subject: [PATCH 044/109] Update inverse_kinematics_pole.py --- examples/pybullet/examples/inverse_kinematics_pole.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/inverse_kinematics_pole.py b/examples/pybullet/examples/inverse_kinematics_pole.py index fec0dbaf6..653581a0e 100755 --- a/examples/pybullet/examples/inverse_kinematics_pole.py +++ b/examples/pybullet/examples/inverse_kinematics_pole.py @@ -2,10 +2,13 @@ import pybullet as p import time import math from datetime import datetime +import pybullet_data clid = p.connect(p.SHARED_MEMORY) if (clid < 0): p.connect(p.GUI) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf", [0, 0, -1.3]) p.configureDebugVisualizer(p.COV_ENABLE_RENDERING, 0) sawyerId = p.loadURDF("pole.urdf", [0, 0, 0]) From b3100b5bb5c9252de6a40282ed5c6d971caa5bb4 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:14:12 +0530 Subject: [PATCH 045/109] Update jacobian.py --- examples/pybullet/examples/jacobian.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/jacobian.py b/examples/pybullet/examples/jacobian.py index 3cdb4752e..4a7e9725c 100644 --- a/examples/pybullet/examples/jacobian.py +++ b/examples/pybullet/examples/jacobian.py @@ -1,4 +1,6 @@ import pybullet as p +import pybullet_data + def getJointStates(robot): @@ -51,6 +53,8 @@ clid = p.connect(p.SHARED_MEMORY) if (clid < 0): p.connect(p.DIRECT) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + time_step = 0.001 gravity_constant = -9.81 p.resetSimulation() From 822b8664884783d45e7713afc0b098d83704a51b Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:14:18 +0530 Subject: [PATCH 046/109] Update jointFrictionAndMotor.py --- examples/pybullet/examples/jointFrictionAndMotor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/jointFrictionAndMotor.py b/examples/pybullet/examples/jointFrictionAndMotor.py index 028fac915..404adf63e 100644 --- a/examples/pybullet/examples/jointFrictionAndMotor.py +++ b/examples/pybullet/examples/jointFrictionAndMotor.py @@ -1,7 +1,10 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) door = p.loadURDF("door.urdf") #linear/angular damping for base and all children=0 From 7b6dc8358c11ddba8587d62f00698fb332894761 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:14:23 +0530 Subject: [PATCH 047/109] Update jointFrictionDamping.py --- examples/pybullet/examples/jointFrictionDamping.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/jointFrictionDamping.py b/examples/pybullet/examples/jointFrictionDamping.py index a69c021d8..b1d7bfded 100644 --- a/examples/pybullet/examples/jointFrictionDamping.py +++ b/examples/pybullet/examples/jointFrictionDamping.py @@ -1,7 +1,10 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf", [0, 0, -0.25]) minitaur = p.loadURDF("quadruped/minitaur_single_motor.urdf", useFixedBase=True) print(p.getNumJoints(minitaur)) From 7135f565c96b75c9cd32c47ffbef5b4d7b24913e Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:14:31 +0530 Subject: [PATCH 048/109] Update kuka_grasp_block_playback.py --- examples/pybullet/examples/kuka_grasp_block_playback.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/kuka_grasp_block_playback.py b/examples/pybullet/examples/kuka_grasp_block_playback.py index 1d0fbeb8c..1aa3f755d 100644 --- a/examples/pybullet/examples/kuka_grasp_block_playback.py +++ b/examples/pybullet/examples/kuka_grasp_block_playback.py @@ -43,7 +43,10 @@ def readLogFile(filename, verbose=True): #clid = p.connect(p.SHARED_MEMORY) +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadSDF("kuka_iiwa/kuka_with_gripper.sdf") p.loadURDF("tray/tray.urdf", [0, 0, 0]) p.loadURDF("block.urdf", [0, 0, 2]) From 0a7579cdfcc312d13ad422585417083f28064b8e Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:14:35 +0530 Subject: [PATCH 049/109] Update kuka_with_cube.py --- examples/pybullet/examples/kuka_with_cube.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/kuka_with_cube.py b/examples/pybullet/examples/kuka_with_cube.py index 49573ea83..e06fd1487 100644 --- a/examples/pybullet/examples/kuka_with_cube.py +++ b/examples/pybullet/examples/kuka_with_cube.py @@ -4,7 +4,10 @@ import math from datetime import datetime #clid = p.connect(p.SHARED_MEMORY) +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf", [0, 0, -0.3], useFixedBase=True) kukaId = p.loadURDF("kuka_iiwa/model.urdf", [0, 0, 0], useFixedBase=True) p.resetBasePositionAndOrientation(kukaId, [0, 0, 0], [0, 0, 0, 1]) From 274dcbccb0c1144f83614d42f2c55d5ab58cfbb9 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:14:46 +0530 Subject: [PATCH 050/109] Update kuka_with_cube_playback.py --- examples/pybullet/examples/kuka_with_cube_playback.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/kuka_with_cube_playback.py b/examples/pybullet/examples/kuka_with_cube_playback.py index 1a79b42d1..0345b0531 100644 --- a/examples/pybullet/examples/kuka_with_cube_playback.py +++ b/examples/pybullet/examples/kuka_with_cube_playback.py @@ -52,7 +52,10 @@ def readLogFile(filename, verbose=True): #clid = p.connect(p.SHARED_MEMORY) +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf", [0, 0, -0.3]) p.loadURDF("kuka_iiwa/model.urdf", [0, 0, 1]) p.loadURDF("cube.urdf", [2, 2, 5]) From 8c76b2ced2cabd990effff4aed86021ea5ed1114 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:16:14 +0530 Subject: [PATCH 051/109] Update load_soft_body.py --- examples/pybullet/examples/load_soft_body.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/load_soft_body.py b/examples/pybullet/examples/load_soft_body.py index 3c55ca2e6..04cccfecc 100644 --- a/examples/pybullet/examples/load_soft_body.py +++ b/examples/pybullet/examples/load_soft_body.py @@ -1,7 +1,11 @@ import pybullet as p from time import sleep +import pybullet_data + physicsClient = p.connect(p.GUI) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setGravity(0, 0, -10) planeId = p.loadURDF("plane.urdf", [0,0,-2]) boxId = p.loadURDF("cube.urdf", [0,3,2],useMaximalCoordinates = True) From cab2d9bb761d543fd745a5939004926e5a0946d5 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:16:19 +0530 Subject: [PATCH 052/109] Update loadingBench.py --- examples/pybullet/examples/loadingBench.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/loadingBench.py b/examples/pybullet/examples/loadingBench.py index fcd886df5..672adbedc 100644 --- a/examples/pybullet/examples/loadingBench.py +++ b/examples/pybullet/examples/loadingBench.py @@ -1,6 +1,9 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.resetSimulation() timinglog = p.startStateLogging(p.STATE_LOGGING_PROFILE_TIMINGS, "loadingBenchVR.json") From ccbffaad144aa6a35468ec47e863a11bcd1d0e16 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:16:36 +0530 Subject: [PATCH 053/109] Update logMinitaur.py --- examples/pybullet/examples/logMinitaur.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/pybullet/examples/logMinitaur.py b/examples/pybullet/examples/logMinitaur.py index 8338862f7..c8418b9ec 100644 --- a/examples/pybullet/examples/logMinitaur.py +++ b/examples/pybullet/examples/logMinitaur.py @@ -1,7 +1,12 @@ import pybullet as p +import pybullet_data + + cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf") quadruped = p.loadURDF("quadruped/quadruped.urdf") From 67d9ce47e7473916d1b4b033c12c27eec7b6d8f9 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:16:51 +0530 Subject: [PATCH 054/109] Update manyspheres.py --- examples/pybullet/examples/manyspheres.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/manyspheres.py b/examples/pybullet/examples/manyspheres.py index 55af537a8..4c6e5197c 100644 --- a/examples/pybullet/examples/manyspheres.py +++ b/examples/pybullet/examples/manyspheres.py @@ -1,10 +1,13 @@ import pybullet as p import time +import pybullet_data + conid = p.connect(p.SHARED_MEMORY) if (conid < 0): p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setInternalSimFlags(0) p.resetSimulation() From 72f4fa0e8d2241537e05bb22ad66c38311a7d224 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:17:07 +0530 Subject: [PATCH 055/109] Update mimicJointConstraint.py --- examples/pybullet/examples/mimicJointConstraint.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/mimicJointConstraint.py b/examples/pybullet/examples/mimicJointConstraint.py index e6c42d6a2..7a54f5c10 100644 --- a/examples/pybullet/examples/mimicJointConstraint.py +++ b/examples/pybullet/examples/mimicJointConstraint.py @@ -3,7 +3,10 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf", 0, 0, -2) wheelA = p.loadURDF("differential/diff_ring.urdf", [0, 0, 0]) for i in range(p.getNumJoints(wheelA)): From 24840ca71abdce37042b9b54ceb25e3a6501d82a Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:23:35 +0530 Subject: [PATCH 056/109] Update minitaur_test.py --- examples/pybullet/examples/minitaur_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/pybullet/examples/minitaur_test.py b/examples/pybullet/examples/minitaur_test.py index 37c2ff37b..6658e204b 100644 --- a/examples/pybullet/examples/minitaur_test.py +++ b/examples/pybullet/examples/minitaur_test.py @@ -9,6 +9,9 @@ from minitaur_evaluate import * import time import math import numpy as np +import pybullet_data + + def main(unused_args): @@ -16,7 +19,7 @@ def main(unused_args): c = p.connect(p.SHARED_MEMORY) if (c < 0): c = p.connect(p.GUI) - + p.setAdditionalSearchPath(pybullet_data.getDataPath()) params = [ 0.1903581461951056, 0.0006732219568880068, 0.05018085615283363, 3.219916795483583, 6.2406418167980595, 4.189869754607539 From 9aba00923acf96599c46fca933324b2814ff9b46 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:23:40 +0530 Subject: [PATCH 057/109] Update motorMaxVelocity.py --- examples/pybullet/examples/motorMaxVelocity.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/motorMaxVelocity.py b/examples/pybullet/examples/motorMaxVelocity.py index 315e30d90..95a0c1e39 100644 --- a/examples/pybullet/examples/motorMaxVelocity.py +++ b/examples/pybullet/examples/motorMaxVelocity.py @@ -1,7 +1,9 @@ import pybullet as p import time +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) cartpole = p.loadURDF("cartpole.urdf") p.setRealTimeSimulation(1) p.setJointMotorControl2(cartpole, From 61c628e8df3a5b849c2e5792116e18b0587af1c5 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:24:04 +0530 Subject: [PATCH 058/109] Update otherPhysicsEngine.py --- examples/pybullet/examples/otherPhysicsEngine.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/otherPhysicsEngine.py b/examples/pybullet/examples/otherPhysicsEngine.py index e12bb45d4..59e0f18d1 100644 --- a/examples/pybullet/examples/otherPhysicsEngine.py +++ b/examples/pybullet/examples/otherPhysicsEngine.py @@ -2,6 +2,7 @@ import pybullet as p import pybullet_data as pd import time import math +import pybullet_data usePhysX = True useMaximalCoordinates = True @@ -11,6 +12,7 @@ if usePhysX: else: p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setPhysicsEngineParameter(fixedTimeStep=1. / 240., numSolverIterations=4, minimumSolverIslandSize=1024) From e29ca91fc0f1180dedd83bcec7950bfa5765cf12 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:24:08 +0530 Subject: [PATCH 059/109] Update pdControl.py --- examples/pybullet/examples/pdControl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/pdControl.py b/examples/pybullet/examples/pdControl.py index ef0718dfc..e9c902e23 100644 --- a/examples/pybullet/examples/pdControl.py +++ b/examples/pybullet/examples/pdControl.py @@ -6,7 +6,10 @@ from pdControllerStable import PDControllerStable import time useMaximalCoordinates = False +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) pole = p.loadURDF("cartpole.urdf", [0, 0, 0], useMaximalCoordinates=useMaximalCoordinates) pole2 = p.loadURDF("cartpole.urdf", [0, 1, 0], useMaximalCoordinates=useMaximalCoordinates) pole3 = p.loadURDF("cartpole.urdf", [0, 2, 0], useMaximalCoordinates=useMaximalCoordinates) From fcbd6d450121f0f24a88c397ba9cc7694f43ff4c Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:24:29 +0530 Subject: [PATCH 060/109] Update pointCloudFromCameraImage.py --- examples/pybullet/examples/pointCloudFromCameraImage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/pointCloudFromCameraImage.py b/examples/pybullet/examples/pointCloudFromCameraImage.py index e7aa33fad..a156090f8 100644 --- a/examples/pybullet/examples/pointCloudFromCameraImage.py +++ b/examples/pybullet/examples/pointCloudFromCameraImage.py @@ -1,8 +1,10 @@ import pybullet as p import math import numpy as np +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) plane = p.loadURDF("plane100.urdf") cube = p.loadURDF("cube.urdf", [0, 0, 1]) From 75bbab6ccbe897679e054a75b7fcbe9dd6aac80f Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:24:31 +0530 Subject: [PATCH 061/109] Update profileTiming.py --- examples/pybullet/examples/profileTiming.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/profileTiming.py b/examples/pybullet/examples/profileTiming.py index 0904a8f52..96c25b300 100644 --- a/examples/pybullet/examples/profileTiming.py +++ b/examples/pybullet/examples/profileTiming.py @@ -2,7 +2,10 @@ import pybullet as p import time #you can visualize the timings using Google Chrome, visit about://tracing #and load the json file +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) t = time.time() + 3.1 From 598bb20674d75fa5b4687853ace500c357556f7b Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:24:47 +0530 Subject: [PATCH 062/109] Update projective_texture.py --- examples/pybullet/examples/projective_texture.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/projective_texture.py b/examples/pybullet/examples/projective_texture.py index 1f38eb000..6116c59b0 100644 --- a/examples/pybullet/examples/projective_texture.py +++ b/examples/pybullet/examples/projective_texture.py @@ -2,9 +2,11 @@ import pybullet as p from time import sleep import matplotlib.pyplot as plt import numpy as np +import pybullet_data physicsClient = p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setGravity(0, 0, 0) bearStartPos1 = [-3.3, 0, 0] bearStartOrientation1 = p.getQuaternionFromEuler([0, 0, 0]) From c702f5ac4aaa7c47ebaaee06679b9ee3d9a6085c Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:25:26 +0530 Subject: [PATCH 063/109] Update quadruped.py --- examples/pybullet/examples/quadruped.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/quadruped.py b/examples/pybullet/examples/quadruped.py index 6d72abb86..356bb777f 100644 --- a/examples/pybullet/examples/quadruped.py +++ b/examples/pybullet/examples/quadruped.py @@ -1,6 +1,9 @@ import pybullet as p import time import math +import pybullet_data + + def drawInertiaBox(parentUid, parentLinkIndex, color): @@ -128,6 +131,7 @@ if (physId < 0): p.connect(p.GUI) #p.resetSimulation() +p.setAdditionalSearchPath(pybullet_data.getDataPath()) angle = 0 # pick in range 0..0.2 radians orn = p.getQuaternionFromEuler([0, angle, 0]) p.loadURDF("plane.urdf", [0, 0, 0], orn) From 405c67ba15e3374602c7032c23ac66a1e4e07831 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:25:42 +0530 Subject: [PATCH 064/109] Update quadruped_playback.py --- examples/pybullet/examples/quadruped_playback.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/quadruped_playback.py b/examples/pybullet/examples/quadruped_playback.py index 544009745..626f29a5f 100644 --- a/examples/pybullet/examples/quadruped_playback.py +++ b/examples/pybullet/examples/quadruped_playback.py @@ -9,6 +9,7 @@ import sys import os, fnmatch import argparse from time import sleep +import pybullet_data def readLogFile(filename, verbose=True): @@ -56,6 +57,7 @@ def readLogFile(filename, verbose=True): clid = p.connect(p.SHARED_MEMORY) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) log = readLogFile("LOG00076.TXT") recordNum = len(log) From c92f7f90082260c9dda0b65aff50c4872a450605 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:26:16 +0530 Subject: [PATCH 065/109] Update quadruped_setup_playback.py --- examples/pybullet/examples/quadruped_setup_playback.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/quadruped_setup_playback.py b/examples/pybullet/examples/quadruped_setup_playback.py index 5db18cb07..f71ff4f19 100644 --- a/examples/pybullet/examples/quadruped_setup_playback.py +++ b/examples/pybullet/examples/quadruped_setup_playback.py @@ -1,5 +1,9 @@ import pybullet as p +import pybullet_data + p.connect(p.SHARED_MEMORY) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) objects = [ p.loadURDF("plane.urdf", 0.000000, 0.000000, -.300000, 0.000000, 0.000000, 0.000000, 1.000000) ] From 7943cd35efc60c41aca9e4216bea7dd4b1786514 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:26:44 +0530 Subject: [PATCH 066/109] Update racecar_differential.py --- examples/pybullet/examples/racecar_differential.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/racecar_differential.py b/examples/pybullet/examples/racecar_differential.py index 1967f3277..abd2b904f 100644 --- a/examples/pybullet/examples/racecar_differential.py +++ b/examples/pybullet/examples/racecar_differential.py @@ -1,10 +1,13 @@ import pybullet as p import time +import pybullet_data + cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.resetSimulation() p.setGravity(0, 0, -10) useRealTimeSim = 1 From 02a804f733e11850f214caf938ebe148efd2d6a9 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:26:49 +0530 Subject: [PATCH 067/109] Update renderPlugin.py --- examples/pybullet/examples/renderPlugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/renderPlugin.py b/examples/pybullet/examples/renderPlugin.py index 1f7a1ebfb..111aef5b3 100644 --- a/examples/pybullet/examples/renderPlugin.py +++ b/examples/pybullet/examples/renderPlugin.py @@ -1,5 +1,8 @@ import pybullet as p +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) plugin = p.loadPlugin("d:/develop/bullet3/bin/pybullet_testplugin_vs2010_x64_debug.dll", "_testPlugin") print("plugin=", plugin) From 1376d9507aa7bbaa51310cf9d97f256794014adb Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:27:33 +0530 Subject: [PATCH 068/109] Update rendertest.py --- examples/pybullet/examples/rendertest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/rendertest.py b/examples/pybullet/examples/rendertest.py index 6e3d14b89..7b196903f 100644 --- a/examples/pybullet/examples/rendertest.py +++ b/examples/pybullet/examples/rendertest.py @@ -10,6 +10,8 @@ import subprocess import numpy as np import pybullet from multiprocessing import Process +import pybullet_data + camTargetPos = [0, 0, 0] cameraUp = [0, 0, 1] @@ -41,6 +43,7 @@ class BulletSim(): print(self.connection_mode, optionstring, *self.argv) cid = pybullet.connect(self.connection_mode, options=optionstring, *self.argv) + p.setAdditionalSearchPath(pybullet_data.getDataPath()) if cid < 0: raise ValueError print("connected") From 668d6a6c049aa3fb9673a737f858da92a98ea585 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:28:07 +0530 Subject: [PATCH 069/109] Update reset_dynamic_info.py --- examples/pybullet/examples/reset_dynamic_info.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/reset_dynamic_info.py b/examples/pybullet/examples/reset_dynamic_info.py index 1092496f8..d42aa558f 100644 --- a/examples/pybullet/examples/reset_dynamic_info.py +++ b/examples/pybullet/examples/reset_dynamic_info.py @@ -2,7 +2,10 @@ import pybullet as p import time import math +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) planeId = p.loadURDF(fileName="plane.urdf", baseOrientation=[0.25882, 0, 0, 0.96593]) p.loadURDF(fileName="cube.urdf", basePosition=[0, 0, 2]) cubeId = p.loadURDF(fileName="cube.urdf", baseOrientation=[0, 0, 0, 1], basePosition=[0, 0, 4]) From 3da0b375ac5688a019c276ff118d4314640531c0 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:28:23 +0530 Subject: [PATCH 070/109] Update restitution.py --- examples/pybullet/examples/restitution.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/restitution.py b/examples/pybullet/examples/restitution.py index dc169fe48..5e84b3b61 100644 --- a/examples/pybullet/examples/restitution.py +++ b/examples/pybullet/examples/restitution.py @@ -3,10 +3,13 @@ import pybullet as p import time +import pybullet_data cid = p.connect(p.SHARED_MEMORY) if (cid < 0): cid = p.connect(p.GUI) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) restitutionId = p.addUserDebugParameter("restitution", 0, 1, 1) restitutionVelocityThresholdId = p.addUserDebugParameter("res. vel. threshold", 0, 3, 0.2) From 23e06e5420d2d0d360492c51e385d6c77f83555f Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:28:31 +0530 Subject: [PATCH 071/109] Update robotcontrol.py --- examples/pybullet/examples/robotcontrol.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/pybullet/examples/robotcontrol.py b/examples/pybullet/examples/robotcontrol.py index 7633baf18..9bc917c30 100644 --- a/examples/pybullet/examples/robotcontrol.py +++ b/examples/pybullet/examples/robotcontrol.py @@ -1,5 +1,8 @@ import pybullet as p -p.connect(p.GUI) #or p.SHARED_MEMORY or p.DIRECT +import pybullet_data + +p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf") p.setGravity(0, 0, -10) From 5cf984b0b074030d3c7b3dec0352a03ddbebe241 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:28:46 +0530 Subject: [PATCH 072/109] Update rollPitchYaw.py --- examples/pybullet/examples/rollPitchYaw.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/rollPitchYaw.py b/examples/pybullet/examples/rollPitchYaw.py index 5ab2793ae..e5dac10ba 100644 --- a/examples/pybullet/examples/rollPitchYaw.py +++ b/examples/pybullet/examples/rollPitchYaw.py @@ -1,9 +1,12 @@ import pybullet as p import time +import pybullet_data cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) q = p.loadURDF("quadruped/quadruped.urdf", useFixedBase=True) rollId = p.addUserDebugParameter("roll", -1.5, 1.5, 0) pitchId = p.addUserDebugParameter("pitch", -1.5, 1.5, 0) From 4204f36ca53b159943a39449b46167f8b823c017 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:28:50 +0530 Subject: [PATCH 073/109] Update rotationalFriction.py --- examples/pybullet/examples/rotationalFriction.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/rotationalFriction.py b/examples/pybullet/examples/rotationalFriction.py index f38cba38c..b8f524cb2 100644 --- a/examples/pybullet/examples/rotationalFriction.py +++ b/examples/pybullet/examples/rotationalFriction.py @@ -3,7 +3,10 @@ import pybullet as p import pybullet_data as pd useMaximalCoordinatesA = True useMaximalCoordinatesB = True +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setAdditionalSearchPath(pd.getDataPath()) cube=p.loadURDF("cube_rotate.urdf",useMaximalCoordinates=useMaximalCoordinatesA) p.loadURDF("sphere2.urdf",[0,0,2],useMaximalCoordinates=useMaximalCoordinatesB) From 95cc69c2e7d354293582d588ac8b0c96b89a3e32 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:28:57 +0530 Subject: [PATCH 074/109] Update satCollision.py --- examples/pybullet/examples/satCollision.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/satCollision.py b/examples/pybullet/examples/satCollision.py index c1da8d1b4..af68e143f 100644 --- a/examples/pybullet/examples/satCollision.py +++ b/examples/pybullet/examples/satCollision.py @@ -1,7 +1,10 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setGravity(0, 0, -10) p.setPhysicsEngineParameter(enableSAT=1) p.loadURDF("cube_concave.urdf", [0, 0, -25], From 8ac528d477327bfc0c6397ca9496431570d1b3b3 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:29:22 +0530 Subject: [PATCH 075/109] Update saveRestoreState.py --- examples/pybullet/examples/saveRestoreState.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/saveRestoreState.py b/examples/pybullet/examples/saveRestoreState.py index 7bce8313f..f9e12d4a6 100644 --- a/examples/pybullet/examples/saveRestoreState.py +++ b/examples/pybullet/examples/saveRestoreState.py @@ -1,6 +1,8 @@ import pybullet as p import math, time import difflib, sys +import pybullet_data + numSteps = 500 numSteps2 = 30 @@ -8,6 +10,7 @@ p.connect(p.GUI, options="--width=1024 --height=768") numObjects = 50 verbose = 0 +p.setAdditionalSearchPath(pybullet_data.getDataPath()) logId = p.startStateLogging(p.STATE_LOGGING_PROFILE_TIMINGS, "saveRestoreTimings.log") From 74f1cc43e48a64f26f37cc4bcbcb82942c660ffc Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:29:35 +0530 Subject: [PATCH 076/109] Update saveWorld.py --- examples/pybullet/examples/saveWorld.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/saveWorld.py b/examples/pybullet/examples/saveWorld.py index f6f6278ed..e4026770f 100644 --- a/examples/pybullet/examples/saveWorld.py +++ b/examples/pybullet/examples/saveWorld.py @@ -1,7 +1,10 @@ import pybullet as p import time +import pybullet_data p.connect(p.SHARED_MEMORY) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) timestr = time.strftime("%Y%m%d-%H%M%S") filename = "saveWorld" + timestr + ".py" p.saveWorld(filename) From 4f076c023019a6f660921e64826e118f37975dc9 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:29:40 +0530 Subject: [PATCH 077/109] Update sceneAabb.py --- examples/pybullet/examples/sceneAabb.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/sceneAabb.py b/examples/pybullet/examples/sceneAabb.py index aa11ff288..260fa4f64 100644 --- a/examples/pybullet/examples/sceneAabb.py +++ b/examples/pybullet/examples/sceneAabb.py @@ -2,7 +2,10 @@ import pybullet as p import time import numpy as np +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf") p.loadURDF("sphere2.urdf",[0,0,2]) From 98397463c8f34f528e5ce2f7956d26dcfb2f18c7 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:29:46 +0530 Subject: [PATCH 078/109] Update segmask_linkindex.py --- examples/pybullet/examples/segmask_linkindex.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/segmask_linkindex.py b/examples/pybullet/examples/segmask_linkindex.py index a32fb037f..6733ce3e1 100644 --- a/examples/pybullet/examples/segmask_linkindex.py +++ b/examples/pybullet/examples/segmask_linkindex.py @@ -1,5 +1,8 @@ import pybullet as p +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) r2d2 = p.loadURDF("r2d2.urdf", [0, 0, 1]) for l in range(p.getNumJoints(r2d2)): print(p.getJointInfo(r2d2, l)) From 23a3fd08e8939ddfdbc51a66f13832001dbb0c16 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:31:23 +0530 Subject: [PATCH 079/109] Update shiftCenterOfMass.py --- examples/pybullet/examples/shiftCenterOfMass.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/shiftCenterOfMass.py b/examples/pybullet/examples/shiftCenterOfMass.py index c0a3f1911..95a507d91 100644 --- a/examples/pybullet/examples/shiftCenterOfMass.py +++ b/examples/pybullet/examples/shiftCenterOfMass.py @@ -2,8 +2,11 @@ import pybullet as p import time import pybullet_data +import pybullet_data + p.connect(p.GUI) p.setAdditionalSearchPath(pybullet_data.getDataPath()) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf") p.setGravity(0, 0, -10) From 6233c0781716ff5eec2000c28e35e1dcc0bdadeb Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:31:27 +0530 Subject: [PATCH 080/109] Update signedDistanceField.py --- examples/pybullet/examples/signedDistanceField.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/signedDistanceField.py b/examples/pybullet/examples/signedDistanceField.py index c3aac70f9..e1f94fc00 100644 --- a/examples/pybullet/examples/signedDistanceField.py +++ b/examples/pybullet/examples/signedDistanceField.py @@ -1,7 +1,10 @@ import pybullet as p import pybullet import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("toys/concave_box.urdf") p.setGravity(0, 0, -10) for i in range(10): From df81157f3ca352b01b9a74945ee2fe2d66366136 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:31:31 +0530 Subject: [PATCH 081/109] Update sleeping.py --- examples/pybullet/examples/sleeping.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/sleeping.py b/examples/pybullet/examples/sleeping.py index e9ca7f404..fa4ef72c1 100644 --- a/examples/pybullet/examples/sleeping.py +++ b/examples/pybullet/examples/sleeping.py @@ -4,7 +4,10 @@ useMaximalCoordinates = False flags = p.URDF_ENABLE_SLEEPING +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.configureDebugVisualizer(p.COV_ENABLE_RENDERING, 0) p.loadURDF("plane100.urdf", flags=flags, useMaximalCoordinates=useMaximalCoordinates) From ae7e441afb6913534004789d565d33420bc951f4 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:31:36 +0530 Subject: [PATCH 082/109] Update snake.py --- examples/pybullet/examples/snake.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/snake.py b/examples/pybullet/examples/snake.py index 1384a3f53..d70a50e0a 100644 --- a/examples/pybullet/examples/snake.py +++ b/examples/pybullet/examples/snake.py @@ -4,8 +4,10 @@ import math # This simple snake logic is from some 15 year old Havok C++ demo # Thanks to Michael Ewert! +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) plane = p.createCollisionShape(p.GEOM_PLANE) p.createMultiBody(0, plane) From e9a892ce50d19133ac337b54b6a75d1375867fcb Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:32:00 +0530 Subject: [PATCH 083/109] Update switchConstraintSolver.py --- examples/pybullet/examples/switchConstraintSolver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/switchConstraintSolver.py b/examples/pybullet/examples/switchConstraintSolver.py index 1c44391f7..b526789cc 100644 --- a/examples/pybullet/examples/switchConstraintSolver.py +++ b/examples/pybullet/examples/switchConstraintSolver.py @@ -1,7 +1,9 @@ import pybullet as p import time +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) #p.setPhysicsEngineParameter(constraintSolverType=p.CONSTRAINT_SOLVER_LCP_PGS, globalCFM = 0.0001) p.setPhysicsEngineParameter(constraintSolverType=p.CONSTRAINT_SOLVER_LCP_DANTZIG, globalCFM=0.000001) From c8960af14d260c81a8c618eb7867277ba46b8b63 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:32:31 +0530 Subject: [PATCH 084/109] Update testPlugin.py --- examples/pybullet/examples/testPlugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/testPlugin.py b/examples/pybullet/examples/testPlugin.py index c3abe25ff..ed1715c23 100644 --- a/examples/pybullet/examples/testPlugin.py +++ b/examples/pybullet/examples/testPlugin.py @@ -1,5 +1,8 @@ import pybullet as p +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) plugin = p.loadPlugin("D:/develop/bullet3/bin/pybullet_testplugin_vs2010_x64_debug.dll", "_testPlugin") print("plugin=", plugin) From db1bdae32b0dfc361d0f68baa8be4f7c25f08484 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:32:59 +0530 Subject: [PATCH 085/109] Update test_inertia.py --- examples/pybullet/examples/test_inertia.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/test_inertia.py b/examples/pybullet/examples/test_inertia.py index a290f3bac..d30827db7 100644 --- a/examples/pybullet/examples/test_inertia.py +++ b/examples/pybullet/examples/test_inertia.py @@ -1,8 +1,11 @@ import pybullet as p from time import sleep +import pybullet_data + physicsClient = p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) useDeformable = True if useDeformable: p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) From 93f4accd3bb485ffe1146da400b8aab6dec21792 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:33:17 +0530 Subject: [PATCH 086/109] Update testrender.py --- examples/pybullet/examples/testrender.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/testrender.py b/examples/pybullet/examples/testrender.py index 0332f2a6c..cbcda6e5b 100644 --- a/examples/pybullet/examples/testrender.py +++ b/examples/pybullet/examples/testrender.py @@ -11,9 +11,12 @@ img = [[1, 2, 3] * 50] * 100 #np.random.rand(200, 320) #img = [tandard_normal((50,100)) image = plt.imshow(img, interpolation='none', animated=True, label="blah") ax = plt.gca() +import pybullet_data pybullet.connect(pybullet.DIRECT) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + #pybullet.loadPlugin("eglRendererPlugin") pybullet.loadURDF("plane.urdf", [0, 0, -1]) pybullet.loadURDF("r2d2.urdf") From 0215969ea2154ead740c9c242acec22f42fd973c Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:33:46 +0530 Subject: [PATCH 087/109] Update testrender_egl.py --- examples/pybullet/examples/testrender_egl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/testrender_egl.py b/examples/pybullet/examples/testrender_egl.py index 3c9727b1a..6aca0eca8 100644 --- a/examples/pybullet/examples/testrender_egl.py +++ b/examples/pybullet/examples/testrender_egl.py @@ -17,9 +17,13 @@ img = np.random.rand(200, 320) #img = [tandard_normal((50,100)) image = plt.imshow(img, interpolation='none', animated=True, label="blah") ax = plt.gca() +import pybullet_data + pybullet.connect(pybullet.DIRECT) +pybullet.setAdditionalSearchPath(pybullet_data.getDataPath()) + egl = pkgutil.get_loader('eglRenderer') if (egl): pybullet.loadPlugin(egl.get_filename(), "_eglRendererPlugin") From 64fe29987ea53df5038b12cbc00b2cc509bf1d82 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:34:12 +0530 Subject: [PATCH 088/109] Update testrender_np.py --- examples/pybullet/examples/testrender_np.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/testrender_np.py b/examples/pybullet/examples/testrender_np.py index d32edd09e..2c313a457 100644 --- a/examples/pybullet/examples/testrender_np.py +++ b/examples/pybullet/examples/testrender_np.py @@ -6,6 +6,7 @@ import numpy as np import matplotlib.pyplot as plt import pybullet import time +import pybullet_data plt.ion() @@ -16,6 +17,8 @@ ax = plt.gca() #pybullet.connect(pybullet.GUI) pybullet.connect(pybullet.DIRECT) + +pybullet.setAdditionalSearchPath(pybullet_data.getDataPath()) pybullet.loadURDF("plane.urdf", [0, 0, -1]) pybullet.loadURDF("r2d2.urdf") From 7c0cfa24cfcfb64c7617a213531661de3da00c57 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:34:19 +0530 Subject: [PATCH 089/109] Update transparent.py --- examples/pybullet/examples/transparent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/transparent.py b/examples/pybullet/examples/transparent.py index 92a95d44a..8a4831002 100644 --- a/examples/pybullet/examples/transparent.py +++ b/examples/pybullet/examples/transparent.py @@ -1,6 +1,9 @@ import pybullet as p import time +import pybullet_data + p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("plane.urdf") sphereUid = p.loadURDF("sphere_transparent.urdf", [0, 0, 2]) From ccf3426748a4758a42b9c15adf2a4727c2f69682 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:34:34 +0530 Subject: [PATCH 090/109] Update urdfEditor.py --- examples/pybullet/examples/urdfEditor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/urdfEditor.py b/examples/pybullet/examples/urdfEditor.py index 0b5404318..9d29dd010 100644 --- a/examples/pybullet/examples/urdfEditor.py +++ b/examples/pybullet/examples/urdfEditor.py @@ -1,6 +1,8 @@ import pybullet as p import time from pybullet_utils import urdfEditor +import pybullet_data + ########################################## org2 = p.connect(p.DIRECT) @@ -10,6 +12,8 @@ if (org < 0): gui = p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + p.resetSimulation(physicsClientId=org) #door.urdf, hinge.urdf, duck_vhacd.urdf, r2d2.urdf, quadruped/quadruped.urdf From ac3357ee45faac397359afbc77a66d7ecaab1c20 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:35:00 +0530 Subject: [PATCH 091/109] Update vhacd.py --- examples/pybullet/examples/vhacd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/vhacd.py b/examples/pybullet/examples/vhacd.py index 544590d98..8b4bcf77d 100644 --- a/examples/pybullet/examples/vhacd.py +++ b/examples/pybullet/examples/vhacd.py @@ -2,7 +2,10 @@ import pybullet as p import pybullet_data as pd import os +import pybullet_data + p.connect(p.DIRECT) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) name_in = os.path.join(pd.getDataPath(), "duck.obj") name_out = "duck_vhacd.obj" name_log = "log.txt" From fcc862dc34b03f78b5a09e217b7c74149d7b66ec Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:35:18 +0530 Subject: [PATCH 092/109] Update video_sync_mp4.py --- examples/pybullet/examples/video_sync_mp4.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/video_sync_mp4.py b/examples/pybullet/examples/video_sync_mp4.py index ba8956bec..3859de538 100644 --- a/examples/pybullet/examples/video_sync_mp4.py +++ b/examples/pybullet/examples/video_sync_mp4.py @@ -1,8 +1,11 @@ import pybullet as p import time +import pybullet_data #by default, PyBullet runs at 240Hz p.connect(p.GUI, options="--mp4=\"test.mp4\" --mp4fps=240") + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.configureDebugVisualizer(p.COV_ENABLE_SINGLE_STEP_RENDERING,1) p.loadURDF("plane.urdf") From ab48affbd007b53b23b3bdb3d8fa8f0540cfe274 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:35:43 +0530 Subject: [PATCH 093/109] Update vrEvent.py --- examples/pybullet/examples/vrEvent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/vrEvent.py b/examples/pybullet/examples/vrEvent.py index 562b37cc0..068b02552 100644 --- a/examples/pybullet/examples/vrEvent.py +++ b/examples/pybullet/examples/vrEvent.py @@ -4,6 +4,7 @@ # Line width can be changed import pybullet as p +import pybullet_data CONTROLLER_ID = 0 POSITION = 1 @@ -13,11 +14,14 @@ BUTTONS = 6 ANALOG_AXIS = 8 #assume that the VR physics server is already started before + c = p.connect(p.SHARED_MEMORY) print(c) if (c < 0): p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + p.setInternalSimFlags(0) #don't load default robot assets etc p.resetSimulation() p.loadURDF("plane.urdf") From 058128e8bc1300fdd04ed2956aadfba855852b34 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:36:02 +0530 Subject: [PATCH 094/109] Update vr_kitchen_setup_vrSyncPython.py --- examples/pybullet/examples/vr_kitchen_setup_vrSyncPython.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/vr_kitchen_setup_vrSyncPython.py b/examples/pybullet/examples/vr_kitchen_setup_vrSyncPython.py index a977a6df3..5ceb11079 100644 --- a/examples/pybullet/examples/vr_kitchen_setup_vrSyncPython.py +++ b/examples/pybullet/examples/vr_kitchen_setup_vrSyncPython.py @@ -1,5 +1,7 @@ import pybullet as p import time +import pybullet_data + #p.connect(p.UDP,"192.168.86.100") cid = p.connect(p.SHARED_MEMORY) @@ -7,6 +9,8 @@ if (cid < 0): p.connect(p.GUI) p.resetSimulation() +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + meshScale = [.1, .1, .01] shift = [0, 0, 0] From ae5a4ae7ad941d25b1d9e18226b89525bcd686b6 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:36:15 +0530 Subject: [PATCH 095/109] Update vr_kuka_control.py --- examples/pybullet/examples/vr_kuka_control.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/vr_kuka_control.py b/examples/pybullet/examples/vr_kuka_control.py index 14e67e276..203c9958c 100644 --- a/examples/pybullet/examples/vr_kuka_control.py +++ b/examples/pybullet/examples/vr_kuka_control.py @@ -3,9 +3,13 @@ import pybullet as p import math # import numpy as np +import pybullet_data + p.connect(p.SHARED_MEMORY) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + kuka = 3 kuka_gripper = 7 POSITION = 1 From 86fb6ca350be27466f8a581ce77bfd44b06a5ff7 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:36:31 +0530 Subject: [PATCH 096/109] Update vr_kuka_pr2_move.py --- examples/pybullet/examples/vr_kuka_pr2_move.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/vr_kuka_pr2_move.py b/examples/pybullet/examples/vr_kuka_pr2_move.py index 1af2bd265..c671097ba 100644 --- a/examples/pybullet/examples/vr_kuka_pr2_move.py +++ b/examples/pybullet/examples/vr_kuka_pr2_move.py @@ -1,8 +1,12 @@ #python script with hardcoded values, assumes that you run the vr_kuka_setup.py first import pybullet as p +import pybullet_data + p.connect(p.SHARED_MEMORY) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) + pr2_gripper = 2 pr2_cid = 1 From e515c3d7ddac343da3e4865171e9f20e2d6e9386 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:36:46 +0530 Subject: [PATCH 097/109] Update vr_kuka_setup.py --- examples/pybullet/examples/vr_kuka_setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/vr_kuka_setup.py b/examples/pybullet/examples/vr_kuka_setup.py index f6a90bbf7..da9a795c7 100644 --- a/examples/pybullet/examples/vr_kuka_setup.py +++ b/examples/pybullet/examples/vr_kuka_setup.py @@ -1,8 +1,11 @@ import pybullet as p import time #p.connect(p.UDP,"192.168.86.100") +import pybullet_data cid = p.connect(p.SHARED_MEMORY) + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) if (cid < 0): p.connect(p.GUI) p.resetSimulation() From d73d42dc8483177e455e26fde63c90daddf786f9 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:37:02 +0530 Subject: [PATCH 098/109] Update vr_kuka_setup_vrSyncPlugin.py --- examples/pybullet/examples/vr_kuka_setup_vrSyncPlugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/vr_kuka_setup_vrSyncPlugin.py b/examples/pybullet/examples/vr_kuka_setup_vrSyncPlugin.py index 17b6637d8..2d3ebaf0b 100644 --- a/examples/pybullet/examples/vr_kuka_setup_vrSyncPlugin.py +++ b/examples/pybullet/examples/vr_kuka_setup_vrSyncPlugin.py @@ -1,11 +1,15 @@ import pybullet as p import time #p.connect(p.UDP,"192.168.86.100") +import pybullet_data + cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) p.resetSimulation() + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) #disable rendering during loading makes it much faster p.configureDebugVisualizer(p.COV_ENABLE_RENDERING, 0) objects = [ From 0f6a605c3893f412a6a85e750e350482dd66bb7b Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:37:39 +0530 Subject: [PATCH 099/109] Update vr_kuka_setup_vrSyncPython.py --- examples/pybullet/examples/vr_kuka_setup_vrSyncPython.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/vr_kuka_setup_vrSyncPython.py b/examples/pybullet/examples/vr_kuka_setup_vrSyncPython.py index 989df74d2..ef9ac0dae 100644 --- a/examples/pybullet/examples/vr_kuka_setup_vrSyncPython.py +++ b/examples/pybullet/examples/vr_kuka_setup_vrSyncPython.py @@ -1,11 +1,14 @@ import pybullet as p import time #p.connect(p.UDP,"192.168.86.100") +import pybullet_data cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) p.resetSimulation() + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) #disable rendering during loading makes it much faster p.configureDebugVisualizer(p.COV_ENABLE_RENDERING, 0) objects = [ From f1fa54ebe38bd9e9bc3122129c01303be16aad70 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:37:55 +0530 Subject: [PATCH 100/109] Update vr_racecar_differential.py --- examples/pybullet/examples/vr_racecar_differential.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/vr_racecar_differential.py b/examples/pybullet/examples/vr_racecar_differential.py index c664967f0..6a8a64545 100644 --- a/examples/pybullet/examples/vr_racecar_differential.py +++ b/examples/pybullet/examples/vr_racecar_differential.py @@ -4,11 +4,13 @@ CONTROLLER_ID = 0 POSITION = 1 ORIENTATION = 2 BUTTONS = 6 +import pybullet_data cid = p.connect(p.SHARED_MEMORY) if (cid < 0): p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.resetSimulation() p.setGravity(0, 0, -10) useRealTimeSim = 1 From 9c773edd0e9b09b8e9c5257f648cdf40839e78dc Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:38:09 +0530 Subject: [PATCH 101/109] Update vrhand.py --- examples/pybullet/examples/vrhand.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/vrhand.py b/examples/pybullet/examples/vrhand.py index 298957e71..3fc0981f3 100644 --- a/examples/pybullet/examples/vrhand.py +++ b/examples/pybullet/examples/vrhand.py @@ -8,12 +8,15 @@ import serial import time import pybullet as p +import pybullet_data #first try to connect to shared memory (VR), if it fails use local GUI c = p.connect(p.SHARED_MEMORY) if (c < 0): c = p.connect(p.GUI) #p.resetSimulation() + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setGravity(0, 0, -10) print(c) if (c < 0): From 74977abdceef89abc865ddf17c7269aa8bd5c782 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:38:36 +0530 Subject: [PATCH 102/109] Update vrhand_vive_tracker.py --- examples/pybullet/examples/vrhand_vive_tracker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/vrhand_vive_tracker.py b/examples/pybullet/examples/vrhand_vive_tracker.py index 9fc3c3988..de382d7f9 100644 --- a/examples/pybullet/examples/vrhand_vive_tracker.py +++ b/examples/pybullet/examples/vrhand_vive_tracker.py @@ -8,12 +8,14 @@ import serial import time import pybullet as p +import pybullet_data #first try to connect to shared memory (VR), if it fails use local GUI c = p.connect(p.SHARED_MEMORY) if (c < 0): c = p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setInternalSimFlags(0) #don't load default robot assets etc p.resetSimulation() From 6e4af46a1bef602165ad71b691d71745441892a8 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:38:55 +0530 Subject: [PATCH 103/109] Update vrminitaur.py --- examples/pybullet/examples/vrminitaur.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pybullet/examples/vrminitaur.py b/examples/pybullet/examples/vrminitaur.py index 4039c80d5..7966900e8 100644 --- a/examples/pybullet/examples/vrminitaur.py +++ b/examples/pybullet/examples/vrminitaur.py @@ -2,12 +2,16 @@ import time import pybullet as p +import pybullet_data + #first try to connect to shared memory (VR), if it fails use local GUI c = p.connect(p.SHARED_MEMORY) if (c < 0): c = p.connect(p.GUI) p.resetSimulation() + +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setGravity(0, 0, 0) print(c) if (c < 0): From 026149471651e6ec373f29ab72aed950d3749f5f Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:39:14 +0530 Subject: [PATCH 104/109] Update vrtracker.py --- examples/pybullet/examples/vrtracker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/pybullet/examples/vrtracker.py b/examples/pybullet/examples/vrtracker.py index 500e36947..745caffeb 100644 --- a/examples/pybullet/examples/vrtracker.py +++ b/examples/pybullet/examples/vrtracker.py @@ -4,6 +4,8 @@ # Line width can be changed import pybullet as p +import pybullet_data + CONTROLLER_ID = 0 POSITION = 1 @@ -16,6 +18,7 @@ print(c) if (c < 0): p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setInternalSimFlags(0) #don't load default robot assets etc p.resetSimulation() p.loadURDF("plane.urdf") From 7a2732d92b199390e8044a1ffce2ca7578dd12e7 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:39:21 +0530 Subject: [PATCH 105/109] Update widows.py --- examples/pybullet/examples/widows.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pybullet/examples/widows.py b/examples/pybullet/examples/widows.py index 9ecc5d256..226c7f6b5 100644 --- a/examples/pybullet/examples/widows.py +++ b/examples/pybullet/examples/widows.py @@ -1,7 +1,9 @@ import pybullet as p import time +import pybullet_data p.connect(p.GUI) +p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF("table/table.urdf", 0.5000000, 0.00000, -.820000, 0.000000, 0.000000, 0.0, 1.0) p.setGravity(0, 0, -10) arm = p.loadURDF("widowx/widowx.urdf", useFixedBase=True) From ae905d7bbb172b7c65da06accdd7959bb4136af6 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Thu, 23 Apr 2020 23:42:58 +0530 Subject: [PATCH 106/109] Update rendertest.py --- examples/pybullet/examples/rendertest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pybullet/examples/rendertest.py b/examples/pybullet/examples/rendertest.py index 7b196903f..e3fcd2fca 100644 --- a/examples/pybullet/examples/rendertest.py +++ b/examples/pybullet/examples/rendertest.py @@ -43,7 +43,7 @@ class BulletSim(): print(self.connection_mode, optionstring, *self.argv) cid = pybullet.connect(self.connection_mode, options=optionstring, *self.argv) - p.setAdditionalSearchPath(pybullet_data.getDataPath()) + pybullet.setAdditionalSearchPath(pybullet_data.getDataPath()) if cid < 0: raise ValueError print("connected") From 4434a091c0512af57d4b6c93b55136d56b921d5f Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Fri, 24 Apr 2020 00:07:44 +0530 Subject: [PATCH 107/109] Update eglRenderTest.py --- examples/pybullet/examples/eglRenderTest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pybullet/examples/eglRenderTest.py b/examples/pybullet/examples/eglRenderTest.py index 9270cdbbb..916467c2d 100644 --- a/examples/pybullet/examples/eglRenderTest.py +++ b/examples/pybullet/examples/eglRenderTest.py @@ -4,7 +4,7 @@ import pkgutil egl = pkgutil.get_loader('eglRenderer') import pybullet_data -p.connect(p.GUI) +p.connect(p.DIRECT) p.setAdditionalSearchPath(pybullet_data.getDataPath()) plugin = p.loadPlugin(egl.get_filename(), "_eglRendererPlugin") print("plugin=", plugin) From cc4963258946499eab5f0bbbd01d65743ebecb84 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Fri, 24 Apr 2020 00:10:23 +0530 Subject: [PATCH 108/109] Update eglRenderTest.py --- examples/pybullet/examples/eglRenderTest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pybullet/examples/eglRenderTest.py b/examples/pybullet/examples/eglRenderTest.py index 916467c2d..9270cdbbb 100644 --- a/examples/pybullet/examples/eglRenderTest.py +++ b/examples/pybullet/examples/eglRenderTest.py @@ -4,7 +4,7 @@ import pkgutil egl = pkgutil.get_loader('eglRenderer') import pybullet_data -p.connect(p.DIRECT) +p.connect(p.GUI) p.setAdditionalSearchPath(pybullet_data.getDataPath()) plugin = p.loadPlugin(egl.get_filename(), "_eglRendererPlugin") print("plugin=", plugin) From 011a4cc91ed02c8023fb0f013510887446899632 Mon Sep 17 00:00:00 2001 From: NiranthS <44475481+NiranthS@users.noreply.github.com> Date: Fri, 24 Apr 2020 00:10:38 +0530 Subject: [PATCH 109/109] Update eglRenderTest.py --- examples/pybullet/examples/eglRenderTest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pybullet/examples/eglRenderTest.py b/examples/pybullet/examples/eglRenderTest.py index 9270cdbbb..916467c2d 100644 --- a/examples/pybullet/examples/eglRenderTest.py +++ b/examples/pybullet/examples/eglRenderTest.py @@ -4,7 +4,7 @@ import pkgutil egl = pkgutil.get_loader('eglRenderer') import pybullet_data -p.connect(p.GUI) +p.connect(p.DIRECT) p.setAdditionalSearchPath(pybullet_data.getDataPath()) plugin = p.loadPlugin(egl.get_filename(), "_eglRendererPlugin") print("plugin=", plugin)