try remove pycubicspline dependency

This commit is contained in:
Atsushi Sakai
2018-02-11 10:35:23 -08:00
parent 584dbd2f45
commit 0a42ae7b9d
2 changed files with 6 additions and 17 deletions

View File

@@ -5,11 +5,14 @@ Path tracking simulation with LQR speed and steering 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
# LQR parameter
Q = np.eye(5)
@@ -252,7 +255,8 @@ def main():
ay = [0.0, -3.0, -5.0, 6.5, 3.0, 0.0, 0.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)