1#ifndef ROBOTOC_IMPACT_STAGE_HPP_
2#define ROBOTOC_IMPACT_STAGE_HPP_
36 const std::shared_ptr<Constraints>& constraints,
37 const std::shared_ptr<ContactSequence>& contact_sequence);
Stack of the inequality constraints. Composed by constraint components that inherits ConstraintCompon...
Definition: constraints.hpp:30
Stack of the cost function. Composed by cost function components that inherits CostFunctionComponentB...
Definition: cost_function.hpp:30
Impact stage computations for optimal control problems.
Definition: impact_stage.hpp:27
void updateDual(const double dual_step_size, OCPData &data) const
Updates dual variables of this stage.
double maxDualStepSize(const OCPData &data) const
Returns maximum stap size of the dual variables that satisfies the inequality constraints.
ImpactStage(const std::shared_ptr< CostFunction > &cost, const std::shared_ptr< Constraints > &constraints, const std::shared_ptr< ContactSequence > &contact_sequence)
Constructs the impact stage.
~ImpactStage()=default
Default destructor.
double maxPrimalStepSize(const OCPData &data) const
Returns maximum stap size of the primal variables that satisfies the inequality constraints.
void updatePrimal(const Robot &robot, const double primal_step_size, const SplitDirection &d, SplitSolution &s, OCPData &data) const
Updates primal variables of this stage.
void evalOCP(Robot &robot, const GridInfo &grid_info, const SplitSolution &s, const SplitSolution &s_next, OCPData &data, SplitKKTResidual &kkt_residual) const
Computes the stage cost and constraint violation.
OCPData createData(const Robot &robot) const
Creates the data.
void expandPrimal(const GridInfo &grid_info, OCPData &data, SplitDirection &d) const
Expands the condensed primal variables, i.e., computes the Newton direction of the condensed primal v...
ImpactStage(ImpactStage &&) noexcept=default
Default move constructor.
void evalKKT(Robot &robot, const GridInfo &grid_info, const Eigen::VectorXd &q_prev, const SplitSolution &s, const SplitSolution &s_next, OCPData &data, SplitKKTMatrix &kkt_matrix, SplitKKTResidual &kkt_residual) const
Computes the KKT residual and matrix of this stage.
void initConstraints(Robot &robot, const GridInfo &grid_info, const SplitSolution &s, OCPData &data) const
Initializes the constraints, i.e., set slack and dual variables.
bool isFeasible(Robot &robot, const GridInfo &grid_info, const SplitSolution &s, OCPData &data) const
Checks whether the solution is feasible under inequality constraints.
void expandDual(const GridInfo &grid_info, OCPData &data, const SplitDirection &d_next, SplitDirection &d) const
Expands the condensed dual variables, i.e., computes the Newton direction of the condensed dual varia...
ImpactStage & operator=(const ImpactStage &)=default
Default copy assign operator.
ImpactStage(const ImpactStage &)=default
Default copy constructor.
ImpactStage()
Default constructor.
Dynamics and kinematics model of robots. Wraps pinocchio::Model and pinocchio::Data....
Definition: robot.hpp:32
Newton direction of the solution to the optimal control problem split into a time stage.
Definition: split_direction.hpp:20
The KKT matrix split into a time stage.
Definition: split_kkt_matrix.hpp:18
KKT residual split into each time stage.
Definition: split_kkt_residual.hpp:18
Solution to the optimal control problem split into a time stage.
Definition: split_solution.hpp:20
Definition: constraint_component_base.hpp:17
Grid information.
Definition: grid_info.hpp:24
A data structure for an optimal control problem.
Definition: ocp_data.hpp:18