tweak to testEnv.py, sample usage:

python testEnv.py --rgb=1 --render=1 --step=100000 --env="HumanoidBulletEnv-v0"
This commit is contained in:
Erwin Coumans 2017-09-09 16:36:42 -07:00
parent ce64aff7af
commit de28334a70

View File

@ -22,6 +22,8 @@ def test(args):
print(action)
for i in range(args.steps):
obs,rewards,done,_ =env.step(action)
if (args.rgb):
print(env.render(mode="rgb_array"))
print("obs=")
print(obs)
print("rewards")
@ -35,7 +37,8 @@ def main():
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--env', help='environment ID', default='AntBulletEnv-v0')
parser.add_argument('--seed', help='RNG seed', type=int, default=0)
parser.add_argument('--render', help='Render in OpenGL Window', type=str, default=0)
parser.add_argument('--render', help='OpenGL Visualizer', type=int, default=0)
parser.add_argument('--rgb',help='rgb_array gym rendering',type=int, default=0)
parser.add_argument('--steps', help='Number of steps', type=int, default=1)
parser.add_argument('--bla',help='bla',type=int, default=42)
args = parser.parse_args()