add tests

This commit is contained in:
Atsushi Sakai
2018-01-13 10:07:54 -08:00
parent ebeb3d955b
commit bdebdb8784
2 changed files with 21 additions and 5 deletions

View File

@@ -300,11 +300,12 @@ def main():
path = rrt.Planning(animation=show_animation)
# Draw final path
rrt.DrawGraph()
plt.plot([x for (x, y) in path], [y for (x, y) in path], '-r')
plt.grid(True)
plt.pause(0.001)
plt.show()
if show_animation:
rrt.DrawGraph()
plt.plot([x for (x, y) in path], [y for (x, y) in path], '-r')
plt.grid(True)
plt.pause(0.001)
plt.show()
if __name__ == '__main__':

View File

@@ -0,0 +1,15 @@
from unittest import TestCase
import sys
sys.path.append("./PathPlanning/RRTStarReedsShepp/")
from PathPlanning.RRTStarReedsShepp import rrt_star_reeds_shepp as m
print(__file__)
class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()