-
Notifications
You must be signed in to change notification settings - Fork 29
/
evaluate_nocrash.py
50 lines (35 loc) · 1.75 KB
/
evaluate_nocrash.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from runners import NoCrashEvalRunner
def main(args):
town = args.town
weather = args.weather
port = args.port
tm_port = port + 2
runner = NoCrashEvalRunner(args, town, weather, port=port, tm_port=tm_port)
runner.run()
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
# Agent configs
parser.add_argument('--agent', default='autoagents/image_agent')
parser.add_argument('--agent-config', default='experiments/config_nocrash.yaml')
# Benchmark configs
parser.add_argument('--town', required=True, choices=['Town01', 'Town02'])
parser.add_argument('--weather', required=True, choices=['train', 'test'])
parser.add_argument('--host', default='localhost',
help='IP of the host server (default: localhost)')
parser.add_argument('--trafficManagerSeed', default='0',
help='Seed used by the TrafficManager (default: 0)')
parser.add_argument('--timeout', default="60.0",
help='Set the CARLA client timeout value in seconds')
parser.add_argument('--port', type=int, default=2000)
parser.add_argument('--repetitions',
type=int,
default=1,
help='Number of repetitions per route.')
parser.add_argument("--track", type=str, default='SENSORS', help="Participation track: SENSORS, MAP")
parser.add_argument('--resume', action='store_true')
parser.add_argument("--checkpoint", type=str,
default='./simulation_results.json',
help="Path to checkpoint used for saving statistics and resuming")
args = parser.parse_args()
main(args)