replace math.radians to np.deg2rad

This commit is contained in:
Atsushi Sakai
2018-10-23 21:49:08 +09:00
parent 15e044d015
commit a164faa7f2
30 changed files with 107 additions and 106 deletions

View File

@@ -12,7 +12,7 @@ import pandas as pd
def calc_states_list():
maxyaw = math.radians(-30.0)
maxyaw = np.deg2rad(-30.0)
x = np.arange(1.0, 30.0, 5.0)
y = np.arange(0.0, 20.0, 2.0)

View File

@@ -133,8 +133,8 @@ def optimize_trajectory(target, k0, p):
def test_optimize_trajectory():
# target = motion_model.State(x=5.0, y=2.0, yaw=math.radians(00.0))
target = motion_model.State(x=5.0, y=2.0, yaw=math.radians(90.0))
# target = motion_model.State(x=5.0, y=2.0, yaw=np.deg2rad(00.0))
target = motion_model.State(x=5.0, y=2.0, yaw=np.deg2rad(90.0))
k0 = 0.0
init_p = np.matrix([6.0, 0.0, 0.0]).T
@@ -152,8 +152,8 @@ def test_optimize_trajectory():
def test_trajectory_generate():
s = 5.0 # [m]
k0 = 0.0
km = math.radians(30.0)
kf = math.radians(-30.0)
km = np.deg2rad(30.0)
kf = np.deg2rad(-30.0)
# plt.plot(xk, yk, "xr")
# plt.plot(t, kp)