14 template <
typename KINEMATICS,
typename SCALAR =
double>
18 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
20 using VectorXs = Eigen::Matrix<SCALAR, Eigen::Dynamic, 1>;
26 : optVector_(optVector)
28 lowerBounds_ = lowerBound;
29 upperBounds_ = upperBound;
36 contraints_.setZero();
37 contraints_ = optVector_->getOptimizationVars();
43 jacobian_.setConstant(static_cast<SCALAR>(1.0));
51 iRow_vec.resize(KINEMATICS::NJOINTS);
52 jCol_vec.resize(KINEMATICS::NJOINTS);
54 for (
size_t i = 0;
i < KINEMATICS::NJOINTS;
i++)
68 const Eigen::VectorXd& lambda,
69 Eigen::VectorXd& sparseHes)
override 79 std::shared_ptr<ct::optcon::tpl::OptVector<SCALAR>> optVector_;
80 Eigen::Matrix<SCALAR, KINEMATICS::NJOINTS, 1> contraints_;
81 Eigen::Matrix<SCALAR, KINEMATICS::NJOINTS, 1> jacobian_;
82 Eigen::Matrix<SCALAR, KINEMATICS::NJOINTS, 1> lowerBounds_;
83 Eigen::Matrix<SCALAR, KINEMATICS::NJOINTS, 1> upperBounds_;
VectorXs getLowerBound() override
Definition: JointLimitConstraints.h:74
typename ct::rbd::JointState< KINEMATICS::NJOINTS, SCALAR >::Position JointPosition
Definition: JointLimitConstraints.h:21
~JointLimitConstraints() override=default
joint state and joint velocity
Definition: JointState.h:21
const VectorXs getLowerBound() const
Definition: JointLimitConstraints.h:76
VectorXs getUpperBound() override
Definition: JointLimitConstraints.h:75
Inverse Kinematics joint limit constraints.
Definition: JointLimitConstraints.h:15
size_t getConstraintSize() override
Definition: JointLimitConstraints.h:47
JointLimitConstraints(std::shared_ptr< ct::optcon::tpl::OptVector< SCALAR >> optVector, const JointPosition &lowerBound, const JointPosition &upperBound)
Definition: JointLimitConstraints.h:23
void genSparsityPatternHessian(Eigen::VectorXi &iRow_vec, Eigen::VectorXi &jCol_vec) override
Definition: JointLimitConstraints.h:62
Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > VectorXs
Definition: JointLimitConstraints.h:20
VectorXs eval() override
Definition: JointLimitConstraints.h:34
size_t getNumNonZerosJacobian() override
Definition: JointLimitConstraints.h:48
const VectorXs getUpperBound() const
Definition: JointLimitConstraints.h:77
VectorXs evalSparseJacobian() override
Definition: JointLimitConstraints.h:41
void sparseHessianValues(const Eigen::VectorXd &optVec, const Eigen::VectorXd &lambda, Eigen::VectorXd &sparseHes) override
Definition: JointLimitConstraints.h:67
void genSparsityPattern(Eigen::VectorXi &iRow_vec, Eigen::VectorXi &jCol_vec) override
Definition: JointLimitConstraints.h:49