ocra-recipes
Doxygen documentation for the ocra-recipes repository
|
#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 () |
a long description
Definition at line 41 of file TaskYarpInterface.h.
TaskYarpInterface::TaskYarpInterface | ( | Task::Ptr | taskPtr | ) |
Constructor.
ctrl | A reference to an ocra controller. |
model | A reference to and ocra model. |
name | The name of the task. |
name | The hierarchy level for Hocra |
usesYarpPorts | Whether or not to use yarp for interprocess communication with the task. True by defualt. |
base constructor
ctrl | ocra::Controller to connect to |
model | ocra model to setup the task |
taskName | Name of the task |
Definition at line 12 of file TaskYarpInterface.cpp.
|
virtual |
Destructor. Mostly just closes yarp ports and threads.
Definition at line 28 of file TaskYarpInterface.cpp.
bool TaskYarpInterface::activate | ( | ) |
Activates the underlying task(s)
deactivate()
must be called before this function to work properly.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.
deactivate()
must be called before this function to work properly.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.
Definition at line 94 of file TaskYarpInterface.cpp.
double TaskYarpInterface::getDamping | ( | ) |
Gets the current damping, or damping (Kd) gain, of the task.
Definition at line 208 of file TaskYarpInterface.cpp.
Eigen::MatrixXd TaskYarpInterface::getDampingMatrix | ( | ) |
Gets the current damping, or damping (Kd) gain, of the task.
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.
Definition at line 416 of file TaskYarpInterface.cpp.
double TaskYarpInterface::getStiffness | ( | ) |
Gets the current stiffness, or proportional (Kp) gain, of the task.
Definition at line 166 of file TaskYarpInterface.cpp.
Eigen::MatrixXd TaskYarpInterface::getStiffnessMatrix | ( | ) |
Gets the current stiffness, or proportional (Kp) gain, of the task.
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.
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.
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 .
Definition at line 37 of file TaskYarpInterface.cpp.
TASK_MODE TaskYarpInterface::getTaskMode | ( | ) |
Gets the current task mode. Either objective, constraint or undefined.
tsk | A pointer to a single 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.
Definition at line 243 of file TaskYarpInterface.cpp.
bool TaskYarpInterface::isActivated | ( | ) |
Check if the task is active as either an objective or a constraint.
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.
K | The 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.
K | The 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.
K | The 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.
K | The 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.
K | The 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.
K | The 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.
weight | The 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.
weights | A vector of weights to apply to each task DoF individually. |
Definition at line 236 of file TaskYarpInterface.cpp.