Skip to content

Commit

Permalink
longitudinal MPC: add comments to eval acados residuals
Browse files Browse the repository at this point in the history
  • Loading branch information
FreyJo committed Feb 23, 2022
1 parent 5470bbd commit d68bc0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ def run(self):

# qp_iter = self.solver.get_stats('statistics')[-1][-1] # SQP_RTI specific
# print(f"long_mpc timings: tot {self.solve_time:.2e}, qp {self.time_qp_solution:.2e}, lin {self.time_linearization:.2e}, integrator {self.time_integrator:.2e}, qp_iter {qp_iter}")
# res = self.solver.get_residuals()
# print(f"long_mpc residuals: {res[0]:.2e}, {res[1]:.2e}, {res[2]:.2e}, {res[3]:.2e}")
# self.solver.print_statistics()

for i in range(N+1):
self.x_sol[i] = self.solver.get(i, 'x')
Expand Down

0 comments on commit d68bc0b

Please sign in to comment.