Class GenericTask
Defined in File GenericTask.h
Inheritance Relationships
Base Type
public OpenSoT::Task< Eigen::MatrixXd, Eigen::VectorXd >
(Template Class Task)
Class Documentation
-
class GenericTask : public OpenSoT::Task<Eigen::MatrixXd, Eigen::VectorXd>
The GenericTask class implements a task where the A and b matrix can be updated outside the task itself, the task has the generic form:
||Ax - b|| + c’x
Public Types
-
typedef std::shared_ptr<GenericTask> Ptr
Public Functions
-
GenericTask(const std::string &task_id, const Eigen::MatrixXd &A, const Eigen::VectorXd &b)
GenericTask constructor.
- Parameters
task_id – name of the task
A – matrix
b – vector
-
GenericTask(const std::string &task_id, const Eigen::MatrixXd &A, const Eigen::VectorXd &b, const AffineHelper &var)
GenericTask constructor.
- Parameters
task_id – name of the task
A – matrix
b – vector
var – variable
-
~GenericTask()
-
virtual void _update()
Updates the A, b, Aeq, beq, Aineq, b*Bound matrices.
-
bool setA(const Eigen::MatrixXd &A)
setA update the A matrix of the task
- Parameters
A – matrix
- Returns
false if A.rows() != b.size()
-
bool setb(const Eigen::VectorXd &b)
setb update the b matrix of the task
- Parameters
b – vector
- Returns
false if b.size() != A.rows()
-
bool setAb(const Eigen::MatrixXd &A, const Eigen::VectorXd &b)
setAb update A and b of the task
- Parameters
A – matrix
b – vector
- Returns
false if A.rows() != b.size() NOTE: this is NOT RT-SAFE!
-
bool setc(const Eigen::VectorXd &c)
setc update the c of the task
- Parameters
c – vector
- Returns
false if c.size() != b.size()
-
void setHessianType(const HessianType hessian_type)
setHessianType
- Parameters
hessian_type – enum HessianType { HST_ZERO, < Hessian is zero matrix (i.e. LP formulation). HST_IDENTITY, < Hessian is identity matrix. HST_POSDEF, < Hessian is (strictly) positive definite. HST_POSDEF_NULLSPACE, < Hessian is positive definite on null space of active bounds/constraints. HST_SEMIDEF, < Hessian is positive semi-definite. HST_UNKNOWN < Hessian type is unknown. };
-
typedef std::shared_ptr<GenericTask> Ptr