Compute the state box-constraint feasibility from a given state trajectory.
DEPRECATED ("Do not use this threshold. It is not needed by our solvers", Scalar get_th_gaptol() const { return th_gaptol_;}) FeasibilityNorm get_feasnorm() const
Return the threshold for accepting a gap as non-zero.
DEPRECATED ("Do not use this threshold. It is not needed by our solvers", void set_th_gaptol(const Scalar th_gaptol);) void set_feasnorm(const FeasibilityNorm feas_norm)
Modify the threshold for accepting a gap as non-zero.
DEPRECATED ("Use get_preg for primal-variable regularization", Scalar get_xreg() const { return preg_;}) DEPRECATED("Use get_preg for primal-variable regularization"
DEPRECATED ("Use set_preg for primal-variable regularization", void set_xreg(const Scalar xreg) { if(xreg< Scalar(0.)) { throw_pretty("Invalid argument: "<< "xreg value has to be positive.");} xreg_=xreg;preg_=xreg;}) DEPRECATED("Use set_preg for primal-variable regularization"
const std::vector< Scalar > &
get_alphas () const
Return the set of step lengths using by the line-search procedure.
Scalar
get_cost () const
Return the cost for the current guess.
Scalar
get_dfeas () const
Return the reduction in the feasibility.
Scalar
get_dPhi () const
Return the reduction in the merit function .
Scalar
get_dPhiexp () const
Return the expected reduction in the merit function .
Scalar
get_dreg () const
Return the dual-variable regularization.
const std::vector< VectorXs > &
get_dus () const
Return the feedforward gains .
const Vector3s &
get_DV () const
Return the constant, linear, and quadratic terms of the expected improvement.
Scalar
get_dV () const
Return the reduction in the cost function .
Scalar
get_dVexp () const
Return the expected reduction in the cost function .
const std::vector< VectorXs > &
get_dxs () const
Return the linear update in .
Scalar
get_feas () const
Return the total feasibility for the current guess.
Scalar
get_ffeas () const
Return the dynamic feasibility for the current guess.
Scalar
get_ffeas_try () const
Return the dynamic feasibility for the current step length.
const std::vector< VectorXs > &
get_fs () const
Return the dynamic infeasibility .
const std::vector< VectorXs > &
get_fs_try () const
Return the trail dynamic infeasibility .
Scalar
get_gfeas () const
Return the inequality feasibility for the current guess.
Scalar
get_gfeas_try () const
Return the inequality feasibility for the current step length.
Scalar
get_hfeas () const
Return the equality feasibility for the current guess.
Scalar
get_hfeas_try () const
Return the equality feasibility for the current step length.
bool
get_is_feasible () const
Return the feasibility status of the trajectory.
std::size_t
get_iter () const
Return the number of iterations performed by the solver.
This solver wraps Odyn’s sparse QP engine to solve Crocoddyl shooting problems with equality and inequality constraints. At each iteration it builds a sparse QP in computeQuadraticModel(), solves it with Odyn, and then maps the QP step back to state/control updates in computeSearchDirection() / tryStep(). The try step supports infeasible iterates (open dynamics gaps) and line-searches them, which improves globalization on hard-constrained problems. The expected improvement calculation also accounts for the dynamics gaps.
Build the local Quadratic Program (QP) for the current iterate.
The QP has the form
Here, x is the full decision vector over the trajectory and controls, and Q, c, A, b, G, h are the corresponding (sparse, structured) cost and constraint matrices/vectors induced by the problem’s temporal layout.
Decision vector ordering:
The sparsity pattern reflects time-coupling (dynamics and local costs/constraints).
Compute the dynamic feasibility for the current guess .
The feasibility can be computed using different norms (e.g, or norms). By default we use the norm, however, we can change the type of norm using set_feasnorm. Note that are the gaps on the dynamics, which are computed at each node as .
Compute the feasibility of the equality constraints for the current guess.
The feasibility can be computed using different norms (e.g, or norms). By default we use the norm, however, we can change the type of norm using set_feasnorm.
Compute the feasibility of the inequality constraints for the current guess.
The feasibility can be computed using different norms (e.g, or norms). By default we use the norm, however, we can change the type of norm using set_feasnorm.