improve the new pybullet gym environments, follow camera, disable 2D GUI, disable rendering during loading (makes it faster)

disable vsync on Mac
fix setup.py file
This commit is contained in:
Erwin Coumans
2017-08-20 18:11:53 -07:00
parent c4112ec5cc
commit c06ea72a4c
14 changed files with 125 additions and 46 deletions

View File

@@ -22,12 +22,10 @@ class SmallReactivePolicy:
return x
def demo_run():
print("create env")
env = gym.make("InvertedPendulumBulletEnv-v0")
cid = p.connect(p.SHARED_MEMORY) # only show graphics if the browser is already running....
if cid < 0:
cid = p.connect(p.DIRECT)
print("connecting")
cid = p.connect(p.GUI)
pi = SmallReactivePolicy(env.observation_space, env.action_space)
while 1:
@@ -35,7 +33,7 @@ def demo_run():
score = 0
restart_delay = 0
obs = env.reset()
print("frame")
while 1:
time.sleep(0.05)
a = pi.act(obs)