-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.py
51 lines (40 loc) · 1.95 KB
/
options.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
51
import os
import argparse
class PRMControllerOptions:
def __init__(self):
self.parser = argparse.ArgumentParser(description="PRMController options")
self.parser.add_argument("--k",
type = int,
help = "number of K nearest neighbours",
default = 15)
self.parser.add_argument("--nbrs",
type = int,
help = "numbers of random sampled points",
default = 1000)
self.parser.add_argument("--env1",
type = int,
help = "range of x",
default = 10)
self.parser.add_argument("--env2",
type = int,
help = "range of y",
default = 6)
self.parser.add_argument("--env3",
type = int,
help = "number of obstacles",
default = 5)
self.parser.add_argument("--shortcut",
help = "perform path shortcutting",
action = "store_true")
self.parser.add_argument("--edgePlot",
help = "plot the edges of the PRM",
action = "store_true")
self.parser.add_argument("--pointPlot",
help = "plot the random sampled points",
action = "store_true")
self.parser.add_argument("--solutionPlot",
help = "plot the solution path",
action = "store_true")
def parse(self):
self.options = self.parser.parse_args()
return self.options