1#ifndef ROBOTOC_UNCONSTR_PARNMPC_STAGE_HPP_
2#define ROBOTOC_UNCONSTR_PARNMPC_STAGE_HPP_
37 const std::shared_ptr<CostFunction>& cost,
38 const std::shared_ptr<Constraints>& constraints);
107 const Eigen::VectorXd& q_prev, const Eigen::VectorXd& v_prev,
123 const Eigen::VectorXd& q_prev, const Eigen::VectorXd& v_prev,
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
The terminal stage of ParNMPC for unconstrained rigid-body systems.
Definition: parnmpc_terminal_stage.hpp:28
double maxPrimalStepSize(const UnconstrOCPData &data) const
Computes the maximum primal step size.
void updatePrimal(const Robot &robot, const double primal_step_size, const SplitDirection &d, SplitSolution &s, UnconstrOCPData &data) const
Updates primal variables of this stage.
void evalOCP(Robot &robot, const GridInfo &grid_info, const Eigen::VectorXd &q_prev, const Eigen::VectorXd &v_prev, const SplitSolution &s, UnconstrOCPData &data, SplitKKTResidual &kkt_residual) const
Computes the stage cost and constraint violation.
void initConstraints(Robot &robot, const GridInfo &grid_info, const SplitSolution &s, UnconstrOCPData &data) const
Initializes the constraints, i.e., set slack and dual variables.
ParNMPCTerminalStage & operator=(const ParNMPCTerminalStage &)=default
Default copy assign operator.
ParNMPCTerminalStage(const ParNMPCTerminalStage &)=default
Default copy constructor.
UnconstrOCPData createData(const Robot &robot) const
Creates the data.
ParNMPCTerminalStage(const Robot &robot, const std::shared_ptr< CostFunction > &cost, const std::shared_ptr< Constraints > &constraints)
Constructs the terminal stage.
ParNMPCTerminalStage()
Default constructor.
void updateDual(const double dual_step_size, UnconstrOCPData &data) const
Updates dual variables of the inequality constraints.
ParNMPCTerminalStage(ParNMPCTerminalStage &&) noexcept=default
Default move constructor.
void expandPrimalAndDual(const double dt, const SplitKKTMatrix &kkt_matrix, const SplitKKTResidual &kkt_residual, UnconstrOCPData &data, SplitDirection &d) const
Expands the primal and dual variables, i.e., computes the Newton direction of the condensed variables...
void evalKKT(Robot &robot, const GridInfo &grid_info, const Eigen::VectorXd &q_prev, const Eigen::VectorXd &v_prev, const SplitSolution &s, UnconstrOCPData &data, SplitKKTMatrix &kkt_matrix, SplitKKTResidual &kkt_residual) const
Computes the KKT matrix and residual of this stage.
bool isFeasible(Robot &robot, const GridInfo &grid_info, const SplitSolution &s, UnconstrOCPData &data) const
Checks whether the solution is feasible under inequality constraints.
double maxDualStepSize(const UnconstrOCPData &data) const
Computes the maximum dual size.
void evalTerminalCostHessian(Robot &robot, const GridInfo &grid_info, const SplitSolution &s, UnconstrOCPData &data, SplitKKTMatrix &kkt_matrix, SplitKKTResidual &kkt_residual) const
Computes the terminal cost Hessian to initialize the auxiliary matrices for backward correction.
~ParNMPCTerminalStage()=default
Default destructor.
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
Data structure for the optimal control problem of unconstrained rigid-body systems.
Definition: unconstr_ocp_data.hpp:17