robotoc
robotoc - efficient ROBOT Optimal Control solvers
|
The KKT matrix split into a time stage. More...
#include <split_kkt_matrix.hpp>
Public Member Functions | |
SplitKKTMatrix (const Robot &robot) | |
Construct a split KKT matrix. More... | |
SplitKKTMatrix () | |
Default constructor. More... | |
~SplitKKTMatrix ()=default | |
Default destructor. More... | |
SplitKKTMatrix (const SplitKKTMatrix &)=default | |
Default copy constructor. More... | |
SplitKKTMatrix & | operator= (const SplitKKTMatrix &)=default |
Default copy operator. More... | |
SplitKKTMatrix (SplitKKTMatrix &&) noexcept=default | |
Default move constructor. More... | |
SplitKKTMatrix & | operator= (SplitKKTMatrix &&) noexcept=default |
Default move assign operator. More... | |
void | setContactDimension (const int dimf) |
Sets contact status, i.e., set dimension of the contact forces. More... | |
void | setSwitchingConstraintDimension (const int dims) |
Sets the dimension of the switching constraint. More... | |
Eigen::Block< Eigen::MatrixXd > | Fqq () |
Jacobian of the state equation (w.r.t. q) w.r.t. q. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Fqq () const |
const version of SplitKKTMatrix::Fqq(). More... | |
Eigen::Block< Eigen::MatrixXd > | Fqv () |
Jacobian of the state equation (w.r.t. q) w.r.t. v. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Fqv () const |
const version of SplitKKTMatrix::Fqv(). More... | |
Eigen::Block< Eigen::MatrixXd > | Fvq () |
Jacobian of the state equation (w.r.t. v) w.r.t. q. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Fvq () const |
const version of SplitKKTMatrix::Fvq(). More... | |
Eigen::Block< Eigen::MatrixXd > | Fvv () |
Jacobian of the state equation (w.r.t. v) to v. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Fvv () const |
const version of SplitKKTMatrix::Fvv(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | fq () |
Derivative of the discrete-time state equation w.r.t. the configuration q w.r.t. the length of the time interval. More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | fq () const |
const version of SplitKKTMatrix::fq(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | fv () |
Derivative of the discrete-time state equation w.r.t. the velocity v w.r.t. the length of the time interval. More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | fv () const |
const version of SplitKKTMatrix::fv(). More... | |
Eigen::Block< Eigen::MatrixXd > | Phix () |
Jacobian of the swithcing constraint w.r.t. x. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Phix () const |
const version of SwitchingConstraintJacobian::Phix(). More... | |
Eigen::Block< Eigen::MatrixXd > | Phiq () |
Jacobian of the swithcing constraint w.r.t. q. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Phiq () const |
const version of SwitchingConstraintJacobian::Phiq(). More... | |
Eigen::Block< Eigen::MatrixXd > | Phiv () |
Jacobian of the swithcing constraint w.r.t. v. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Phiv () const |
const version of SwitchingConstraintJacobian::Phiv(). More... | |
Eigen::Block< Eigen::MatrixXd > | Phia () |
Jacobian of the swithcing constraint w.r.t. a. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Phia () const |
const version of SwitchingConstraintJacobian::Phia(). More... | |
Eigen::Block< Eigen::MatrixXd > | Phiu () |
Jacobian of the swithcing constraint w.r.t. u. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Phiu () const |
const version of SwitchingConstraintJacobian::Phiu(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | Phit () |
Jacobian of the swithcing constraint w.r.t. the switching time. More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | Phit () const |
const version of SwitchingConstraintJacobian::Phit(). More... | |
Eigen::Block< Eigen::MatrixXd > | Qqq () |
Hessian w.r.t. the configuration q and configuration q. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Qqq () const |
const version of SplitKKTMatrix::Qqq(). More... | |
Eigen::Block< Eigen::MatrixXd > | Qqv () |
Hessian w.r.t. the configuration q and joint velocity v. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Qqv () const |
const version of SplitKKTMatrix::Qqv(). More... | |
Eigen::Block< Eigen::MatrixXd > | Qvq () |
Hessian w.r.t. the joint velocity v and configuration q. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Qvq () const |
const version of SplitKKTMatrix::Qvq(). More... | |
Eigen::Block< Eigen::MatrixXd > | Qvv () |
Hessian w.r.t. the joint velocity v and joint velocity v. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Qvv () const |
const version of SplitKKTMatrix::Qvv(). More... | |
Eigen::Block< Eigen::MatrixXd > | Qqu () |
Hessian of the Lagrangian with respect to the configuration q and control input torques u. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Qqu () const |
const version of SplitKKTMatrix::Qqu(). More... | |
Eigen::Block< Eigen::MatrixXd > | Qvu () |
Hessian of the Lagrangian with respect to the velocity v and control input torques u. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Qvu () const |
const version of SplitKKTMatrix::Qvu(). More... | |
Eigen::Block< Eigen::MatrixXd > | Qff () |
Hessian of the Lagrangian with respect to the contact forces f. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Qff () const |
const version of SplitKKTMatrix::Qff(). More... | |
Eigen::Block< Eigen::MatrixXd > | Qqf () |
Hessian of the Lagrangian with respect to the configuration and contact forces. More... | |
const Eigen::Block< const Eigen::MatrixXd > | Qqf () const |
const version of SplitKKTMatrix::Qqf(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | hq () |
Derivative of the Hamiltonian w.r.t. the configuration q. More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | hq () const |
const version of SplitKKTMatrix::hq(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | hv () |
Derivative of the Hamiltonian w.r.t. the velocity v. More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | hv () const |
const version of SplitKKTMatrix::hv(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | hf () |
Derivative of the Hamiltonian w.r.t. the stack of the contact forces f. More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | hf () const |
const version of SplitKKTMatrix::hf(). More... | |
void | setZero () |
Set the all components zero. More... | |
int | dimf () const |
Returns the dimension of the stack of contact forces at the current contact status. More... | |
int | dims () const |
Returns the dimension of the stack of the contact forces at the current contact status. More... | |
bool | isDimensionConsistent () const |
Checks dimensional consistency of each component. More... | |
bool | isApprox (const SplitKKTMatrix &other) const |
Checks the equivalence of two SplitKKTMatrix. More... | |
bool | hasNaN () const |
Checks this has at least one NaN. More... | |
void | setRandom () |
Set by random value based on the current contact status. More... | |
void | setRandom (const ContactStatus &contact_status) |
Set by random value. Contact status is reset. More... | |
void | disp (std::ostream &os) const |
Displays the split KKT matrix onto a ostream. More... | |
Static Public Member Functions | |
static SplitKKTMatrix | Random (const Robot &robot) |
Generates split KKT matrix filled randomly. More... | |
static SplitKKTMatrix | Random (const Robot &robot, const ContactStatus &contact_status) |
Generates split KKT matrix filled randomly. More... | |
Public Attributes | |
Eigen::MatrixXd | Fxx |
Jacobian of the state equation w.r.t. the state x. More... | |
Eigen::MatrixXd | Fvu |
Jacobian of the state equation (w.r.t. v) w.r.t. u. More... | |
Eigen::VectorXd | fx |
Derivative of the discrete time state equation w.r.t. the length of the time interval. More... | |
Eigen::MatrixXd | Qxx |
Hessian w.r.t. to the state x and state x. More... | |
Eigen::MatrixXd | Qaa |
Hessian w.r.t. the acceleration a and acceleration a. More... | |
Eigen::MatrixXd | Qdvdv |
Hessian w.r.t. the impact change in the velocity ddv. More... | |
Eigen::MatrixXd | Qxu |
Hessian w.r.t. the state x and the control input torques u. More... | |
Eigen::MatrixXd | Quu |
Hessian w.r.t. the control input torques u and the control input torques u. More... | |
double | Qtt |
Hessian of the Lagrangian w.r.t. the switching time. More... | |
double | Qtt_prev |
Hessian of the Lagrangian w.r.t. the previoius switching time. More... | |
Eigen::VectorXd | hx |
Derivative of the Hamiltonian w.r.t. the state. More... | |
Eigen::VectorXd | hu |
Derivative of the Hamiltonian w.r.t. the control input. More... | |
Eigen::VectorXd | ha |
Derivative of the Hamiltonian w.r.t. the acceleration. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SplitKKTMatrix &kkt_matrix) |
The KKT matrix split into a time stage.
robotoc::SplitKKTMatrix::SplitKKTMatrix | ( | const Robot & | robot | ) |
Construct a split KKT matrix.
[in] | robot | Robot model. |
robotoc::SplitKKTMatrix::SplitKKTMatrix | ( | ) |
Default constructor.
|
default |
Default destructor.
|
default |
Default copy constructor.
|
defaultnoexcept |
Default move constructor.
|
inline |
Returns the dimension of the stack of contact forces at the current contact status.
|
inline |
Returns the dimension of the stack of the contact forces at the current contact status.
void robotoc::SplitKKTMatrix::disp | ( | std::ostream & | os | ) | const |
Displays the split KKT matrix onto a ostream.
|
inline |
Derivative of the discrete-time state equation w.r.t. the configuration q w.r.t. the length of the time interval.
|
inline |
const version of SplitKKTMatrix::fq().
|
inline |
Jacobian of the state equation (w.r.t. q) w.r.t. q.
|
inline |
const version of SplitKKTMatrix::Fqq().
|
inline |
Jacobian of the state equation (w.r.t. q) w.r.t. v.
|
inline |
const version of SplitKKTMatrix::Fqv().
|
inline |
Derivative of the discrete-time state equation w.r.t. the velocity v w.r.t. the length of the time interval.
|
inline |
const version of SplitKKTMatrix::fv().
|
inline |
Jacobian of the state equation (w.r.t. v) w.r.t. q.
|
inline |
const version of SplitKKTMatrix::Fvq().
|
inline |
Jacobian of the state equation (w.r.t. v) to v.
|
inline |
const version of SplitKKTMatrix::Fvv().
bool robotoc::SplitKKTMatrix::hasNaN | ( | ) | const |
Checks this has at least one NaN.
|
inline |
Derivative of the Hamiltonian w.r.t. the stack of the contact forces f.
|
inline |
const version of SplitKKTMatrix::hf().
|
inline |
Derivative of the Hamiltonian w.r.t. the configuration q.
|
inline |
const version of SplitKKTMatrix::hq().
|
inline |
Derivative of the Hamiltonian w.r.t. the velocity v.
|
inline |
const version of SplitKKTMatrix::hv().
bool robotoc::SplitKKTMatrix::isApprox | ( | const SplitKKTMatrix & | other | ) | const |
Checks the equivalence of two SplitKKTMatrix.
[in] | other | Other object. |
bool robotoc::SplitKKTMatrix::isDimensionConsistent | ( | ) | const |
Checks dimensional consistency of each component.
|
default |
Default copy operator.
|
defaultnoexcept |
Default move assign operator.
|
inline |
Jacobian of the swithcing constraint w.r.t. a.
|
inline |
const version of SwitchingConstraintJacobian::Phia().
|
inline |
Jacobian of the swithcing constraint w.r.t. q.
|
inline |
const version of SwitchingConstraintJacobian::Phiq().
|
inline |
Jacobian of the swithcing constraint w.r.t. the switching time.
|
inline |
const version of SwitchingConstraintJacobian::Phit().
|
inline |
Jacobian of the swithcing constraint w.r.t. u.
|
inline |
const version of SwitchingConstraintJacobian::Phiu().
|
inline |
Jacobian of the swithcing constraint w.r.t. v.
|
inline |
const version of SwitchingConstraintJacobian::Phiv().
|
inline |
Jacobian of the swithcing constraint w.r.t. x.
|
inline |
const version of SwitchingConstraintJacobian::Phix().
|
inline |
Hessian of the Lagrangian with respect to the contact forces f.
|
inline |
const version of SplitKKTMatrix::Qff().
|
inline |
Hessian of the Lagrangian with respect to the configuration and contact forces.
|
inline |
const version of SplitKKTMatrix::Qqf().
|
inline |
Hessian w.r.t. the configuration q and configuration q.
|
inline |
const version of SplitKKTMatrix::Qqq().
|
inline |
Hessian of the Lagrangian with respect to the configuration q and control input torques u.
|
inline |
const version of SplitKKTMatrix::Qqu().
|
inline |
Hessian w.r.t. the configuration q and joint velocity v.
|
inline |
const version of SplitKKTMatrix::Qqv().
|
inline |
Hessian w.r.t. the joint velocity v and configuration q.
|
inline |
const version of SplitKKTMatrix::Qvq().
|
inline |
Hessian of the Lagrangian with respect to the velocity v and control input torques u.
|
inline |
const version of SplitKKTMatrix::Qvu().
|
inline |
Hessian w.r.t. the joint velocity v and joint velocity v.
|
inline |
const version of SplitKKTMatrix::Qvv().
|
static |
Generates split KKT matrix filled randomly.
[in] | robot | Robot model. |
|
static |
Generates split KKT matrix filled randomly.
[in] | robot | Robot model. |
[in] | contact_status | Contact status. |
|
inline |
Sets contact status, i.e., set dimension of the contact forces.
[in] | dimf | The dimension of the contact. Must be non-negative. |
void robotoc::SplitKKTMatrix::setRandom | ( | ) |
Set by random value based on the current contact status.
void robotoc::SplitKKTMatrix::setRandom | ( | const ContactStatus & | contact_status | ) |
Set by random value. Contact status is reset.
[in] | contact_status | Contact status. |
|
inline |
Sets the dimension of the switching constraint.
[in] | dims | The dimension of the switching constraint. Must be non-negative. |
|
inline |
Set the all components zero.
|
friend |
Eigen::MatrixXd robotoc::SplitKKTMatrix::Fvu |
Jacobian of the state equation (w.r.t. v) w.r.t. u.
Eigen::VectorXd robotoc::SplitKKTMatrix::fx |
Derivative of the discrete time state equation w.r.t. the length of the time interval.
Eigen::MatrixXd robotoc::SplitKKTMatrix::Fxx |
Jacobian of the state equation w.r.t. the state x.
Eigen::VectorXd robotoc::SplitKKTMatrix::ha |
Derivative of the Hamiltonian w.r.t. the acceleration.
Eigen::VectorXd robotoc::SplitKKTMatrix::hu |
Derivative of the Hamiltonian w.r.t. the control input.
Eigen::VectorXd robotoc::SplitKKTMatrix::hx |
Derivative of the Hamiltonian w.r.t. the state.
Eigen::MatrixXd robotoc::SplitKKTMatrix::Qaa |
Hessian w.r.t. the acceleration a and acceleration a.
Eigen::MatrixXd robotoc::SplitKKTMatrix::Qdvdv |
Hessian w.r.t. the impact change in the velocity ddv.
double robotoc::SplitKKTMatrix::Qtt |
Hessian of the Lagrangian w.r.t. the switching time.
double robotoc::SplitKKTMatrix::Qtt_prev |
Hessian of the Lagrangian w.r.t. the previoius switching time.
Eigen::MatrixXd robotoc::SplitKKTMatrix::Quu |
Hessian w.r.t. the control input torques u and the control input torques u.
Eigen::MatrixXd robotoc::SplitKKTMatrix::Qxu |
Hessian w.r.t. the state x and the control input torques u.
Eigen::MatrixXd robotoc::SplitKKTMatrix::Qxx |
Hessian w.r.t. to the state x and state x.