diff --git a/examples/pybullet/gym/pybullet_data/data/policies/humanoid3d/humanoid3d_backflip.ckpt.data-00000-of-00001 b/examples/pybullet/gym/pybullet_data/data/policies/humanoid3d/humanoid3d_backflip.ckpt.data-00000-of-00001 index f7c81535f..1057a5393 100644 Binary files a/examples/pybullet/gym/pybullet_data/data/policies/humanoid3d/humanoid3d_backflip.ckpt.data-00000-of-00001 and b/examples/pybullet/gym/pybullet_data/data/policies/humanoid3d/humanoid3d_backflip.ckpt.data-00000-of-00001 differ diff --git a/examples/pybullet/gym/pybullet_data/data/policies/humanoid3d/humanoid3d_backflip.ckpt.index b/examples/pybullet/gym/pybullet_data/data/policies/humanoid3d/humanoid3d_backflip.ckpt.index index bba79f10d..e682c4897 100644 Binary files a/examples/pybullet/gym/pybullet_data/data/policies/humanoid3d/humanoid3d_backflip.ckpt.index and b/examples/pybullet/gym/pybullet_data/data/policies/humanoid3d/humanoid3d_backflip.ckpt.index differ diff --git a/examples/pybullet/gym/pybullet_envs/deep_mimic/testrl.py b/examples/pybullet/gym/pybullet_envs/deep_mimic/testrl.py index 1693fe7d4..9b9549359 100644 --- a/examples/pybullet/gym/pybullet_envs/deep_mimic/testrl.py +++ b/examples/pybullet/gym/pybullet_envs/deep_mimic/testrl.py @@ -1,3 +1,4 @@ +import time import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) @@ -17,7 +18,7 @@ import random update_timestep = 1. / 240. animating = True - +step = False def update_world(world, time_elapsed): timeStep = update_timestep @@ -82,11 +83,15 @@ if __name__ == '__main__': world = build_world(args, True) while (world.env._pybullet_client.isConnected()): + timeStep = update_timestep + time.sleep(timeStep) keys = world.env.getKeyboardEvents() if world.env.isKeyTriggered(keys, ' '): animating = not animating - if (animating): + if world.env.isKeyTriggered(keys, 'i'): + step = True + if (animating or step): update_world(world, timeStep) - #animating=False + step = False