diff options
author | erwincoumans <erwin.coumans@gmail.com> | 2020-08-07 09:29:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 09:29:39 -0700 |
commit | 2bc3d87d8da7fce18e77fd0f4df8c2e43c31c3d8 (patch) | |
tree | 23cad6722b3933a80fc5c728836d250095bb9305 | |
parent | 370b2f72fff967a7ff06786eef78459e21c9f822 (diff) | |
download | bullet3-2bc3d87d8da7fce18e77fd0f4df8c2e43c31c3d8.tar.gz |
Delete constraint.py
-rw-r--r-- | examples/pybullet/examples/constraint.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/examples/pybullet/examples/constraint.py b/examples/pybullet/examples/constraint.py deleted file mode 100644 index 9ba70028e..000000000 --- a/examples/pybullet/examples/constraint.py +++ /dev/null @@ -1,39 +0,0 @@ -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) -cubeId2 = p.loadURDF("cube_small.urdf", 0, 0, 1) - -p.setGravity(0, 0, -10) -p.setRealTimeSimulation(1) - -cid = p.createConstraint(cubeId, -1, -1, -1, p.JOINT_FIXED, [0, 0, 0], [0, 0, 0], [0, 0, 1]) -cid2 = p.createConstraint(cubeId2, -1, cubeId, -1, p.JOINT_FIXED, [0, 0, 0], [0, 0, 0], [0, 0, 1]) - -#cid2 = p.createConstraint(base_1, -1, base_2, 0, p.JOINT_FIXED, [0, 0, 0], [0, 0, 2], [0, 0, 0]) - - -print(cid) -print(p.getConstraintUniqueId(0)) -prev = [0, 0, 1] -a = -math.pi -while 1: - a = a + 0.01 - if (a > math.pi): - a = -math.pi - time.sleep(.01) - p.setGravity(0, 0, -10) - pivot = [a, 0, 1] - pivot2 = [-a, 0, 1] - orn = p.getQuaternionFromEuler([a, 0, 0]) - p.changeConstraint(cid, pivot, jointChildFrameOrientation=orn, maxForce=50) - #p.changeConstraint(cid2, pivot2, jointChildFrameOrientation=orn, maxForce=50) - - -p.removeConstraint(cid) |