ocra-recipes
Doxygen documentation for the ocra-recipes repository
|
A generic abstract task for the GHCJT controller. More...
#include <GHCJTTask.h>
Classes | |
struct | Pimpl |
Public Member Functions | |
GHCJTTask (const std::string &taskName, const Model &innerModel, Feature::Ptr feature, Feature::Ptr featureDes) | |
GHCJTTask (const std::string &taskName, const Model &innerModel, Feature::Ptr feature) | |
virtual | ~GHCJTTask () |
const Eigen::VectorXd & | getComputedForce () const |
const Eigen::MatrixXd & | getPriority () const |
void | setPriority (Eigen::MatrixXd &alpha) |
int | getTaskDimension () const |
const std::string & | getTaskName () const |
void | setIndexBegin (int index) |
int | getIndexBegin () const |
void | setIndexEnd (int index) |
int | getIndexEnd () const |
void | setProjector (Eigen::MatrixXd &proj) |
void | setTaskiProjector (Eigen::MatrixXd &proj) |
const Eigen::MatrixXd & | getProjector () const |
const Eigen::MatrixXd & | getTaskiProjector () const |
LinearFunction * | getInnerObjectiveFunction () const |
const Variable & | getVariable () const |
Public Member Functions inherited from ocra::Task | |
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 () |
Friends | |
class | GHCJTController |
Additional Inherited Members | |
Public Types inherited from ocra::Task | |
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 } |
A generic abstract task for the GHCJT controller.
Definition at line 41 of file GHCJTTask.h.
gocra::GHCJTTask::GHCJTTask | ( | const std::string & | taskName, |
const Model & | innerModel, | ||
Feature::Ptr | feature, | ||
Feature::Ptr | featureDes | ||
) |
Initialize a new GHCJT Task.
name | The name of the task |
model | The ocr::Model on which we will update the dynamic parameters |
feature | The task feature, meaning what we want to control |
featureDes | The desired task feature, meaning the goal we want to reach with the feature |
Definition at line 144 of file GHCJTTask.cpp.
gocra::GHCJTTask::GHCJTTask | ( | const std::string & | taskName, |
const Model & | innerModel, | ||
Feature::Ptr | feature | ||
) |
Initialize a new GHCJT Task.
name | The name of the task |
model | The ocra::Model on which we will update the dynamic parameters |
feature | The task feature, meaning what we want to control |
Definition at line 157 of file GHCJTTask.cpp.
|
virtual |
Definition at line 165 of file GHCJTTask.cpp.
|
protected |
Definition at line 223 of file GHCJTTask.cpp.
|
protected |
Definition at line 441 of file GHCJTTask.cpp.
|
protected |
Definition at line 171 of file GHCJTTask.cpp.
|
protected |
Definition at line 185 of file GHCJTTask.cpp.
|
protectedvirtual |
Do activation of task as a constraint.
It means that the task should be full completed and no error may occur. Be aware that stong constraints may lead to system instability (very "sharp" solution that requires lot of energy).
Definition at line 345 of file GHCJTTask.cpp.
|
protectedvirtual |
Do activation of task as an objective.
It means that the task is not fully completed and a little error may occur.
Definition at line 309 of file GHCJTTask.cpp.
|
protectedvirtual |
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 xde 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.
Definition at line 256 of file GHCJTTask.cpp.
|
protectedvirtual |
Do deactivation of task as a constraint.
objective is no more considered.
Definition at line 362 of file GHCJTTask.cpp.
|
protectedvirtual |
Do deactivation of task as an objective.
objective is no more considered.
Definition at line 327 of file GHCJTTask.cpp.
|
protectedvirtual |
Do task deactivation when it is a contact task.
When this function is called, it removes the contact point in the model of contact, and it removes from the solver the friction cone inequality constraint.
Definition at line 274 of file GHCJTTask.cpp.
|
protectedvirtual |
Definition at line 216 of file GHCJTTask.cpp.
|
protectedvirtual |
For contact task, do the setting of the coefficient of friction.
The cone of friction constraint is modified to represent a cone with this new coefficient of friction.
Definition at line 290 of file GHCJTTask.cpp.
|
protectedvirtual |
For contact task, do the setting of the friction margin.
The cone of friction constraint is modified to represent a friction cone with this new margin.
Definition at line 299 of file GHCJTTask.cpp.
|
protectedvirtual |
Do set the weight of the task.
The weight in the objective function is modified.
Definition at line 383 of file GHCJTTask.cpp.
const Eigen::VectorXd & gocra::GHCJTTask::getComputedForce | ( | ) | const |
Definition at line 210 of file GHCJTTask.cpp.
int gocra::GHCJTTask::getIndexBegin | ( | ) | const |
Definition at line 478 of file GHCJTTask.cpp.
int gocra::GHCJTTask::getIndexEnd | ( | ) | const |
Definition at line 488 of file GHCJTTask.cpp.
LinearFunction * gocra::GHCJTTask::getInnerObjectiveFunction | ( | ) | const |
Definition at line 513 of file GHCJTTask.cpp.
const MatrixXd & gocra::GHCJTTask::getPriority | ( | ) | const |
Definition at line 451 of file GHCJTTask.cpp.
const MatrixXd & gocra::GHCJTTask::getProjector | ( | ) | const |
Definition at line 498 of file GHCJTTask.cpp.
int gocra::GHCJTTask::getTaskDimension | ( | ) | const |
Definition at line 463 of file GHCJTTask.cpp.
const MatrixXd & gocra::GHCJTTask::getTaskiProjector | ( | ) | const |
Definition at line 508 of file GHCJTTask.cpp.
const std::string & gocra::GHCJTTask::getTaskName | ( | ) | const |
Definition at line 468 of file GHCJTTask.cpp.
const Variable & gocra::GHCJTTask::getVariable | ( | ) | const |
Definition at line 518 of file GHCJTTask.cpp.
|
protected |
Definition at line 235 of file GHCJTTask.cpp.
void gocra::GHCJTTask::setIndexBegin | ( | int | index | ) |
Definition at line 473 of file GHCJTTask.cpp.
void gocra::GHCJTTask::setIndexEnd | ( | int | index | ) |
Definition at line 483 of file GHCJTTask.cpp.
void gocra::GHCJTTask::setPriority | ( | Eigen::MatrixXd & | alpha | ) |
Definition at line 457 of file GHCJTTask.cpp.
void gocra::GHCJTTask::setProjector | ( | Eigen::MatrixXd & | proj | ) |
Definition at line 493 of file GHCJTTask.cpp.
void gocra::GHCJTTask::setTaskiProjector | ( | Eigen::MatrixXd & | proj | ) |
Definition at line 503 of file GHCJTTask.cpp.
|
protected |
Definition at line 396 of file GHCJTTask.cpp.
|
friend |
Definition at line 71 of file GHCJTTask.h.