mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-01-13 08:18:03 -05:00
add tests
This commit is contained in:
@@ -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__':
|
||||
|
||||
15
tests/test_rrt_star_reeds_shepp.py
Normal file
15
tests/test_rrt_star_reeds_shepp.py
Normal 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()
|
||||
Reference in New Issue
Block a user