Skip to content

Commit 4a8be27

Browse files
committed
remove all dependency
1 parent 0a42ae7 commit 4a8be27

File tree

6 files changed

+22
-23
lines changed

6 files changed

+22
-23
lines changed

.gitmodules

-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +0,0 @@
1-
[submodule "PathTracking/rear_wheel_feedback/pycubicspline"]
2-
path = PathTracking/rear_wheel_feedback/pycubicspline
3-
url = https://github.com/AtsushiSakai/pycubicspline.git
4-
[submodule "PathTracking/stanley_controller/pycubicspline"]
5-
path = PathTracking/stanley_controller/pycubicspline
6-
url = https://github.com/AtsushiSakai/pycubicspline
7-
[submodule "PathTracking/lqr_speed_steer_control/pycubicspline"]
8-
path = PathTracking/lqr_speed_steer_control/pycubicspline
9-
url = https://github.com/AtsushiSakai/pycubicspline
10-
[submodule "PathTracking/model_predictive_speed_and_steer_control/pycubicspline"]
11-
path = PathTracking/model_predictive_speed_and_steer_control/pycubicspline
12-
url = https://github.com/AtsushiSakai/pycubicspline
This file was deleted.

PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
author: Atsushi Sakai (@Atsushi_twi)
66
77
"""
8+
import sys
9+
sys.path.append("../../PathPlanning/CubicSpline/")
810

911
import numpy as np
1012
import math
1113
import cvxpy
1214
import matplotlib.pyplot as plt
13-
from pycubicspline import pycubicspline
15+
import cubic_spline_planner
1416

1517
NX = 4 # x = x, y, v, yaw
1618
NU = 2 # a = [accel, steer]
@@ -482,18 +484,21 @@ def smooth_yaw(yaw):
482484
def get_forward_course(dl):
483485
ax = [0.0, 60.0, 125.0, 50.0, 75.0, 30.0, -10.0]
484486
ay = [0.0, 0.0, 50.0, 65.0, 30.0, 50.0, -20.0]
485-
cx, cy, cyaw, ck, s = pycubicspline.calc_spline_course(ax, ay, ds=dl)
487+
cx, cy, cyaw, ck, s = cubic_spline_planner.calc_spline_course(
488+
ax, ay, ds=dl)
486489

487490
return cx, cy, cyaw, ck
488491

489492

490493
def get_switch_back_course(dl):
491494
ax = [0.0, 30.0, 6.0, 20.0, 35.0]
492495
ay = [0.0, 0.0, 20.0, 35.0, 20.0]
493-
cx, cy, cyaw, ck, s = pycubicspline.calc_spline_course(ax, ay, ds=dl)
496+
cx, cy, cyaw, ck, s = cubic_spline_planner.calc_spline_course(
497+
ax, ay, ds=dl)
494498
ax = [35.0, 10.0, 0.0, 0.0]
495499
ay = [20.0, 30.0, 5.0, 0.0]
496-
cx2, cy2, cyaw2, ck2, s2 = pycubicspline.calc_spline_course(ax, ay, ds=dl)
500+
cx2, cy2, cyaw2, ck2, s2 = cubic_spline_planner.calc_spline_course(
501+
ax, ay, ds=dl)
497502
cyaw2 = [i - math.pi for i in cyaw2]
498503
cx.extend(cx2)
499504
cy.extend(cy2)
This file was deleted.

PathTracking/rear_wheel_feedback/rear_wheel_feedback.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
author: Atsushi Sakai(@Atsushi_twi)
66
77
"""
8+
import sys
9+
sys.path.append("../../PathPlanning/CubicSpline/")
10+
811
import math
912
import matplotlib.pyplot as plt
10-
from pycubicspline import pycubicspline
13+
import cubic_spline_planner
14+
1115

1216
Kp = 1.0 # speed propotional gain
1317
# steering control parameter
@@ -188,7 +192,8 @@ def main():
188192
ay = [0.0, 0.0, 5.0, 6.5, 3.0, 5.0, -2.0]
189193
goal = [ax[-1], ay[-1]]
190194

191-
cx, cy, cyaw, ck, s = pycubicspline.calc_spline_course(ax, ay, ds=0.1)
195+
cx, cy, cyaw, ck, s = cubic_spline_planner.calc_spline_course(
196+
ax, ay, ds=0.1)
192197
target_speed = 10.0 / 3.6
193198

194199
sp = calc_speed_profile(cx, cy, cyaw, target_speed)

PathTracking/stanley_controller/stanley_controller.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
author: Atsushi Sakai (@Atsushi_twi)
66
77
"""
8+
import sys
9+
sys.path.append("../../PathPlanning/CubicSpline/")
10+
811
import math
912
import matplotlib.pyplot as plt
10-
11-
from pycubicspline import pycubicspline
13+
import cubic_spline_planner
1214

1315

1416
k = 0.5 # control gain
@@ -100,7 +102,8 @@ def main():
100102
ax = [0.0, 100.0, 100.0, 50.0, 60.0]
101103
ay = [0.0, 0.0, -30.0, -20.0, 0.0]
102104

103-
cx, cy, cyaw, ck, s = pycubicspline.calc_spline_course(ax, ay, ds=0.1)
105+
cx, cy, cyaw, ck, s = cubic_spline_planner.calc_spline_course(
106+
ax, ay, ds=0.1)
104107

105108
target_speed = 30.0 / 3.6 # [m/s]
106109

0 commit comments

Comments
 (0)