Skip to content

Commit

Permalink
add default max iter
Browse files Browse the repository at this point in the history
  • Loading branch information
FranekStark committed Feb 17, 2025
1 parent 95ce9f3 commit c940571
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ws/src/controllers/src/mit_controller/mpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ MPC::MPC(double alpha,
solver_config_, reinterpret_cast<ocp_qp_xcond_solver_opts *>(solver_opts_), tol_name, &solver_tolerances);
}
}
// Set max iter high to reach requested tolerance
int max_iter = 1000;
ocp_qp_xcond_solver_opts_set(
solver_config_, reinterpret_cast<ocp_qp_xcond_solver_opts *>(solver_opts_), "iter_max", &max_iter);

qp_solver_ = ocp_qp_create(solver_config_, solver_dims_, solver_opts_);

Expand Down

0 comments on commit c940571

Please sign in to comment.