mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 20:03:53 +08:00
remove trivial terminal constraint and associated CasADi generated functions (#23898)
* remove trivial terminal constraint and associated CasADi generated functions * Update refs Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
This commit is contained in:
@@ -28,8 +28,6 @@ casadi_cost_0 = [
|
||||
casadi_constraints = [
|
||||
f'{gen}/long_constraints/long_constr_h_fun.c',
|
||||
f'{gen}/long_constraints/long_constr_h_fun_jac_uxt_zt.c',
|
||||
f'{gen}/long_constraints/long_constr_h_e_fun.c',
|
||||
f'{gen}/long_constraints/long_constr_h_e_fun_jac_uxt_zt.c',
|
||||
]
|
||||
|
||||
build_files = [f'{gen}/acados_solver_long.c'] + casadi_model + casadi_cost_y + casadi_cost_e + \
|
||||
@@ -47,7 +45,6 @@ generated_files = [
|
||||
|
||||
f'{gen}/long_model/long_model.h',
|
||||
f'{gen}/long_constraints/long_h_constraint.h',
|
||||
f'{gen}/long_constraints/long_h_e_constraint.h',
|
||||
f'{gen}/long_cost/long_cost_y_fun.h',
|
||||
f'{gen}/long_cost/long_cost_y_e_fun.h',
|
||||
f'{gen}/long_cost/long_cost_y_0_fun.h',
|
||||
|
||||
@@ -149,7 +149,6 @@ def gen_long_mpc_solver():
|
||||
(a_max - a_ego),
|
||||
((x_obstacle - x_ego) - (3/4) * (desired_dist_comfort)) / (v_ego + 10.))
|
||||
ocp.model.con_h_expr = constraints
|
||||
ocp.model.con_h_expr_e = vertcat(np.zeros(CONSTR_DIM))
|
||||
|
||||
x0 = np.zeros(X_DIM)
|
||||
ocp.constraints.x0 = x0
|
||||
@@ -163,9 +162,7 @@ def gen_long_mpc_solver():
|
||||
ocp.cost.zu = cost_weights
|
||||
|
||||
ocp.constraints.lh = np.zeros(CONSTR_DIM)
|
||||
ocp.constraints.lh_e = np.zeros(CONSTR_DIM)
|
||||
ocp.constraints.uh = 1e4*np.ones(CONSTR_DIM)
|
||||
ocp.constraints.uh_e = 1e4*np.ones(CONSTR_DIM)
|
||||
ocp.constraints.idxsh = np.arange(CONSTR_DIM)
|
||||
|
||||
# The HPIPM solver can give decent solutions even when it is stopped early
|
||||
|
||||
@@ -1 +1 @@
|
||||
072ee2ba6bca1ea5943fef27b0cc764e40275568
|
||||
5cd22804273530aaf69ebb9f5039e8d08ca44ef8
|
||||
Reference in New Issue
Block a user