Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/CCC/DdpCentroidal.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,5 +362,8 @@ class DdpCentroidal

//! Force scale limits (i.e., limits of \f$\lambda_i\f$ in the order of lower, upper)
std::array<double, 2> force_scale_limits_ = {0.0, 1e6};

//! Latest returned value from DDP solver
bool ddp_solved_ = false;
};
} // namespace CCC
4 changes: 2 additions & 2 deletions src/DdpCentroidal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ Eigen::VectorXd DdpCentroidal::planOnce(const std::function<MotionParam(double)>
double t = current_time + i * ddp_problem_->dt();
current_u_list.push_back(DdpProblem::InputDimVector::Zero(ddp_problem_->inputDim(t)));
}
ddp_solver_->solve(current_time, initial_param.toState(ddp_problem_->mass_), current_u_list);
ddp_solved_ = ddp_solver_->solve(current_time, initial_param.toState(ddp_problem_->mass_), current_u_list);
}
else
{
ddp_solver_->solve(current_time, initial_param.toState(ddp_problem_->mass_), initial_param.u_list);
ddp_solved_ = ddp_solver_->solve(current_time, initial_param.toState(ddp_problem_->mass_), initial_param.u_list);
}

return ddp_solver_->controlData().u_list[0];
Expand Down
Loading