wbc
wbc::TaskConfig Class Reference

Defines a task in the whole body control problem. Valid Configurations are e.g. More...

#include <TaskConfig.hpp>

Public Member Functions

 TaskConfig ()
 
 TaskConfig (const std::string &name, const int priority, const std::string root, const std::string tip, const std::string ref_frame, const double activation=0, const std::vector< double > weights={1, 1, 1, 1, 1, 1}, const double timeout=0)
 
 TaskConfig (const std::string &name, const int priority, const std::vector< std::string > joint_names, const std::vector< double > weights, const double activation=0, const double timeout=0)
 
 TaskConfig (const std::string &name, const int priority, const std::vector< double > weights={1, 1, 1}, const double activation=0, const double timeout=0)
 
 ~TaskConfig ()
 
void validate () const
 
unsigned int nVariables () const
 

Public Attributes

std::string name
 
TaskType type
 
int priority
 
std::vector< double > weights
 
double activation
 
double timeout
 
std::vector< std::string > joint_names
 
std::string root
 
std::string tip
 
std::string ref_frame
 

Detailed Description

Defines a task in the whole body control problem. Valid Configurations are e.g.

  • constraint_type = cart name = "cartesian_position_contol" priority = 0 root_frame = "Robot_base" tip_frame = "Gripper" ref_frame = "Robot_base" activation = 0
  • name = "joint_position_control" priority = 1 constraint_type = jnt joint_names = ["J_1", "J_2", "J_3"] activation = 1 timeout = 3.0

Constructor & Destructor Documentation

◆ TaskConfig() [1/4]

wbc::TaskConfig::TaskConfig ( )

◆ TaskConfig() [2/4]

wbc::TaskConfig::TaskConfig ( const std::string & name,
const int priority,
const std::string root,
const std::string tip,
const std::string ref_frame,
const double activation = 0,
const std::vector< double > weights = {1,1,1,1,1,1},
const double timeout = 0 )

Default constructor for Cartesian space tasks

◆ TaskConfig() [3/4]

wbc::TaskConfig::TaskConfig ( const std::string & name,
const int priority,
const std::vector< std::string > joint_names,
const std::vector< double > weights,
const double activation = 0,
const double timeout = 0 )

Default constructor for joint space tasks

◆ TaskConfig() [4/4]

wbc::TaskConfig::TaskConfig ( const std::string & name,
const int priority,
const std::vector< double > weights = {1,1,1},
const double activation = 0,
const double timeout = 0 )

Default constructor for a com task

◆ ~TaskConfig()

wbc::TaskConfig::~TaskConfig ( )

Member Function Documentation

◆ nVariables()

unsigned int wbc::TaskConfig::nVariables ( ) const

Return the number of task variables for this config depending on the task type

◆ validate()

void wbc::TaskConfig::validate ( ) const

Check for valid entries of the task config

Member Data Documentation

◆ activation

double wbc::TaskConfig::activation

Initial activation for this task. Has to be within 0 and 1. Can be used to enable(1)/disable(0) the whole task, or to apply a smooth activation function. Default is 0.

◆ joint_names

std::vector<std::string> wbc::TaskConfig::joint_names

Only joint tasks: names of the involved joints. Must not be empty

◆ name

std::string wbc::TaskConfig::name

Unique identifier of the constraint. Must not be empty

◆ priority

int wbc::TaskConfig::priority

Priority of this task. Must be >= 0! 0 corresponds to the highest priority.

◆ ref_frame

std::string wbc::TaskConfig::ref_frame

Only Cartesian tasks: Reference frame of the task input (base with respect to which the input is expressed). This has to be the name of a link available in robot model. If ref_frame == root the input is assumed to be given in root frame. Otherwise it will be transformed to root.

◆ root

std::string wbc::TaskConfig::root

Only Cartesian tasks: Root frame of the kinematic chain associated with this task. Has to be the name of a link available in the robot model.

◆ timeout

double wbc::TaskConfig::timeout

Timeout of this task in seconds. Output for this task will be set to zero if, for more than this amount of time, no new reference is set. A value of <= 0 will be interpreted as infinite, which means the task never goes into timeout. Default is zero

◆ tip

std::string wbc::TaskConfig::tip

Only Cartesian tasks: Tip frame of the kinematic chain associated with this task. Has to be the name of a link available in the robot model

◆ type

TaskType wbc::TaskConfig::type

Task type, can be one of 'jnt' (joint space) or 'cart' (Cartesian)

◆ weights

std::vector<double> wbc::TaskConfig::weights

Initial weights for this task. Size has to be same as number of task variables. Entries have to be >= 0. Can be used to balance contributions of the task variables. A value of 0 means that the reference of the corresponding task variable will be ignored while computing the solution. Vector Size has to be same as number of task variables. e.g. number of joint names in case of joint space task, and 6 in case of a Cartesian task


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