modify safety margin in update bounds

master
matssteinweg 2019-12-04 23:28:57 +01:00
parent a5f5fd9f8e
commit 3c305e46d4
1 changed files with 2 additions and 2 deletions

4
MPC.py
View File

@ -98,8 +98,8 @@ class MPC:
ur[n] = kappa_r ur[n] = kappa_r
# Compute equality constraint offset (B*ur) # Compute equality constraint offset (B*ur)
uq[n * nx:n * nx + nx] = B_lin[:, 0] * kappa_r uq[n * nx:n * nx + nx] = B_lin[:, 0] * kappa_r
lb, ub = self.model.reference_path.update_bounds(self.model, lb, ub = self.model.reference_path.update_bounds(
self.model.wp_id + n) self.model.wp_id + n, self.model.safety_margin[1])
xmin_dyn[nx * n] = lb xmin_dyn[nx * n] = lb
xmax_dyn[nx * n] = ub xmax_dyn[nx * n] = ub