From b4b93573fc8bdd6b83adf51eed28b27c027da474 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Mon, 14 Nov 2016 17:02:29 -0800 Subject: [PATCH] tweak quadruped.py script a little bit --- examples/pybullet/quadruped.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/pybullet/quadruped.py b/examples/pybullet/quadruped.py index a1062f3eb..a78d7ed40 100644 --- a/examples/pybullet/quadruped.py +++ b/examples/pybullet/quadruped.py @@ -1,4 +1,6 @@ import pybullet as p +import time + p.connect(p.GUI) p.loadURDF("plane.urdf") p.loadURDF("quadruped/quadruped.urdf",0,0,0.2) @@ -32,4 +34,9 @@ p.resetJointState(1,21,-1.57) p.resetJointState(1,23,2.2) p.createConstraint(1,20,1,23,3,[0,0,0],[0,-0.01,0.2],[0,0.015,0.2]) - \ No newline at end of file +p.setGravity(0,0,-10) +t_end = time.time() + 120 +i=0 +while time.time() < t_end: + i = p.getNumJoints(0) + p.stepSimulation()