ocra-recipes
Doxygen documentation for the ocra-recipes repository
gOcraCoMTaskManager.h
Go to the documentation of this file.
1 #ifndef gOcraCOMTASKMANAGER_H
2 #define gOcraCOMTASKMANAGER_H
3 
5 #include "ocra/control/Model.h"
8 
9 #include <Eigen/Dense>
10 
11 namespace gocra
12 {
13 
18 {
19  public:
20  gOcraCoMTaskManager(GHCJTController& ctrl, const ocra::Model& model, const std::string& taskName, ocra::ECartesianDof axes, double stiffness, double damping);
21 
22  gOcraCoMTaskManager(GHCJTController& ctrl, const ocra::Model& model, const std::string& taskName, ocra::ECartesianDof axes, double stiffness, double damping, Eigen::Vector3d posDes);
23 
24  gOcraCoMTaskManager(GHCJTController& ctrl, const ocra::Model& model, const std::string& taskName, ocra::ECartesianDof axes, double stiffness, double damping, Eigen::Vector3d posDes, Eigen::Vector3d velDes, Eigen::Vector3d accDes);
25 
27 
28 
29  // Sets the position
30  void setState(const Eigen::Vector3d& position);
31  // Sets the position velocity and acceleration
32  void setState(const Eigen::Vector3d& position, const Eigen::Vector3d& velocity, const Eigen::Vector3d& acceleration);
33 
34 
35  // All Managers have this
36  void activate();
37  void deactivate();
38 
39  // For objective tasks
40  void setStiffness(double stiffness);
41  double getStiffness();
42  void setDamping(double damping);
43  double getDamping();
44 
45 
46  // Task error
47  Eigen::VectorXd getTaskError();
48 
49  private:
50  gocra::GHCJTTask* task;
53  ocra::CoMFrame* featFrame;
54  ocra::PositionFeature* featDes;
55  ocra::TargetFrame* featDesFrame;
56 
57  void _init(double stiffness, double damping);
58 };
59 
60 }
61 
62 #endif // gOcraCOMTASKMANAGER_H
Define task class for GHCJT controller. It inherits from the task class defined in the ocra framework...
Declaration file of the Model class.
gOcraCoMTaskManager(GHCJTController &ctrl, const ocra::Model &model, const std::string &taskName, ocra::ECartesianDof axes, double stiffness, double damping)
Model class.
Definition: Model.h:38
Task Manager for the Center of Mass (CoM) task with the gOcra Controller.
Task Manager for the Center of Mass (CoM) task with the gOcra Controllers.
gOcra Controller based on LQP solver for the ocra framework.
Used to build positioning tasks.
Definition: Feature.h:101
Define the Generalized Hierarchical Controller based on Jacobian transpose (GHCJT) in quasi-static ca...
ECartesianDof
Definition: ControlEnum.h:18
A generic abstract task for the GHCJT controller.
Definition: GHCJTTask.h:41
gocra::GHCJTController & ctrl
void setState(const Eigen::Vector3d &position)
void setStiffness(double stiffness)
Creates a frame whose center is at the CoM of the model and whose axes are parallel to the axes of th...
Definition: ControlFrame.h:132
Represents a &#39;target&#39;, i.e. something that does not depend on a model but must match with another fra...
Definition: ControlFrame.h:75