Skip to content

Commit 97f0405

Browse files
committed
replace math.degrees to np.rad2deg
1 parent a164faa commit 97f0405

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

PathPlanning/ClosedLoopRRTStar/closed_loop_rrt_star_car.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def main():
436436
plt.pause(0.001)
437437

438438
flg, ax = plt.subplots(1)
439-
plt.plot(t, [math.degrees(iyaw) for iyaw in yaw[:-1]], '-r')
439+
plt.plot(t, [np.rad2deg(iyaw) for iyaw in yaw[:-1]], '-r')
440440
plt.xlabel("time[s]")
441441
plt.ylabel("Yaw[deg]")
442442
plt.grid(True)
@@ -455,7 +455,7 @@ def main():
455455
plt.grid(True)
456456

457457
flg, ax = plt.subplots(1)
458-
plt.plot(t, [math.degrees(td) for td in d], '-r')
458+
plt.plot(t, [np.rad2deg(td) for td in d], '-r')
459459
plt.xlabel("time[s]")
460460
plt.ylabel("Steering angle[deg]")
461461
plt.grid(True)

PathPlanning/CubicSpline/cubic_spline_planner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def main():
219219
plt.legend()
220220

221221
flg, ax = plt.subplots(1)
222-
plt.plot(s, [math.degrees(iyaw) for iyaw in ryaw], "-r", label="yaw")
222+
plt.plot(s, [np.rad2deg(iyaw) for iyaw in ryaw], "-r", label="yaw")
223223
plt.grid(True)
224224
plt.legend()
225225
plt.xlabel("line length[m]")

PathPlanning/DubinsPath/dubins_path_planning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def LSL(alpha, beta, d):
3737
t = mod2pi(-alpha + tmp1)
3838
p = math.sqrt(p_squared)
3939
q = mod2pi(beta - tmp1)
40-
# print(math.degrees(t), p, math.degrees(q))
40+
# print(np.rad2deg(t), p, np.rad2deg(q))
4141

4242
return t, p, q, mode
4343

PathPlanning/FrenetOptimalTrajectory/cubic_spline_planner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def main():
219219
plt.legend()
220220

221221
flg, ax = plt.subplots(1)
222-
plt.plot(s, [math.degrees(iyaw) for iyaw in ryaw], "-r", label="yaw")
222+
plt.plot(s, [np.rad2deg(iyaw) for iyaw in ryaw], "-r", label="yaw")
223223
plt.grid(True)
224224
plt.legend()
225225
plt.xlabel("line length[m]")

PathPlanning/QuinticPolynomialsPlanner/quintic_polynomials_planner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def main():
201201
plt.plot(x, y, "-r")
202202

203203
plt.subplots()
204-
plt.plot(time, [math.degrees(i) for i in yaw], "-r")
204+
plt.plot(time, [np.rad2deg(i) for i in yaw], "-r")
205205
plt.xlabel("Time[s]")
206206
plt.ylabel("Yaw[deg]")
207207
plt.grid(True)

PathPlanning/RRTDubins/dubins_path_planning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def LSL(alpha, beta, d):
3838
t = mod2pi(-alpha + tmp1)
3939
p = math.sqrt(p_squared)
4040
q = mod2pi(beta - tmp1)
41-
# print(math.degrees(t), p, math.degrees(q))
41+
# print(np.rad2deg(t), p, np.rad2deg(q))
4242

4343
return t, p, q, mode
4444

PathPlanning/RRTStarDubins/dubins_path_planning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def LSL(alpha, beta, d):
3333
t = mod2pi(-alpha + tmp1)
3434
p = math.sqrt(p_squared)
3535
q = mod2pi(beta - tmp1)
36-
# print(math.degrees(t), p, math.degrees(q))
36+
# print(np.rad2deg(t), p, np.rad2deg(q))
3737

3838
return t, p, q, mode
3939

PathTracking/lqr_speed_steer_control/lqr_speed_steer_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def main():
272272
plt.legend()
273273

274274
flg, ax = plt.subplots(1)
275-
plt.plot(s, [math.degrees(iyaw) for iyaw in cyaw], "-r", label="yaw")
275+
plt.plot(s, [np.rad2deg(iyaw) for iyaw in cyaw], "-r", label="yaw")
276276
plt.grid(True)
277277
plt.legend()
278278
plt.xlabel("line length[m]")

PathTracking/lqr_steer_control/lqr_steer_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def main():
271271
plt.legend()
272272

273273
flg, ax = plt.subplots(1)
274-
plt.plot(s, [math.degrees(iyaw) for iyaw in cyaw], "-r", label="yaw")
274+
plt.plot(s, [np.rad2deg(iyaw) for iyaw in cyaw], "-r", label="yaw")
275275
plt.grid(True)
276276
plt.legend()
277277
plt.xlabel("line length[m]")

PathTracking/rear_wheel_feedback/rear_wheel_feedback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def main():
219219
plt.legend()
220220

221221
flg, ax = plt.subplots(1)
222-
plt.plot(s, [math.degrees(iyaw) for iyaw in cyaw], "-r", label="yaw")
222+
plt.plot(s, [np.rad2deg(iyaw) for iyaw in cyaw], "-r", label="yaw")
223223
plt.grid(True)
224224
plt.legend()
225225
plt.xlabel("line length[m]")

0 commit comments

Comments
 (0)