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::CartesianTask wbc::JointTask wbc::CartesianAccelerationTask wbc::CartesianVelocityTask wbc::CoMAccelerationTask wbc::CoMVelocityTask wbc::JointAccelerationTask wbc::JointVelocityTask

Public Member Functions

 Task ()
 Default constructor.
 
 Task (const TaskConfig &_config, uint n_robot_joints)
 Resizes all members.
 
 ~Task ()
 
void reset ()
 Reset task variables to initial values.
 
virtual void update (RobotModelPtr robot_model)=0
 Update Task matrices and vectors.
 
void checkTimeout ()
 Check if the task is in timeout and set the timeout flag accordingly. A task is in timeout if.
 
void setWeights (const base::VectorXd &weights)
 Set task weights.
 
void setActivation (const double activation)
 Set task activation.
 

Public Attributes

base::Time time
 
TaskConfig config
 
base::VectorXd y_ref
 
base::VectorXd y_ref_root
 
base::VectorXd weights
 
base::VectorXd weights_root
 
double activation
 
int timeout
 
base::MatrixXd A
 
base::MatrixXd Aw
 

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 ( const TaskConfig & _config,
uint n_robot_joints )

Resizes all members.

◆ ~Task()

wbc::Task::~Task ( )

Member Function Documentation

◆ checkTimeout()

void wbc::Task::checkTimeout ( )

Check if the task is in timeout and set the timeout flag accordingly. A task is in timeout if.

  • No reference value has been set yet
  • A timeout value is configured (config.timeout > 0) and no reference value arrived during the timeout period

◆ 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 base::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()

virtual void wbc::Task::update ( RobotModelPtr robot_model)
pure virtual

Member Data Documentation

◆ A

base::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

base::MatrixXd wbc::Task::Aw

Weighted task matrix

◆ config

TaskConfig wbc::Task::config

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

◆ time

base::Time wbc::Task::time

Last time the task reference values was updated.

◆ timeout

int wbc::Task::timeout

Can be 0 or 1. Will be multiplied with the task weights. If no new reference values arrives for more than config.timeout time, this value will be set to zero

◆ weights

base::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_root

base::VectorXd wbc::Task::weights_root

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

◆ y_ref

base::VectorXd wbc::Task::y_ref

Reference input for this task. Can be either joint or a Cartesian space variables. If the latter is the case they have to be expressed in in ref_frame coordinates! See TaskConfig.hpp for more details.

◆ y_ref_root

base::VectorXd wbc::Task::y_ref_root

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 robot root/base frame.


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