Skip to content

Commit 0a60f28

Browse files
committed
fix bug
1 parent 3c891fe commit 0a60f28

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,12 @@ def get_linear_model_matrix(v, phi, delta):
8888
A[0, 3] = - DT * v * math.sin(phi)
8989
A[1, 2] = DT * math.sin(phi)
9090
A[1, 3] = DT * v * math.cos(phi)
91-
A[3, 2] = DT * math.tan(delta)
91+
A[3, 2] = DT * math.tan(delta) / WB
9292

9393
B = np.matrix(np.zeros((NX, NU)))
9494
B[2, 0] = DT
9595
B[3, 1] = DT * v / (WB * math.cos(delta) ** 2)
9696

97-
# C = np.matrix(np.zeros((NX, 1)))
98-
# C[0, 0] = DT * v * math.sin(phi) * phi
99-
# C[1, 0] = - DT * v * math.cos(phi) * phi
100-
# C[3, 0] = v * delta / (WB * math.cos(delta) ** 2)
101-
10297
C = np.zeros(NX)
10398
C[0] = DT * v * math.sin(phi) * phi
10499
C[1] = - DT * v * math.cos(phi) * phi

0 commit comments

Comments
 (0)