optimize test

This commit is contained in:
Atsushi Sakai
2019-02-06 15:59:49 +09:00
parent 0e71384027
commit 3146531f2f
15 changed files with 165 additions and 65 deletions

View File

@@ -1,6 +1,14 @@
from unittest import TestCase
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
"/../PathPlanning/ClosedLoopRRTStar/")
try:
from PathPlanning.ClosedLoopRRTStar import closed_loop_rrt_star_car as m
except:
raise
from SLAM.iterative_closest_point import iterative_closest_point as m
print(__file__)
@@ -9,4 +17,9 @@ class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
m.main(gx=1.0, gy=0.0, gyaw=0.0, maxIter=5)
if __name__ == '__main__':
test = Test()
test.test1()

View File

@@ -1,6 +1,13 @@
from unittest import TestCase
from PathPlanning.InformedRRTStar import informed_rrt_star as m
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
sys.path.append(os.path.dirname(os.path.abspath(__file__))
+ "/../PathPlanning/InformedRRTStar/")
try:
from PathPlanning.InformedRRTStar import informed_rrt_star as m
except:
raise
print(__file__)
@@ -10,3 +17,8 @@ class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
if __name__ == '__main__':
test = Test()
test.test1()

View File

@@ -1,9 +1,13 @@
from unittest import TestCase
import sys
sys.path.append("./PathPlanning/LQRRRTStar/")
from PathPlanning.LQRRRTStar import lqr_rrt_star as m
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
sys.path.append(os.path.dirname(os.path.abspath(__file__))
+ "/../PathPlanning/LQRRRTStar/")
try:
from PathPlanning.LQRRRTStar import lqr_rrt_star as m
except:
raise
print(__file__)
@@ -12,4 +16,9 @@ class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
m.main(maxIter=5)
if __name__ == '__main__':
test = Test()
test.test1()

View File

@@ -1,11 +1,13 @@
from unittest import TestCase
import sys
sys.path.append("./PathPlanning/RRTDubins/")
sys.path.append("./PathPlanning/DubinsPath/")
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
"/../PathPlanning/RRTDubins/")
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
"/../PathPlanning/DubinsPath/")
try:
from PathPlanning.RRTDubins import rrt_dubins as m
# from RRTDubins import rrt_dubins as m
import rrt_dubins as m
except:
raise
@@ -18,3 +20,8 @@ class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
if __name__ == '__main__':
test = Test()
test.test1()

View File

@@ -1,6 +1,14 @@
from unittest import TestCase
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
"/../PathPlanning/RRTStar/")
try:
import rrt_star as m
except:
raise
from PathPlanning.RRTstar import rrt_star as m
print(__file__)
@@ -10,3 +18,8 @@ class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
if __name__ == '__main__':
test = Test()
test.test1()

View File

@@ -1,9 +1,14 @@
from unittest import TestCase
import sys
sys.path.append("./PathPlanning/RRTStarDubins/")
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__))
+ "/../PathPlanning/RRTStarDubins/")
from PathPlanning.RRTStarDubins import rrt_star_dubins as m
try:
import rrt_star_dubins as m
except:
raise
print(__file__)
@@ -13,3 +18,8 @@ class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
if __name__ == '__main__':
test = Test()
test.test1()

View File

@@ -1,10 +1,17 @@
from unittest import TestCase
import sys
sys.path.append("./PathPlanning/RRTStarReedsShepp/")
sys.path.append("./PathPlanning/ReedsSheppPath/")
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__))
+ "/../PathPlanning/RRTStarReedsShepp/")
sys.path.append(os.path.dirname(os.path.abspath(__file__))
+ "/../PathPlanning/ReedsSheppPath/")
try:
import rrt_star_reeds_shepp as m
except:
raise
from PathPlanning.RRTStarReedsShepp import rrt_star_reeds_shepp as m
print(__file__)
@@ -13,4 +20,9 @@ class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
m.main(maxIter=5)
if __name__ == '__main__':
test = Test()
test.test1()

View File

@@ -1,12 +1,18 @@
from unittest import TestCase
import sys
sys.path.append("./PathPlanning/ModelPredictiveTrajectoryGenerator/")
sys.path.append("./PathPlanning/StateLatticePlanner/")
from PathPlanning.StateLatticePlanner import state_lattice_planner as m
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
"/../PathPlanning/ModelPredictiveTrajectoryGenerator/")
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
"/../PathPlanning/StateLatticePlanner/")
m.table_path = "./PathPlanning/StateLatticePlanner/lookuptable.csv"
try:
import state_lattice_planner as m
import model_predictive_trajectory_generator as m2
except:
raise
print(__file__)
@@ -15,4 +21,10 @@ class Test(TestCase):
def test1(self):
m.show_animation = False
m2.show_animation = False
m.main()
if __name__ == '__main__':
test = Test()
test.test1()