From 0e12277cfb888952bfcfc7509ed92ac2a8e73847 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Thu, 11 May 2017 22:26:49 -0700 Subject: [PATCH 1/2] Update humanoid_running.py disable sleep and use GUI mode by default --- examples/pybullet/tensorflow/humanoid_running.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pybullet/tensorflow/humanoid_running.py b/examples/pybullet/tensorflow/humanoid_running.py index f4e9f327d..579ac2cab 100644 --- a/examples/pybullet/tensorflow/humanoid_running.py +++ b/examples/pybullet/tensorflow/humanoid_running.py @@ -4,7 +4,7 @@ import numpy as np import pybullet as p import time -p.connect(p.SHARED_MEMORY) #GUI is slower, but shows the running gait +p.connect(p.GUI) #GUI is slower, but shows the running gait p.setGravity(0,0,-9.8) p.setPhysicsEngineParameter(fixedTimeStep=1.0/60., numSolverIterations=5, numSubSteps=2) #this mp4 recording requires ffmpeg installed @@ -186,7 +186,7 @@ def demo_run(): p.setJointMotorControlArray(human2, motors,controlMode=p.TORQUE_CONTROL, forces=forces) p.stepSimulation() - time.sleep(0.01) + #time.sleep(0.01) distance=5 yaw = 0 humanPos, humanOrn = p.getBasePositionAndOrientation(human) From ac7518d24bae6954ccfaf069d8977545472e1506 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Thu, 11 May 2017 22:51:50 -0700 Subject: [PATCH 2/2] Update humanoid_running.py remove obsolete fps comment, runs at > 1000FPS on my laptop --- examples/pybullet/tensorflow/humanoid_running.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/examples/pybullet/tensorflow/humanoid_running.py b/examples/pybullet/tensorflow/humanoid_running.py index 579ac2cab..d54d08d44 100644 --- a/examples/pybullet/tensorflow/humanoid_running.py +++ b/examples/pybullet/tensorflow/humanoid_running.py @@ -9,10 +9,6 @@ p.setGravity(0,0,-9.8) p.setPhysicsEngineParameter(fixedTimeStep=1.0/60., numSolverIterations=5, numSubSteps=2) #this mp4 recording requires ffmpeg installed #mp4log = p.startStateLogging(p.STATE_LOGGING_VIDEO_MP4,"humanoid.mp4") -# numSubSteps: -# 1 falls often at 300 fps -# 2 works fine at 300 fps -# 11 not that slower at 180 fps plane, human1 = p.loadMJCF("mjcf/humanoid_symmetric.xml",flags = p.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS)