1#ifndef ROBOTOC_LQR_POLICY_HPP_
2#define ROBOTOC_LQR_POLICY_HPP_
19 = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
27 k(Eigen::VectorXd::
Zero(robot.dimu())),
28 T(Eigen::VectorXd::
Zero(robot.dimu())),
29 W(Eigen::VectorXd::
Zero(robot.dimu())),
99 return K.topLeftCorner(dimu_, dimv_);
107 const Eigen::Block<const MatrixXdRowMajor>
Kv()
const {
108 return K.topRightCorner(dimu_, dimv_);
117 if (!
K.isApprox(other.
K))
return false;
118 if (!
k.isApprox(other.
k))
return false;
119 if (!
T.isApprox(other.
T))
return false;
120 if (!
W.isApprox(other.
W))
return false;
The state feedback and feedforward policy of LQR subproblem at a time stage.
Definition: lqr_policy.hpp:16
MatrixXdRowMajor K
State feedback gain matrix. Size is Robot::dimu() x 2 * Robot::dimv().
Definition: lqr_policy.hpp:76
LQRPolicy & operator=(const LQRPolicy &)=default
Default copy operator.
const Eigen::Block< const MatrixXdRowMajor > Kq() const
State feedback gain matrix w.r.t. the configuration q. Size is Robot::dimu() x Robot::dimv().
Definition: lqr_policy.hpp:98
LQRPolicy(const LQRPolicy &)=default
Default copy constructor.
LQRPolicy(const Robot &robot)
Constructs LQR gain and feedforward term.
Definition: lqr_policy.hpp:25
Eigen::VectorXd k
Feedforward term. Size is Robot::dimu().
Definition: lqr_policy.hpp:81
Eigen::VectorXd W
Feedback gain w.r.t the next switching time. Size is Robot::dimu().
Definition: lqr_policy.hpp:91
LQRPolicy()
Default constructor.
Definition: lqr_policy.hpp:37
~LQRPolicy()
Destructor.
Definition: lqr_policy.hpp:49
bool isApprox(const LQRPolicy &other) const
Checks the equivalence of two LQRPolicy.
Definition: lqr_policy.hpp:116
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixXdRowMajor
Definition: lqr_policy.hpp:19
LQRPolicy(LQRPolicy &&) noexcept=default
Default move constructor.
Eigen::VectorXd T
Feedback gain w.r.t the switching time. Size is Robot::dimu().
Definition: lqr_policy.hpp:86
const Eigen::Block< const MatrixXdRowMajor > Kv() const
State feedback gain matrix w.r.t. the velocity v. Size is Robot::dimu() x Robot::dimv().
Definition: lqr_policy.hpp:107
Dynamics and kinematics model of robots. Wraps pinocchio::Model and pinocchio::Data....
Definition: robot.hpp:32
Definition: constraint_component_base.hpp:17