wbc
|
Abstract class to represent a generic task for a WBC optimization problem. More...
#include <Task.hpp>
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 |
Abstract class to represent a generic task for a WBC optimization problem.
wbc::Task::Task | ( | ) |
Default constructor.
wbc::Task::Task | ( | TaskConfig | config, |
RobotModelPtr | robot_model, | ||
uint | nv, | ||
TaskType | type ) |
Resizes all members.
nc | Number of task variables |
nj | Number of robot joints |
wbc::Task::~Task | ( | ) |
void wbc::Task::reset | ( | ) |
Reset task variables to initial values.
void wbc::Task::setActivation | ( | const double | activation | ) |
Set task activation.
activation | Value has to be between 0 and 1. Can be used to activate(1)/deactivate(0) the task. |
void wbc::Task::setWeights | ( | const Eigen::VectorXd & | weights | ) |
Set task weights.
weights | Weight vector. Size has to be same as number of task variables and all entries have to be >= 0 |
|
pure virtual |
Update Task matrices and vectors.
Implemented in wbc::CoMAccelerationTask, wbc::CoMVelocityTask, wbc::ContactForceTask, wbc::JointAccelerationTask, wbc::JointVelocityTask, wbc::SpatialAccelerationTask, and wbc::SpatialVelocityTask.
Eigen::MatrixXd wbc::Task::A |
Task matrix
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
Eigen::MatrixXd wbc::Task::Aw |
Weighted task matrix
TaskConfig wbc::Task::config |
Configuration of this task. See TaskConfig.hpp for more details
uint wbc::Task::nj |
number of robot joints
uint wbc::Task::nv |
Number of task variables
|
protected |
TaskType wbc::Task::type |
Type of task, see TaskConfig.hpp for details
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
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
Eigen::VectorXd wbc::Task::y_ref |
Reference input for this task. Can be either joint or a Cartesian space variables.
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.