mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-23 15:02:06 +08:00
XVA long policy: prev_a becomes numpy anyway (#23175)
This commit is contained in:
@@ -203,7 +203,7 @@ class LongitudinalMpc():
|
||||
self.solver = AcadosOcpSolverFast('long', N, EXPORT_DIR)
|
||||
self.v_solution = [0.0 for i in range(N+1)]
|
||||
self.a_solution = [0.0 for i in range(N+1)]
|
||||
self.prev_a = self.a_solution
|
||||
self.prev_a = np.array(self.a_solution)
|
||||
self.j_solution = [0.0 for i in range(N)]
|
||||
self.yref = np.zeros((N+1, COST_DIM))
|
||||
for i in range(N):
|
||||
@@ -371,7 +371,7 @@ class LongitudinalMpc():
|
||||
self.a_solution = self.x_sol[:,2]
|
||||
self.j_solution = self.u_sol[:,0]
|
||||
|
||||
self.prev_a = interp(T_IDXS + 0.05, T_IDXS, self.a_solution)
|
||||
self.prev_a = np.interp(T_IDXS + 0.05, T_IDXS, self.a_solution)
|
||||
|
||||
t = sec_since_boot()
|
||||
if self.solution_status != 0:
|
||||
|
||||
Reference in New Issue
Block a user