-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.py
31 lines (21 loc) · 806 Bytes
/
cli.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
28
29
from env import ThorMultiEnv
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Script description")
parser.add_argument("--scene", type=str, default="FloorPlan1", help="Scene name")
parser.add_argument("--agentCount", type=int, default=2, help="Number of agents")
parser.add_argument("--gridSize", type=float, default=0.25, help="Grid size")
args = parser.parse_args()
config_dict = {
'controller_args': {
"scene": args.scene,
"agentCount": args.agentCount,
'gridSize': args.gridSize
},
}
env = ThorMultiEnv(config_dict)
while True:
input_str = input("Enter a command ('q' to exit): ")
if input_str == 'q':
break
env.step(input_str)