forked from AtsushiSakai/PythonRobotics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_rrt_star.py
More file actions
37 lines (27 loc) · 813 Bytes
/
test_rrt_star.py
File metadata and controls
37 lines (27 loc) · 813 Bytes
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
import os
import sys
from unittest import TestCase
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
"/../PathPlanning/RRTStar/")
try:
import rrt_star as m
except ImportError:
raise
print(__file__)
class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
def test_no_obstacle(self):
obstacle_list = []
# Set Initial parameters
rrt_star = m.RRTStar(start=[0, 0],
goal=[6, 10],
rand_area=[-2, 15],
obstacle_list=obstacle_list)
path = rrt_star.planning(animation=False)
assert path is not None
if __name__ == '__main__': # pragma: no cover
test = Test()
test.test1()
test.test_no_obstacle()