ocra-recipes
Doxygen documentation for the ocra-recipes repository
gOcraSegCartesianTaskManager.h
Go to the documentation of this file.
1 #ifndef gOcraSEGCARTESIANTASKMANAGER_H
2 #define gOcraSEGCARTESIANTASKMANAGER_H
3 
5 #include "ocra/control/Model.h"
8 
9 #include <Eigen/Dense>
10 
11 namespace gocra
12 {
13 
18 {
19  public:
20  gOcraSegCartesianTaskManager(GHCJTController& ctrl, const ocra::Model& model, const std::string& taskName, const std::string& segmentName, ocra::ECartesianDof axes, double stiffness, double damping);
21 
22  gOcraSegCartesianTaskManager(GHCJTController& ctrl, const ocra::Model& model, const std::string& taskName, const std::string& segmentName, const Eigen::Vector3d& segPoint_Local, ocra::ECartesianDof axes, double stiffness, double damping);
23 
24  gOcraSegCartesianTaskManager(GHCJTController& ctrl, const ocra::Model& model, const std::string& taskName, const std::string& segmentName, ocra::ECartesianDof axes, double stiffness, double damping, const Eigen::Vector3d& targetPose);
25 
26  gOcraSegCartesianTaskManager(GHCJTController& ctrl, const ocra::Model& model, const std::string& taskName, const std::string& segmentName, const Eigen::Vector3d& segPoint_Local, ocra::ECartesianDof axes, double stiffness, double damping, const Eigen::Vector3d& targetPose);
27 
29 
30  // Sets the position
31  void setState(const Eigen::Vector3d& position);
32  // Sets the position velocity and acceleration
33  void setState(const Eigen::Vector3d& position, const Eigen::Vector3d& velocity, const Eigen::Vector3d& acceleration);
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  // Task error
46  Eigen::VectorXd getTaskError();
47 
48 
49  private:
50  gocra::GHCJTTask* task;
51 
52  const std::string& segmentName;
55  ocra::PositionFeature* featDes;
56  ocra::SegmentFrame* featFrame;
57  ocra::TargetFrame* featDesFrame;
58 
59  void _init(const Eigen::Vector3d& refPoint_LocalFrame, double stiffness, double damping);
60 };
61 
62 }
63 
64 #endif // gOcraSEGCARTESIANTASKMANAGER_H
void setState(const Eigen::Vector3d &position)
Define task class for GHCJT controller. It inherits from the task class defined in the ocra framework...
Declaration file of the Model class.
Model class.
Definition: Model.h:38
gOcraSegCartesianTaskManager(GHCJTController &ctrl, const ocra::Model &model, const std::string &taskName, const std::string &segmentName, ocra::ECartesianDof axes, double stiffness, double damping)
Task Manager for the Center of Mass (CoM) task with the gOcra Controllers.
gOcra Controller based on LQP solver for the ocra framework.
Task Manager for the cartesian position of a specified segment.
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 frame attached to a segment of a model.
Definition: ControlFrame.h:104
A generic abstract task for the GHCJT controller.
Definition: GHCJTTask.h:41
gocra::GHCJTController & ctrl
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