-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure_area_clearing.py
27 lines (22 loc) · 1.03 KB
/
configure_area_clearing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""
An example script to show configurable parameters for Area-Clearing
"""
import benchnpin.environments
import gymnasium as gym
############### VVVVVVV Configurable Parameters for Area-Clearing VVVVVVV ####################
cfg = {
"output_dir": "logs/", # Specify directory for loggings
"env": 'clear_env', # Area structures. Options: 'clear_env_small', 'clear_env', walled_env', 'walled_env_with_columns'
"num_obstacles": 15, # Number of randomly positioned boxes to be removed
"obstacle_size": 0.5, # Size of each box
"render_scale": 40, # Scalar applied to rendering window to fit the screen. Reducing this value makes rendering window smaller
}
############### ^^^^^^^ Configurable Parameters for Area-Clearing ^^^^^^^ ####################
env = gym.make('area-clearing-v0', cfg=cfg)
env = env.unwrapped
env.activate_demo_mode()
env.reset()
terminated = truncated = False
while not (terminated or truncated):
observation, reward, terminated, truncated, info = env.step(0)
env.render()