1#ifndef ROBOTOC_SPLIT_KKT_RESIDUAL_HPP_
2#define ROBOTOC_SPLIT_KKT_RESIDUAL_HPP_
78 Eigen::VectorBlock<Eigen::VectorXd>
Fq();
83 const Eigen::VectorBlock<const Eigen::VectorXd>
Fq() const;
90 Eigen::VectorBlock<Eigen::VectorXd>
Fv();
95 const Eigen::VectorBlock<const Eigen::VectorXd>
Fv() const;
102 Eigen::VectorBlock<Eigen::VectorXd>
P();
107 const Eigen::VectorBlock<const Eigen::VectorXd>
P() const;
118 Eigen::VectorBlock<Eigen::VectorXd>
lq();
123 const Eigen::VectorBlock<const Eigen::VectorXd>
lq() const;
129 Eigen::VectorBlock<Eigen::VectorXd>
lv();
134 const Eigen::VectorBlock<const Eigen::VectorXd>
lv() const;
158 Eigen::VectorBlock<Eigen::VectorXd>
lf();
163 const Eigen::VectorBlock<const Eigen::VectorXd>
lf() const;
281 void disp(std::ostream& os) const;
283 friend std::ostream& operator<<(std::ostream& os,
287 Eigen::VectorXd P_full_, lf_full_;
288 int dimv_, dimu_, dimf_, dims_;
294#include "robotoc/core/split_kkt_residual.hxx"
Impact status of robot model. Wrapper of ContactStatus to treat impacts.
Definition: impact_status.hpp:21
Dynamics and kinematics model of robots. Wraps pinocchio::Model and pinocchio::Data....
Definition: robot.hpp:32
KKT residual split into each time stage.
Definition: split_kkt_residual.hpp:18
SplitKKTResidual(SplitKKTResidual &&) noexcept=default
Default move constructor.
SplitKKTResidual(const SplitKKTResidual &)=default
Default copy constructor.
void disp(std::ostream &os) const
Displays the split KKT residual onto a ostream.
SplitKKTResidual & operator=(const SplitKKTResidual &)=default
Default copy operator.
Eigen::VectorBlock< Eigen::VectorXd > Fq()
Residual in the state equation w.r.t. the configuration q.
Definition: split_kkt_residual.hxx:25
Eigen::VectorXd lu
KKT residual w.r.t. the control input torques u. Size is Robot::dimu().
Definition: split_kkt_residual.hpp:151
Eigen::VectorBlock< Eigen::VectorXd > lf()
KKT residual w.r.t. the stack of the contact forces f.
Definition: split_kkt_residual.hxx:79
double dualFeasibility() const
Returns the lp norm of the dual feasibility. Default norm is l1-norm. You can also specify l-infty no...
Definition: split_kkt_residual.hxx:118
double KKTError() const
Returns the squared norm of the KKT residual, that is, the primal and dual residual.
Definition: split_kkt_residual.hxx:90
static SplitKKTResidual Random(const Robot &robot)
Generates split KKT residual filled randomly.
void setSwitchingConstraintDimension(const int dims)
Sets the dimension of the switching constraint.
Definition: split_kkt_residual.hxx:18
SplitKKTResidual(const Robot &robot)
Construct a split KKT residual.
Eigen::VectorBlock< Eigen::VectorXd > lv()
KKT residual w.r.t. the joint velocity v.
Definition: split_kkt_residual.hxx:68
bool hasNaN() const
Checks this has at least one NaN.
Eigen::VectorBlock< Eigen::VectorXd > Fv()
Residual in the state equation w.r.t. the velocity v.
Definition: split_kkt_residual.hxx:36
bool isApprox(const SplitKKTResidual &other) const
Checks the equivalence of two SplitKKTResidual.
void setContactDimension(const int dimf)
Sets contact status, i.e., set dimension of the contact forces.
Definition: split_kkt_residual.hxx:11
bool isDimensionConsistent() const
Checks dimensional consistency of each component.
Eigen::VectorBlock< Eigen::VectorXd > P()
Residual in the switching constraint.
Definition: split_kkt_residual.hxx:47
void setRandom()
Set by random value based on the current contact status.
Eigen::VectorXd ldv
KKT residual w.r.t. the impact change in the velocity ddv. Size is Robot::dimv().
Definition: split_kkt_residual.hpp:145
Eigen::VectorXd Fx
Residual in the state equation. Size is 2 * Robot::dimv().
Definition: split_kkt_residual.hpp:71
SplitKKTResidual()
Default constructor.
double primalFeasibility() const
Returns the lp norm of the primal feasibility, i.e., the constraint violation. Default norm is l1-nor...
Definition: split_kkt_residual.hxx:108
int dims() const
Returns the dimension of the stack of the contact forces at the current contact status.
Definition: split_kkt_residual.hxx:151
Eigen::VectorXd lx
KKT Residual w.r.t. the state x. Size is 2 * Robot::dimv().
Definition: split_kkt_residual.hpp:112
Eigen::VectorBlock< Eigen::VectorXd > lq()
KKT residual w.r.t. the configuration q.
Definition: split_kkt_residual.hxx:57
~SplitKKTResidual()=default
Default destructor.
void setZero()
Sets the split KKT residual zero.
Definition: split_kkt_residual.hxx:130
double h
KKT residual w.r.t. the switching time, that is, this is the value of the Hamiltonian.
Definition: split_kkt_residual.hpp:169
int dimf() const
Returns the dimension of the stack of the contact forces at the current contact status.
Definition: split_kkt_residual.hxx:146
Eigen::VectorXd la
KKT residual w.r.t. the acceleration a. Size is Robot::dimv().
Definition: split_kkt_residual.hpp:139
Definition: constraint_component_base.hpp:17