Skip to content

Commit

Permalink
Fix bug due to previous code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrplz committed Jul 3, 2017
1 parent c164262 commit 4a5562e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions project_10_MPC_control/src/MPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ vector<double> MPC::Solve(Eigen::VectorXd state, Eigen::VectorXd coeffs) {
constraints_lower_bounds[cte_start] = cte; constraints_upper_bounds[cte_start] = cte;
constraints_lower_bounds[epsi_start] = epsi; constraints_upper_bounds[epsi_start] = epsi;

// object that computes objective and constraints
// Object that computes objective and constraints
FG_eval fg_eval(coeffs);

//
Expand Down Expand Up @@ -239,9 +239,9 @@ vector<double> MPC::Solve(Eigen::VectorXd state, Eigen::VectorXd coeffs) {
result.push_back(solution.x[a_start]);

// Add "future" solutions (where MPC is going)
for (size_t i = 0; i < N - 1; ++i) {
result.push_back(solution.x[x_start + i + 1]);
result.push_back(solution.x[y_start + i + 1]);
for (size_t i = 0; i < N; ++i) {
result.push_back(solution.x[x_start + i]);
result.push_back(solution.x[y_start + i]);
}

return result;
Expand Down

0 comments on commit 4a5562e

Please sign in to comment.