8 #include <ct/optcon/nlp/Nlp> 16 template <
typename KINEMATICS,
typename SCALAR =
double>
20 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
36 this->
optVariables_ = std::shared_ptr<ct::optcon::tpl::OptVector<SCALAR>>(
46 this->
constraints_ = std::shared_ptr<IKConstraintsContainer<KINEMATICS, SCALAR>>(
50 ~IKNLP()
override =
default;
58 std::cout <<
"IKNLP Solution: " << std::endl
59 << this->
optVariables_->getOptimizationVars().transpose() << std::endl;
Inverse Kinematics cost evaluator for NLP.
Definition: IKCostEvaluator.h:21
JointPosition_t getSolution()
Definition: IKNLP.h:54
KINEMATICS Kinematics_t
Definition: IKNLP.h:23
typename InverseKinematicsBase::JointPosition_t JointPosition_t
Definition: IKNLP.h:26
std::shared_ptr< ct::rbd::IKCostEvaluator< KINEMATICS, SCALAR > > getIKCostEvaluator()
Definition: IKNLP.h:63
std::shared_ptr< ct::rbd::IKConstraintsContainer< KINEMATICS, SCALAR > > getIKConstraintContainer()
Definition: IKNLP.h:68
void printSolution() const
print the solution to command line
Definition: IKNLP.h:56
void setInitialGuess(const JointPosition_t &q_init)
Definition: IKNLP.h:62
std::shared_ptr< DiscreteCostEvaluatorBase< SCALAR > > costEvaluator_
~IKNLP() override=default
std::shared_ptr< OptVector< SCALAR > > optVariables_
CppAD::AD< CppAD::cg::CG< double > > SCALAR
Definition: InverseKinematicsBase.h:25
typename InverseKinematicsBase::RigidBodyPoseTpl RigidBodyPoseTpl
Definition: IKNLP.h:28
SCALAR Scalar_t
Definition: IKNLP.h:22
Inverse Kinematics constraint container.
Definition: IKConstraintContainer.h:20
typename JointState< NJOINTS, SCALAR >::Position JointPosition_t
Definition: InverseKinematicsBase.h:30
typename InverseKinematicsBase::JointPositionsVector_t JointPositionsVector_t
Definition: IKNLP.h:27
tpl::RigidBodyPose< SCALAR > RigidBodyPoseTpl
Definition: InverseKinematicsBase.h:32
IKNLP(std::shared_ptr< ct::rbd::IKCostEvaluator< KINEMATICS, SCALAR >> costEvaluator, const JointPosition_t &lowerBound, const JointPosition_t &upperBound)
constructor
Definition: IKNLP.h:31
void updateProblem() override
Definition: IKNLP.h:52
std::shared_ptr< DiscreteConstraintContainerBase< SCALAR > > constraints_
std::vector< JointPosition_t, Eigen::aligned_allocator< JointPosition_t > > JointPositionsVector_t
Definition: InverseKinematicsBase.h:31