|
42 | 42 | show_animation = True
|
43 | 43 |
|
44 | 44 |
|
45 |
| -class quinic_polynomial: |
| 45 | +class quintic_polynomial: |
46 | 46 |
|
47 | 47 | def __init__(self, xs, vxs, axs, xe, vxe, axe, T):
|
48 | 48 |
|
49 |
| - # calc coefficient of quinic polynomial |
| 49 | + # calc coefficient of quintic polynomial |
50 | 50 | self.xs = xs
|
51 | 51 | self.vxs = vxs
|
52 | 52 | self.axs = axs
|
@@ -86,17 +86,18 @@ def calc_second_derivative(self, t):
|
86 | 86 | xt = 2 * self.a2 + 6 * self.a3 * t + 12 * self.a4 * t**2 + 20 * self.a5 * t**3
|
87 | 87 |
|
88 | 88 | return xt
|
89 |
| - |
| 89 | + |
90 | 90 | def calc_third_derivative(self, t):
|
91 | 91 | xt = 6 * self.a3 + 24 * self.a4 * t + 60 * self.a5 * t**2
|
92 | 92 |
|
93 | 93 | return xt
|
94 | 94 |
|
| 95 | + |
95 | 96 | class quartic_polynomial:
|
96 | 97 |
|
97 | 98 | def __init__(self, xs, vxs, axs, vxe, axe, T):
|
98 | 99 |
|
99 |
| - # calc coefficient of quinic polynomial |
| 100 | + # calc coefficient of quintic polynomial |
100 | 101 | self.xs = xs
|
101 | 102 | self.vxs = vxs
|
102 | 103 | self.axs = axs
|
@@ -132,7 +133,7 @@ def calc_second_derivative(self, t):
|
132 | 133 | xt = 2 * self.a2 + 6 * self.a3 * t + 12 * self.a4 * t**2
|
133 | 134 |
|
134 | 135 | return xt
|
135 |
| - |
| 136 | + |
136 | 137 | def calc_third_derivative(self, t):
|
137 | 138 | xt = 6 * self.a3 + 24 * self.a4 * t
|
138 | 139 |
|
@@ -173,7 +174,7 @@ def calc_frenet_paths(c_speed, c_d, c_d_d, c_d_dd, s0):
|
173 | 174 | for Ti in np.arange(MINT, MAXT, DT):
|
174 | 175 | fp = Frenet_path()
|
175 | 176 |
|
176 |
| - lat_qp = quinic_polynomial(c_d, c_d_d, c_d_dd, di, 0.0, 0.0, Ti) |
| 177 | + lat_qp = quintic_polynomial(c_d, c_d_d, c_d_dd, di, 0.0, 0.0, Ti) |
177 | 178 |
|
178 | 179 | fp.t = [t for t in np.arange(0.0, Ti, DT)]
|
179 | 180 | fp.d = [lat_qp.calc_point(t) for t in fp.t]
|
|
0 commit comments