mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
replace math.radians to np.deg2rad
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user