29 #include "Eigen/Dense"
30 #include <Qontrol/Model/GenericModel.hpp>
31 #include <Qontrol/Utils/Size.hpp>
60 GenericTask(std::string name,
int task_dimension,
int optim_vector_dimension)
61 : name_{name}, task_dimension_{task_dimension},
62 optim_vector_dimension_{optim_vector_dimension} {
63 resize(task_dimension_, optim_vector_dimension);
65 optim_vector_dimension));
67 optim_vector_dimension));
81 std::shared_ptr<Model::GenericModel> model_ptr)
82 : name_{name}, task_dimension_{task_dimension},
83 optim_vector_dimension_{model_ptr_->getNrOfDegreesOfFreedom()},
84 model_ptr_{model_ptr} {
85 resize(task_dimension_, optim_vector_dimension_);
87 optim_vector_dimension_));
89 optim_vector_dimension_));
105 void resize(
int input_size,
int output_size);
113 void setE(Eigen::MatrixXd E);
121 void setf(Eigen::VectorXd f);
183 std::shared_ptr<Model::GenericModel> model_ptr_;
187 Eigen::MatrixXd selection_matrix_;
188 Eigen::MatrixXd weighting_matrix_;
190 int optim_vector_dimension_;
void setE(Eigen::MatrixXd E)
Set the matrix in .
Definition: GenericTask.cpp:24
Eigen::VectorXd getGradient()
Get the gradient vector.
Definition: GenericTask.cpp:20
void setWeightingMatrix(Eigen::MatrixXd weighting_matrix)
Set the task weighting matrix.
Definition: GenericTask.cpp:53
std::string getName()
Get the task name.
Definition: GenericTask.cpp:9
void setSelectionMatrix(Eigen::MatrixXd selection_matrix)
Set the task selection matrix.
Definition: GenericTask.cpp:45
void setf(Eigen::VectorXd f)
Set the vector in .
Definition: GenericTask.cpp:35
Eigen::MatrixXd getSelectionMatrix()
Get the selection matrix.
Definition: GenericTask.cpp:61
Eigen::MatrixXd getHessian()
Get the hessian matrix related to the task.
Definition: GenericTask.cpp:16
Represents a generic task.
Definition: GenericTask.hpp:47
Eigen::MatrixXd getWeightingMatrix()
Get the weighting matrix.
Definition: GenericTask.cpp:64
GenericTask(std::string name, int task_dimension, std::shared_ptr< Model::GenericModel > model_ptr)
Construct a new Base Task object.
Definition: GenericTask.hpp:80
virtual void update(double dt)
Update and . overrided by the considered implementation of the task.
Definition: GenericTask.hpp:128
GenericTask(std::string name, int task_dimension, int optim_vector_dimension)
Construct a new GenericTask object.
Definition: GenericTask.hpp:60
void resize(int input_size, int output_size)
Resize the matrix and vector according to the task.
Definition: GenericTask.cpp:11