mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-02-07 03:05:10 -05:00
fix VisibleDeprecation Warning (#358)
* try coverage * add python warning setting * add random seed for test coverage
This commit is contained in:
@@ -117,7 +117,7 @@ def jacob_motion(x, u):
|
|||||||
|
|
||||||
jF = np.array([[0.0, 0.0, -DT * u[0] * math.sin(x[2, 0])],
|
jF = np.array([[0.0, 0.0, -DT * u[0] * math.sin(x[2, 0])],
|
||||||
[0.0, 0.0, DT * u[0] * math.cos(x[2, 0])],
|
[0.0, 0.0, DT * u[0] * math.cos(x[2, 0])],
|
||||||
[0.0, 0.0, 0.0]])
|
[0.0, 0.0, 0.0]], dtype=np.float64)
|
||||||
|
|
||||||
G = np.eye(STATE_SIZE) + Fx.T @ jF @ Fx
|
G = np.eye(STATE_SIZE) + Fx.T @ jF @ Fx
|
||||||
|
|
||||||
@@ -236,7 +236,8 @@ def main():
|
|||||||
if show_animation: # pragma: no cover
|
if show_animation: # pragma: no cover
|
||||||
plt.cla()
|
plt.cla()
|
||||||
# for stopping simulation with the esc key.
|
# for stopping simulation with the esc key.
|
||||||
plt.gcf().canvas.mpl_connect('key_release_event',
|
plt.gcf().canvas.mpl_connect(
|
||||||
|
'key_release_event',
|
||||||
lambda event: [exit(0) if event.key == 'escape' else None])
|
lambda event: [exit(0) if event.key == 'escape' else None])
|
||||||
|
|
||||||
plt.plot(RFID[:, 0], RFID[:, 1], "*k")
|
plt.plot(RFID[:, 0], RFID[:, 1], "*k")
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
echo "Run test suites! "
|
echo "Run test suites! "
|
||||||
|
export PYTHONWARNINGS=default # show warning
|
||||||
#python -m unittest discover tests
|
#python -m unittest discover tests
|
||||||
#python -Wignore -m unittest discover tests #ignore warning
|
#python -Wignore -m unittest discover tests #ignore warning
|
||||||
coverage run -m unittest discover tests # generate coverage file
|
coverage run -m unittest discover tests # generate coverage file
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
import random
|
||||||
sys.path.append(os.path.dirname(__file__) + "/../")
|
sys.path.append(os.path.dirname(__file__) + "/../")
|
||||||
try:
|
try:
|
||||||
from PathPlanning.BatchInformedRRTStar import batch_informed_rrtstar as m
|
from PathPlanning.BatchInformedRRTStar import batch_informed_rrtstar as m
|
||||||
except:
|
except ImportError:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
print(__file__)
|
print(__file__)
|
||||||
|
|
||||||
|
random.seed(12345)
|
||||||
|
|
||||||
|
|
||||||
class Test(TestCase):
|
class Test(TestCase):
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import random
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
|
||||||
@@ -7,9 +8,10 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
|
|||||||
"/../PathPlanning/ClosedLoopRRTStar/")
|
"/../PathPlanning/ClosedLoopRRTStar/")
|
||||||
try:
|
try:
|
||||||
from PathPlanning.ClosedLoopRRTStar import closed_loop_rrt_star_car as m
|
from PathPlanning.ClosedLoopRRTStar import closed_loop_rrt_star_car as m
|
||||||
except:
|
except ImportError:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
random.seed(12345)
|
||||||
|
|
||||||
print(__file__)
|
print(__file__)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
np.random.seed(12345)
|
||||||
|
|
||||||
from PathPlanning.DubinsPath import dubins_path_planning
|
from PathPlanning.DubinsPath import dubins_path_planning
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
import random
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__))
|
sys.path.append(os.path.dirname(os.path.abspath(__file__))
|
||||||
+ "/../PathPlanning/LQRRRTStar/")
|
+ "/../PathPlanning/LQRRRTStar/")
|
||||||
try:
|
try:
|
||||||
from PathPlanning.LQRRRTStar import lqr_rrt_star as m
|
from PathPlanning.LQRRRTStar import lqr_rrt_star as m
|
||||||
except:
|
except ImportError:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
print(__file__)
|
print(__file__)
|
||||||
|
|
||||||
|
random.seed(12345)
|
||||||
|
|
||||||
|
|
||||||
class Test(TestCase):
|
class Test(TestCase):
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import random
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
sys.path.append(os.path.dirname(__file__) + "/../ArmNavigation/n_joint_arm_to_point_control/")
|
sys.path.append(os.path.dirname(__file__) + "/../ArmNavigation/n_joint_arm_to_point_control/")
|
||||||
@@ -8,6 +9,8 @@ import n_joint_arm_to_point_control as m
|
|||||||
|
|
||||||
print(__file__)
|
print(__file__)
|
||||||
|
|
||||||
|
random.seed(12345)
|
||||||
|
|
||||||
|
|
||||||
class Test(TestCase):
|
class Test(TestCase):
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import random
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
|
||||||
@@ -12,6 +13,8 @@ except ImportError:
|
|||||||
|
|
||||||
print(__file__)
|
print(__file__)
|
||||||
|
|
||||||
|
random.seed(12345)
|
||||||
|
|
||||||
|
|
||||||
class Test(TestCase):
|
class Test(TestCase):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user