diff --git a/.gitmodules b/.gitmodules index 4c63b290..d6318aeb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,6 @@ [submodule "PathTracking/rear_wheel_feedback/pycubicspline"] path = PathTracking/rear_wheel_feedback/pycubicspline url = https://github.com/AtsushiSakai/pycubicspline.git -[submodule "PathTracking/lqr/matplotrecorder"] - path = PathTracking/lqr/matplotrecorder - url = https://github.com/AtsushiSakai/matplotrecorder -[submodule "PathTracking/lqr/pycubicspline"] - path = PathTracking/lqr/pycubicspline - url = https://github.com/AtsushiSakai/pycubicspline.git [submodule "PathPlanning/LatticePlanner/matplotrecorder"] path = PathPlanning/LatticePlanner/matplotrecorder url = https://github.com/AtsushiSakai/matplotrecorder.git @@ -25,9 +19,6 @@ [submodule "PathTracking/stanley_controller/pycubicspline"] path = PathTracking/stanley_controller/pycubicspline url = https://github.com/AtsushiSakai/pycubicspline -[submodule "PathTracking/lqr_steer_control/pycubicspline"] - path = PathTracking/lqr_steer_control/pycubicspline - url = https://github.com/AtsushiSakai/pycubicspline [submodule "PathTracking/lqr_speed_steer_control/pycubicspline"] path = PathTracking/lqr_speed_steer_control/pycubicspline url = https://github.com/AtsushiSakai/pycubicspline diff --git a/PathTracking/lqr_steer_control/lqr_steer_control.py b/PathTracking/lqr_steer_control/lqr_steer_control.py index a0429fc0..341bb278 100644 --- a/PathTracking/lqr_steer_control/lqr_steer_control.py +++ b/PathTracking/lqr_steer_control/lqr_steer_control.py @@ -5,11 +5,15 @@ Path tracking simulation with LQR steering control and PID speed control. author Atsushi Sakai (@Atsushi_twi) """ + +import sys +sys.path.append("../../PathPlanning/CubicSpline/") + import numpy as np import math import matplotlib.pyplot as plt import scipy.linalg as la -from pycubicspline import pycubicspline +import cubic_spline_planner Kp = 1.0 # speed proportional gain @@ -250,7 +254,8 @@ def main(): ay = [0.0, -3.0, -5.0, 6.5, 3.0, 5.0, -2.0] goal = [ax[-1], ay[-1]] - cx, cy, cyaw, ck, s = pycubicspline.calc_spline_course(ax, ay, ds=0.1) + cx, cy, cyaw, ck, s = cubic_spline_planner.calc_spline_course( + ax, ay, ds=0.1) target_speed = 10.0 / 3.6 # simulation parameter km/h -> m/s sp = calc_speed_profile(cx, cy, cyaw, target_speed) diff --git a/PathTracking/lqr_steer_control/pycubicspline b/PathTracking/lqr_steer_control/pycubicspline deleted file mode 160000 index 34b741f7..00000000 --- a/PathTracking/lqr_steer_control/pycubicspline +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 34b741f7eee6cfbe851317ca36dab59fc560ba9a