ocra-recipes
Doxygen documentation for the ocra-recipes repository
Classes | Public Member Functions | List of all members
ocra::TaskYarpInterface Class Reference

#include <TaskYarpInterface.h>

Classes

class  ControlInputCallback
 a short description More...
 
class  RpcMessageCallback
 a short description More...
 
class  StateUpdateThread
 a short description More...
 

Public Member Functions

 TaskYarpInterface (Task::Ptr taskPtr)
 
virtual ~TaskYarpInterface ()
 
bool activate ()
 
bool activate (const TASK_MODE tmode)
 
bool deactivate ()
 
TASK_MODE getTaskMode ()
 
std::string getPortName ()
 
bool isActivated ()
 
Eigen::VectorXd getTaskError ()
 
int getTaskHierarchyLevel ()
 
void setTaskHierarchyLevel (int level)
 
double getTaskErrorNorm ()
 
void setStiffness (double K)
 
void setStiffness (const VectorXd &K)
 
void setStiffness (const MatrixXd &K)
 
double getStiffness ()
 
Eigen::MatrixXd getStiffnessMatrix ()
 
void setDamping (double B)
 
void setDamping (const VectorXd &B)
 
void setDamping (const MatrixXd &B)
 
double getDamping ()
 
Eigen::MatrixXd getDampingMatrix ()
 
void setWeight (double weight)
 
void setWeight (const Eigen::VectorXd &weights)
 
Eigen::VectorXd getWeight ()
 
TaskState getTaskState ()
 
TaskState getDesiredTaskState ()
 
void setDesiredTaskState (const TaskState &newDesiredTaskState)
 
void setDesiredTaskStateDirect (const TaskState &newDesiredTaskState)
 
void publishTaskState ()
 
Eigen::Displacementd getTaskFrameDisplacement ()
 
Eigen::Twistd getTaskFrameVelocity ()
 
Eigen::Twistd getTaskFrameAcceleration ()
 
Eigen::Vector3d getTaskFramePosition ()
 
Eigen::Rotation3d getTaskFrameOrientation ()
 
Eigen::Vector3d getTaskFrameLinearVelocity ()
 
Eigen::Vector3d getTaskFrameAngularVelocity ()
 
Eigen::Vector3d getTaskFrameLinearAcceleration ()
 
Eigen::Vector3d getTaskFrameAngularAcceleration ()
 

Detailed Description

a long description

Definition at line 41 of file TaskYarpInterface.h.

Constructor & Destructor Documentation

TaskYarpInterface::TaskYarpInterface ( Task::Ptr  taskPtr)

Constructor.

Parameters
ctrlA reference to an ocra controller.
modelA reference to and ocra model.
nameThe name of the task.
nameThe hierarchy level for Hocra
usesYarpPortsWhether or not to use yarp for interprocess communication with the task. True by defualt.

base constructor

Parameters
ctrlocra::Controller to connect to
modelocra model to setup the task
taskNameName of the task

Definition at line 12 of file TaskYarpInterface.cpp.

TaskYarpInterface::~TaskYarpInterface ( )
virtual

Destructor. Mostly just closes yarp ports and threads.

Definition at line 28 of file TaskYarpInterface.cpp.

Member Function Documentation

bool TaskYarpInterface::activate ( )

Activates the underlying task(s)

Note
deactivate() must be called before this function to work properly.
Returns
A boolean indicating the success of the operation.

Definition at line 48 of file TaskYarpInterface.cpp.

bool TaskYarpInterface::activate ( const TASK_MODE  tmode)

Activates a single task as either an objective or a constraint.

Note
deactivate() must be called before this function to work properly.
Returns
A boolean indicating the success of the operation.

Definition at line 60 of file TaskYarpInterface.cpp.

bool TaskYarpInterface::deactivate ( )

Deactivates the underlying task(s). This is where we call getTaskMode() to see if the task in an objective or a constraint.

Returns
A boolean indicating the success of the operation.

Definition at line 94 of file TaskYarpInterface.cpp.

double TaskYarpInterface::getDamping ( )

Gets the current damping, or damping (Kd) gain, of the task.

Returns
The first diagonal entry of the damping matrix.

Definition at line 208 of file TaskYarpInterface.cpp.

Eigen::MatrixXd TaskYarpInterface::getDampingMatrix ( )

Gets the current damping, or damping (Kd) gain, of the task.

Returns
The damping matrix.

Definition at line 219 of file TaskYarpInterface.cpp.

TaskState TaskYarpInterface::getDesiredTaskState ( )

Definition at line 263 of file TaskYarpInterface.cpp.

std::string TaskYarpInterface::getPortName ( )

Gets the name of the task manager's RPC server port.

Returns
The port's full name as a string.

Definition at line 416 of file TaskYarpInterface.cpp.

double TaskYarpInterface::getStiffness ( )

Gets the current stiffness, or proportional (Kp) gain, of the task.

Returns
The first diagonal entry of the stiffness matrix.

Definition at line 166 of file TaskYarpInterface.cpp.

Eigen::MatrixXd TaskYarpInterface::getStiffnessMatrix ( )

Gets the current stiffness, or proportional (Kp) gain, of the task.

Returns
The stiffness matrix.

Definition at line 177 of file TaskYarpInterface.cpp.

Eigen::VectorXd TaskYarpInterface::getTaskError ( )

Gets the current error vector of the task. Only valid for task managers with 1 task, not sets of tasks.

Returns
A vector of errors in each DoF of the task.

Definition at line 129 of file TaskYarpInterface.cpp.

double TaskYarpInterface::getTaskErrorNorm ( )

Gets the current error vector norm of the task. Only valid for task managers with 1 task, not sets of tasks.

Returns
The norm of the task error vector.

Definition at line 138 of file TaskYarpInterface.cpp.

Eigen::Twistd TaskYarpInterface::getTaskFrameAcceleration ( )

Definition at line 377 of file TaskYarpInterface.cpp.

Eigen::Vector3d TaskYarpInterface::getTaskFrameAngularAcceleration ( )

Definition at line 407 of file TaskYarpInterface.cpp.

Eigen::Vector3d TaskYarpInterface::getTaskFrameAngularVelocity ( )

Definition at line 397 of file TaskYarpInterface.cpp.

Eigen::Displacementd TaskYarpInterface::getTaskFrameDisplacement ( )

Definition at line 367 of file TaskYarpInterface.cpp.

Eigen::Vector3d TaskYarpInterface::getTaskFrameLinearAcceleration ( )

Definition at line 402 of file TaskYarpInterface.cpp.

Eigen::Vector3d TaskYarpInterface::getTaskFrameLinearVelocity ( )

Definition at line 392 of file TaskYarpInterface.cpp.

Eigen::Rotation3d TaskYarpInterface::getTaskFrameOrientation ( )

Definition at line 387 of file TaskYarpInterface.cpp.

Eigen::Vector3d TaskYarpInterface::getTaskFramePosition ( )

Definition at line 382 of file TaskYarpInterface.cpp.

Eigen::Twistd TaskYarpInterface::getTaskFrameVelocity ( )

Definition at line 372 of file TaskYarpInterface.cpp.

int TaskYarpInterface::getTaskHierarchyLevel ( )

Gets the defined Level for a task Cannot be changed at runtime .

Returns
The level.

Definition at line 37 of file TaskYarpInterface.cpp.

TASK_MODE TaskYarpInterface::getTaskMode ( )

Gets the current task mode. Either objective, constraint or undefined.

Parameters
tskA pointer to a single task.
Returns
The mode of that task.

Definition at line 108 of file TaskYarpInterface.cpp.

TaskState TaskYarpInterface::getTaskState ( )

Definition at line 254 of file TaskYarpInterface.cpp.

Eigen::VectorXd TaskYarpInterface::getWeight ( )

Gets the weights associated with the task. Often a task will have a single weight but it is still represented as a vector to be applied to each DoF of the task.

Returns
The vector of task weights.

Definition at line 243 of file TaskYarpInterface.cpp.

bool TaskYarpInterface::isActivated ( )

Check if the task is active as either an objective or a constraint.

Returns
A boolean indicating the task(s) activity.

Definition at line 119 of file TaskYarpInterface.cpp.

void TaskYarpInterface::publishTaskState ( )

Definition at line 278 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setDamping ( double  B)

Sets the damping, or damping (Kd) gain, of the task.

Parameters
KThe damping gain to set. Fills a diagonal matrix.

Definition at line 187 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setDamping ( const VectorXd &  B)

Sets the damping, or damping (Kd) gains, of the task.

Parameters
KThe damping gains to set for each DoF. Creates a diagonal matrix from K.

Definition at line 194 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setDamping ( const MatrixXd &  B)

Sets the damping, or damping (Kd) gains, of the task.

Parameters
KThe damping gains to set for the task. Off diagonal components will create damping correlations between the task DoF.

Definition at line 201 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setDesiredTaskState ( const TaskState newDesiredTaskState)

Definition at line 268 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setDesiredTaskStateDirect ( const TaskState newDesiredTaskState)

Definition at line 273 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setStiffness ( double  K)

Sets the stiffness, or proportional (Kp) gain, of the task.

Parameters
KThe proportional gain to set. Fills a diagonal matrix.

Definition at line 143 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setStiffness ( const VectorXd &  K)

Sets the stiffness, or proportional (Kp) gains, of the task.

Parameters
KThe proportional gains to set for each DoF. Creates a diagonal matrix from K.

Definition at line 152 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setStiffness ( const MatrixXd &  K)

Sets the stiffness, or proportional (Kp) gains, of the task.

Parameters
KThe proportional gains to set for the task. Off diagonal components will create stiffness correlations between the task DoF.

Definition at line 159 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setTaskHierarchyLevel ( int  level)

Definition at line 42 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setWeight ( double  weight)

Sets the weight for all DoF of a task.

Parameters
weightThe weight to apply to all task DoF.

Definition at line 229 of file TaskYarpInterface.cpp.

void TaskYarpInterface::setWeight ( const Eigen::VectorXd &  weights)

Sets the weights for each DoF of a task.

Parameters
weightsA vector of weights to apply to each task DoF individually.

Definition at line 236 of file TaskYarpInterface.cpp.


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