19 _init(_fullStateType, _dofIndices, _stiffness, _damping);
36 _init(_fullStateType, _dofIndices, _stiffness, _damping);
43 void gOcraPartialPostureTaskManager::_init(
int _fullStateType, VectorXi& _dofIndices,
double _stiffness,
double _damping)
68 if (q.size() != featDesState->getSize())
70 throw std::runtime_error(
"[gOcraPartialPostureTaskManager::setPosture(Eigen::VectorXd&)] Input pose and required dimension does not match");
72 featDesState->set_q(q);
73 featDesState->set_qdot(Eigen::VectorXd::Zero(featDesState->getSize()));
74 featDesState->set_qddot(Eigen::VectorXd::Zero(featDesState->getSize()));
83 if (q.size() != featDesState->getSize())
85 throw std::runtime_error(
"[gOcraPartialPostureTaskManager::setPosture(Eigen::VectorXd&, Eigen::VectorXd&, Eigen::VectorXd&)] Input pose and required dimension does not match");
87 else if (qdot.size() != featDesState->getSize())
89 throw std::runtime_error(
"[gOcraPartialPostureTaskManager::setPosture(Eigen::VectorXd&, Eigen::VectorXd&, Eigen::VectorXd&)] Input pose velocity and required dimension does not match");
91 else if (qddot.size() != featDesState->getSize())
93 throw std::runtime_error(
"[gOcraPartialPostureTaskManager::setPosture(Eigen::VectorXd&, Eigen::VectorXd&, Eigen::VectorXd&)] Input pose acceleration and required dimension does not match");
96 featDesState->set_q(q);
97 featDesState->set_qdot(qdot);
98 featDesState->set_qddot(qddot);
Used to build tasks in a partial configuration space.
void setDamping(double B)
gOcraPartialPostureTaskManager(GHCJTController &ctrl, const ocra::Model &model, const std::string &taskName, int fullStateType, Eigen::VectorXi &dofIndices, double stiffness, double damping)
Task Manager for the Center of Mass (CoM) task with the gOcra Controllers.
gOcra Controller based on LQP solver for the ocra framework.
gocra::GHCJTController & ctrl
void setWeight(double weight)
void setStiffness(double K)
A partial state of the model.
void addTask(std::shared_ptr< Task > task)
void setPosture(Eigen::VectorXd &q)
void activateAsObjective()
GHCJTTask & createGHCJTTask(const std::string &name, Feature::Ptr feature, Feature::Ptr featureDes) const
const ocra::Model & model
A target for a model partial state.