wbc
wbc::Task Class Referenceabstract

Abstract class to represent a generic task for a WBC optimization problem. More...

#include <Task.hpp>

Inheritance diagram for wbc::Task:
wbc::CoMAccelerationTask wbc::CoMVelocityTask wbc::ContactForceTask wbc::JointAccelerationTask wbc::JointVelocityTask wbc::SpatialAccelerationTask wbc::SpatialVelocityTask

Public Member Functions

 Task ()
 Default constructor.
 
 Task (TaskConfig config, RobotModelPtr robot_model, uint nv, TaskType type)
 Resizes all members.
 
 ~Task ()
 
void reset ()
 Reset task variables to initial values.
 
virtual void update ()=0
 Update Task matrices and vectors.
 
void setWeights (const Eigen::VectorXd &weights)
 Set task weights.
 
void setActivation (const double activation)
 Set task activation.
 

Public Attributes

TaskConfig config
 
Eigen::VectorXd y_ref
 
Eigen::VectorXd y_ref_world
 
Eigen::VectorXd weights
 
Eigen::VectorXd weights_world
 
double activation
 
Eigen::MatrixXd A
 
Eigen::MatrixXd Aw
 
uint nv
 
uint nj
 
TaskType type
 

Protected Attributes

RobotModelPtr robot_model
 

Detailed Description

Abstract class to represent a generic task for a WBC optimization problem.

Constructor & Destructor Documentation

◆ Task() [1/2]

wbc::Task::Task ( )

Default constructor.

◆ Task() [2/2]

wbc::Task::Task ( TaskConfig config,
RobotModelPtr robot_model,
uint nv,
TaskType type )

Resizes all members.

Parameters
ncNumber of task variables
njNumber of robot joints

◆ ~Task()

wbc::Task::~Task ( )

Member Function Documentation

◆ reset()

void wbc::Task::reset ( )

Reset task variables to initial values.

◆ setActivation()

void wbc::Task::setActivation ( const double activation)

Set task activation.

Parameters
activationValue has to be between 0 and 1. Can be used to activate(1)/deactivate(0) the task.

◆ setWeights()

void wbc::Task::setWeights ( const Eigen::VectorXd & weights)

Set task weights.

Parameters
weightsWeight vector. Size has to be same as number of task variables and all entries have to be >= 0

◆ update()

Member Data Documentation

◆ A

Eigen::MatrixXd wbc::Task::A

Task matrix

◆ activation

double wbc::Task::activation

Task activation. Has to be between 0 and 1. Will be multiplied with the task weights. Can be used to (smoothly) switch on/off the tasks

◆ Aw

Eigen::MatrixXd wbc::Task::Aw

Weighted task matrix

◆ config

TaskConfig wbc::Task::config

Configuration of this task. See TaskConfig.hpp for more details

◆ nj

uint wbc::Task::nj

number of robot joints

◆ nv

uint wbc::Task::nv

Number of task variables

◆ robot_model

RobotModelPtr wbc::Task::robot_model
protected

◆ type

TaskType wbc::Task::type

Type of task, see TaskConfig.hpp for details

◆ weights

Eigen::VectorXd wbc::Task::weights

Task weights. Size has to be same as number of task variables and all entries have to be >= 0. A zero entry means that the reference of the corresponding task variable will be ignored while computing the solution, for example when controlling the Cartesian pose, the last 3 entries can be set to zero in order to ignore the orientarion and only control the position

◆ weights_world

Eigen::VectorXd wbc::Task::weights_world

Task weights. In case of joint tasks, weights_root will be equal to weights. In case of Cartesian tasks, weights_world will be equal to weights, transformed into the robot's world frame

◆ y_ref

Eigen::VectorXd wbc::Task::y_ref

Reference input for this task. Can be either joint or a Cartesian space variables.

◆ y_ref_world

Eigen::VectorXd wbc::Task::y_ref_world

Reference value for this task. Can be either joint or a Cartesian space variables. In the former case, y_ref_root will be equal to y_ref, in the latter case, y_ref_root will be y_ref transformed into the world frame.


The documentation for this class was generated from the following files: