ocra-recipes
Doxygen documentation for the ocra-recipes repository
|
#include <Task.h>
Classes | |
struct | Pimpl |
Public Types | |
enum | META_TASK_TYPE { UNKNOWN, POSITION, ORIENTATION, POSE, FORCE, COM, COM_MOMENTUM, PARTIAL_POSTURE, FULL_POSTURE, PARTIAL_TORQUE, FULL_TORQUE, POINT_CONTACT } |
enum | TYPETASK { UNKNOWNTASK, ACCELERATIONTASK, TORQUETASK, FORCETASK, COMMOMENTUMTASK } |
Public Member Functions | |
Task (const std::string &name, std::shared_ptr< Model > model, Feature::Ptr feature, Feature::Ptr featureDes) | |
Task (const std::string &name, std::shared_ptr< Model > model, Feature::Ptr feature) | |
virtual | ~Task () |
TaskState | getTaskState () |
TaskState | getDesiredTaskState () |
void | setDesiredTaskState (const TaskState &newDesiredTaskState) |
void | setDesiredTaskStateDirect (const TaskState &newDesiredTaskState) |
int | getHierarchyLevel () |
void | setHierarchyLevel (int level) |
void | update () |
void | setMetaTaskType (Task::META_TASK_TYPE newMetaTaskType) |
Task::META_TASK_TYPE | getMetaTaskType () |
std::string | getMetaTaskTypeAsString () |
void | setTaskType (Task::TYPETASK newTaskType) |
Task::TYPETASK | getTaskType () |
void | activateAsObjective () |
void | activateAsConstraint () |
void | deactivate () |
bool | isActiveAsObjective () const |
bool | isActiveAsConstraint () const |
void | setDesiredMassToActualOne () |
void | setDesiredMass (double Md) |
void | setDesiredMass (const Eigen::VectorXd &Md) |
void | setDesiredMass (const Eigen::MatrixXd &Md) |
void | setDamping (double B) |
void | setDamping (const Eigen::VectorXd &B) |
void | setDamping (const Eigen::MatrixXd &B) |
void | setStiffness (double K) |
void | setStiffness (const Eigen::VectorXd &K) |
void | setStiffness (const Eigen::MatrixXd &K) |
void | setAutoGains (double freq) |
void | setAutoGains (double freq, double massSaturation) |
bool | isDesiredMassTheActualOne () const |
const Eigen::MatrixXd & | getDesiredMass () const |
const Eigen::MatrixXd & | getDesiredMassInverse () const |
const Eigen::MatrixXd & | getDamping () const |
const Eigen::MatrixXd & | getStiffness () const |
void | activateContactMode () |
void | deactivateContactMode () |
bool | isContactModeActive () const |
bool | isBodyContactConstraint () const |
bool | isPointContactTask () const |
double | getFrictionCoeff () const |
double | getMargin () const |
const Eigen::Vector3d & | getFrictionConstraintOffset () const |
void | setFrictionCoeff (double coeff) |
void | setMargin (double margin) |
void | setFrictionConstraintOffset (const Eigen::Vector3d &offset) |
void | setWeight (double weight) |
void | setWeight (const Eigen::VectorXd &weight) |
const Eigen::VectorXd & | getWeight () const |
int | getDimension () const |
const Eigen::VectorXd & | getOutput () const |
const Eigen::VectorXd & | getError () const |
const Eigen::VectorXd & | getErrorDot () const |
const Eigen::VectorXd & | getErrorDdot () const |
const Eigen::VectorXd & | getEffort () const |
const Eigen::MatrixXd & | getJacobian () const |
const Eigen::VectorXd & | getComputedForce () const |
void | disconnectFromController () |
void | connectToController (std::shared_ptr< OneLevelSolver > _solver, const FullDynamicEquationFunction &dynamicEquation, bool useReducedProblem) |
Public Member Functions inherited from ocra::NamedInstance | |
NamedInstance (const std::string &name) | |
const std::string & | getName () const |
virtual | ~NamedInstance () |
Protected Member Functions | |
Feature::Ptr | getFeature () const |
Feature::Ptr | getFeatureDes () const |
void | doActivateAsObjective () |
void | doActivateAsConstraint () |
void | doActivateContactMode () |
void | doDeactivateAsObjective () |
void | doDeactivateAsConstraint () |
void | doDeactivateContactMode () |
void | doSetFrictionCoeff () |
void | doSetMargin () |
void | doSetWeight () |
void | doGetOutput (Eigen::VectorXd &output) const |
void | addContactPointInModel () |
void | removeContactPointInModel () |
void | updateAccelerationTask () |
void | updateTorqueTask () |
void | updateForceTask () |
void | updateCoMMomentumTask () |
void | checkIfConnectedToController () const |
enum ocra::Task::TYPETASK |
ocra::Task::Task | ( | const std::string & | name, |
std::shared_ptr< Model > | model, | ||
Feature::Ptr | feature, | ||
Feature::Ptr | featureDes | ||
) |
ocra::Task::Task | ( | const std::string & | name, |
std::shared_ptr< Model > | model, | ||
Feature::Ptr | feature | ||
) |
|
protected |
void ocra::Task::connectToController | ( | std::shared_ptr< OneLevelSolver > | _solver, |
const FullDynamicEquationFunction & | dynamicEquation, | ||
bool | useReducedProblem | ||
) |
|
protected |
|
protected |
|
protected |
Do task activation when it is a contact task.
When this function is called, it adds a contact point in the model of contact contained in the Model instance, and it adds in the solver an inequality constraint that represents the limitation of the contact force that must remain inside the cone of friction.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const Eigen::VectorXd & ocra::Task::getComputedForce | ( | ) | const |
const MatrixXd & ocra::Task::getDesiredMassInverse | ( | ) | const |
const Vector3d & ocra::Task::getFrictionConstraintOffset | ( | ) | const |
Task::META_TASK_TYPE ocra::Task::getMetaTaskType | ( | ) |
Task::TYPETASK ocra::Task::getTaskType | ( | ) |
void ocra::Task::setAutoGains | ( | double | freq, |
double | massSaturation | ||
) |
void ocra::Task::setDamping | ( | const Eigen::VectorXd & | B | ) |
void ocra::Task::setDamping | ( | const Eigen::MatrixXd & | B | ) |
void ocra::Task::setDesiredMass | ( | const Eigen::VectorXd & | Md | ) |
void ocra::Task::setDesiredMass | ( | const Eigen::MatrixXd & | Md | ) |
void ocra::Task::setDesiredTaskState | ( | const TaskState & | newDesiredTaskState | ) |
void ocra::Task::setDesiredTaskStateDirect | ( | const TaskState & | newDesiredTaskState | ) |
void ocra::Task::setFrictionConstraintOffset | ( | const Eigen::Vector3d & | offset | ) |
void ocra::Task::setMetaTaskType | ( | Task::META_TASK_TYPE | newMetaTaskType | ) |
void ocra::Task::setStiffness | ( | const Eigen::VectorXd & | K | ) |
void ocra::Task::setStiffness | ( | const Eigen::MatrixXd & | K | ) |
void ocra::Task::setTaskType | ( | Task::TYPETASK | newTaskType | ) |
void ocra::Task::setWeight | ( | const Eigen::VectorXd & | weight | ) |
|
protected |