mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 13:50:04 +00:00
tweak to testEnv.py, sample usage:
python testEnv.py --rgb=1 --render=1 --step=100000 --env="HumanoidBulletEnv-v0"
This commit is contained in:
parent
ce64aff7af
commit
de28334a70
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user