9 #include "crocoddyl/core/utils/callbacks.hpp" 13 CallbackVerbose::CallbackVerbose(VerboseLevel level) : CallbackAbstract(), level(level) {}
15 CallbackVerbose::~CallbackVerbose() {}
21 std::cout <<
"iter \t cost \t stop \t grad \t xreg";
22 std::cout <<
" \t ureg \t step \t feas\n";
26 std::cout <<
"iter \t cost \t stop \t grad \t xreg";
27 std::cout <<
" \t ureg \t step \t feas \tdV-exp \t dV\n";
31 std::cout <<
"iter \t cost \t stop \t grad \t xreg";
32 std::cout <<
" \t ureg \t step \t feas\n";
39 std::cout << std::setw(4) << solver.
get_iter() <<
" ";
40 std::cout << std::scientific << std::setprecision(5) << solver.
get_cost() <<
" ";
41 std::cout << solver.
get_stop() <<
" " << -solver.
get_d()[1] <<
" ";
43 std::cout << std::fixed << std::setprecision(4) << solver.
get_steplength() <<
" ";
48 std::cout << std::setw(4) << solver.
get_iter() <<
" ";
49 std::cout << std::scientific << std::setprecision(5) << solver.
get_cost() <<
" ";
50 std::cout << solver.
get_stop() <<
" " << -solver.
get_d()[1] <<
" ";
52 std::cout << std::fixed << std::setprecision(4) << solver.
get_steplength() <<
" ";
54 std::cout << std::scientific << std::setprecision(5) << solver.
get_dVexp() <<
" ";
55 std::cout << solver.
get_dV() <<
'\n';
59 std::cout << std::setw(4) << solver.
get_iter() <<
" ";
60 std::cout << std::scientific << std::setprecision(5) << solver.
get_cost() <<
" ";
61 std::cout << solver.
get_stop() <<
" " << -solver.
get_d()[1] <<
" ";
63 std::cout << std::fixed << std::setprecision(4) << solver.
get_steplength() <<
" ";
const double & get_dV() const
Return the cost reduction.
const double & get_steplength() const
Return the step length.
const std::size_t & get_iter() const
Return the number of iterations performed by the solver.
Abstract class for optimal control solvers.
const double & get_cost() const
Return the total cost.
const double & get_stop() const
Return the value computed by stoppingCriteria()
const double & get_dVexp() const
Return the expected cost reduction.
virtual void operator()(SolverAbstract &solver)
Run the callback function given a solver.
const double & get_ureg() const
Return the control regularization value.
const Eigen::Vector2d & get_d() const
Return the LQ approximation of the expected improvement.
const double & get_xreg() const
Return the state regularization value.
const bool & get_is_feasible() const
Return the feasibility status of the trajectory.