mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-01-13 16:47:55 -05:00
fix unittests.
This commit is contained in:
@@ -25,7 +25,7 @@ class LQRPlanner:
|
||||
self.MAX_ITER = 150
|
||||
self.EPS = 0.01
|
||||
|
||||
def lqr_planning(self, sx, sy, gx, gy, show_animation=SHOW_ANIMATION):
|
||||
def lqr_planning(self, sx, sy, gx, gy, show_animation=True):
|
||||
|
||||
rx, ry = [sx], [sy]
|
||||
|
||||
@@ -129,7 +129,7 @@ def main():
|
||||
gx = random.uniform(-area, area)
|
||||
gy = random.uniform(-area, area)
|
||||
|
||||
rx, ry = lqr_planner.lqr_planning(sx, sy, gx, gy)
|
||||
rx, ry = lqr_planner.lqr_planning(sx, sy, gx, gy, show_animation=SHOW_ANIMATION)
|
||||
|
||||
if SHOW_ANIMATION: # pragma: no cover
|
||||
plt.plot(sx, sy, "or")
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import os
|
||||
import sys
|
||||
from unittest import TestCase
|
||||
|
||||
import sys
|
||||
sys.path.append("./AerialNavigation/drone_3d_trajectory_following/")
|
||||
sys.path.append(os.path.dirname(__file__) + "/../AerialNavigation/drone_3d_trajectory_following/")
|
||||
|
||||
import drone_3d_trajectory_following as m
|
||||
|
||||
from AerialNavigation.drone_3d_trajectory_following import drone_3d_trajectory_following as m
|
||||
print(__file__)
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@ try:
|
||||
except ImportError:
|
||||
raise
|
||||
|
||||
grid_based_sweep_coverage_path_planner.do_animation = False
|
||||
|
||||
|
||||
class TestPlanning(TestCase):
|
||||
|
||||
def test_planning1(self):
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import os
|
||||
import sys
|
||||
from unittest import TestCase
|
||||
|
||||
import sys
|
||||
sys.path.append("./ArmNavigation/n_joint_arm_to_point_control/")
|
||||
sys.path.append(os.path.dirname(__file__) + "/../ArmNavigation/n_joint_arm_to_point_control/")
|
||||
|
||||
import n_joint_arm_to_point_control as m
|
||||
|
||||
from ArmNavigation.n_joint_arm_to_point_control import n_joint_arm_to_point_control as m
|
||||
print(__file__)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user