ocra-recipes
Doxygen documentation for the ocra-recipes repository
|
#include <TaskConnection.h>
Classes | |
class | DesiredStateInputCallback |
class | InputCallback |
Public Member Functions | |
TaskConnection () | |
TaskConnection (const std::string &destinationTaskName) | |
virtual | ~TaskConnection () |
void | reconnect () |
void | disconnect () |
bool | activate () |
bool | deactivate () |
std::string | getPortName () |
bool | isActivated () |
Eigen::VectorXd | getTaskError () |
double | getTaskErrorNorm () |
void | setStiffness (double K) |
void | setStiffness (const Eigen::VectorXd &K) |
void | setStiffness (const Eigen::MatrixXd &K) |
double | getStiffness () |
Eigen::MatrixXd | getStiffnessMatrix () |
void | setDamping (double B) |
void | setDamping (const Eigen::VectorXd &B) |
void | setDamping (const Eigen::MatrixXd &B) |
double | getDamping () |
Eigen::MatrixXd | getDampingMatrix () |
void | setWeight (double weight) |
void | setWeight (Eigen::VectorXd &weights) |
Eigen::VectorXd | getWeight () |
bool | openControlPorts (bool connect=true) |
std::string | getTaskName () |
ocra::Task::META_TASK_TYPE | getTaskType () |
std::string | getTaskTypeAsString () |
int | getTaskDimension () |
ocra::TaskState | getTaskState () |
ocra::TaskState | getDesiredTaskState () |
void | setDesiredTaskState (const ocra::TaskState &newDesiredTaskState) |
void | setDesiredTaskStateDirect (const ocra::TaskState &newDesiredTaskState) |
bool | closeControlPorts () |
std::string | getTaskOutputPortName () |
std::string | getTaskInputPortName () |
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 () |
void | queryTask (ocra::TASK_MESSAGE tag, yarp::os::Bottle &bottle) |
Definition at line 26 of file TaskConnection.h.
TaskConnection::TaskConnection | ( | ) |
Definition at line 6 of file TaskConnection.cpp.
TaskConnection::TaskConnection | ( | const std::string & | destinationTaskName | ) |
Definition at line 11 of file TaskConnection.cpp.
|
virtual |
Definition at line 39 of file TaskConnection.cpp.
bool TaskConnection::activate | ( | ) |
Activates the underlying task(s)
deactivate()
must be called before this function to work properly.Definition at line 70 of file TaskConnection.cpp.
bool TaskConnection::closeControlPorts | ( | ) |
Definition at line 455 of file TaskConnection.cpp.
bool TaskConnection::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 82 of file TaskConnection.cpp.
void TaskConnection::disconnect | ( | ) |
Definition at line 46 of file TaskConnection.cpp.
double TaskConnection::getDamping | ( | ) |
Gets the current damping, or damping (Kd) gain, of the task.
Definition at line 216 of file TaskConnection.cpp.
Eigen::MatrixXd TaskConnection::getDampingMatrix | ( | ) |
Gets the current damping, or damping (Kd) gain, of the task.
Definition at line 221 of file TaskConnection.cpp.
ocra::TaskState TaskConnection::getDesiredTaskState | ( | ) |
Definition at line 308 of file TaskConnection.cpp.
std::string TaskConnection::getPortName | ( | ) |
Gets the name of the task manager's RPC server port.
Definition at line 94 of file TaskConnection.cpp.
double TaskConnection::getStiffness | ( | ) |
Gets the current stiffness, or proportional (Kp) gain, of the task.
Definition at line 165 of file TaskConnection.cpp.
Eigen::MatrixXd TaskConnection::getStiffnessMatrix | ( | ) |
Gets the current stiffness, or proportional (Kp) gain, of the task.
Definition at line 170 of file TaskConnection.cpp.
int TaskConnection::getTaskDimension | ( | ) |
Definition at line 269 of file TaskConnection.cpp.
Eigen::VectorXd TaskConnection::getTaskError | ( | ) |
Gets the current error vector of the task. Only valid for task managers with 1 task, not sets of tasks.
Definition at line 114 of file TaskConnection.cpp.
double TaskConnection::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 127 of file TaskConnection.cpp.
Eigen::Twistd TaskConnection::getTaskFrameAcceleration | ( | ) |
Definition at line 354 of file TaskConnection.cpp.
Eigen::Vector3d TaskConnection::getTaskFrameAngularAcceleration | ( | ) |
Definition at line 384 of file TaskConnection.cpp.
Eigen::Vector3d TaskConnection::getTaskFrameAngularVelocity | ( | ) |
Definition at line 374 of file TaskConnection.cpp.
Eigen::Displacementd TaskConnection::getTaskFrameDisplacement | ( | ) |
Definition at line 344 of file TaskConnection.cpp.
Eigen::Vector3d TaskConnection::getTaskFrameLinearAcceleration | ( | ) |
Definition at line 379 of file TaskConnection.cpp.
Eigen::Vector3d TaskConnection::getTaskFrameLinearVelocity | ( | ) |
Definition at line 369 of file TaskConnection.cpp.
Eigen::Rotation3d TaskConnection::getTaskFrameOrientation | ( | ) |
Definition at line 364 of file TaskConnection.cpp.
Eigen::Vector3d TaskConnection::getTaskFramePosition | ( | ) |
Definition at line 359 of file TaskConnection.cpp.
Eigen::Twistd TaskConnection::getTaskFrameVelocity | ( | ) |
Definition at line 349 of file TaskConnection.cpp.
std::string TaskConnection::getTaskInputPortName | ( | ) |
Definition at line 446 of file TaskConnection.cpp.
|
inline |
The name of the task we are connected to.
Definition at line 198 of file TaskConnection.h.
std::string TaskConnection::getTaskOutputPortName | ( | ) |
Definition at line 438 of file TaskConnection.cpp.
ocra::TaskState TaskConnection::getTaskState | ( | ) |
Definition at line 293 of file TaskConnection.cpp.
ocra::Task::META_TASK_TYPE TaskConnection::getTaskType | ( | ) |
The type of the task we are connected to.
Definition at line 277 of file TaskConnection.cpp.
std::string TaskConnection::getTaskTypeAsString | ( | ) |
Definition at line 285 of file TaskConnection.cpp.
Eigen::VectorXd TaskConnection::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 256 of file TaskConnection.cpp.
bool TaskConnection::isActivated | ( | ) |
Check if the task is active as either an objective or a constraint.
Definition at line 102 of file TaskConnection.cpp.
bool TaskConnection::openControlPorts | ( | bool | connect = true | ) |
Opens the high speed task control ports.
connect | the TaskConnection ports to the highspeed Task control ports. |
Definition at line 389 of file TaskConnection.cpp.
void TaskConnection::queryTask | ( | ocra::TASK_MESSAGE | tag, |
yarp::os::Bottle & | bottle | ||
) |
Definition at line 475 of file TaskConnection.cpp.
void TaskConnection::reconnect | ( | ) |
Definition at line 60 of file TaskConnection.cpp.
void TaskConnection::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 183 of file TaskConnection.cpp.
void TaskConnection::setDamping | ( | const Eigen::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 TaskConnection.cpp.
void TaskConnection::setDamping | ( | const Eigen::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 205 of file TaskConnection.cpp.
void TaskConnection::setDesiredTaskState | ( | const ocra::TaskState & | newDesiredTaskState | ) |
Definition at line 325 of file TaskConnection.cpp.
void TaskConnection::setDesiredTaskStateDirect | ( | const ocra::TaskState & | newDesiredTaskState | ) |
Definition at line 333 of file TaskConnection.cpp.
void TaskConnection::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 132 of file TaskConnection.cpp.
void TaskConnection::setStiffness | ( | const Eigen::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 143 of file TaskConnection.cpp.
void TaskConnection::setStiffness | ( | const Eigen::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 154 of file TaskConnection.cpp.
void TaskConnection::setWeight | ( | double | weight | ) |
Sets the weight for all DoF of a task.
weight | The weight to apply to all task DoF. |
Definition at line 234 of file TaskConnection.cpp.
void TaskConnection::setWeight | ( | 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 245 of file TaskConnection.cpp.