ocra-recipes
Doxygen documentation for the ocra-recipes repository
TaskBuilder.h
Go to the documentation of this file.
1 #ifndef TASK_BUILDER_H
2 #define TASK_BUILDER_H
3 
5 #include <ocra/control/Model.h>
6 #include <ocra/control/Task.h>
8 #include <ocra/control/Feature.h>
10 #include <ocra/util/Macros.h>
12 
13 namespace ocra {
14 
15 class TaskBuilder {
17 
18 protected:
19  Task::Ptr task;
20  Model::Ptr model;
22 
23 protected: // pure virtual functions
24  virtual void setTaskType() = 0;
25  virtual void setTaskState() = 0;
26  virtual Feature::Ptr buildFeature() = 0;
27  virtual Feature::Ptr buildFeatureDesired() = 0;
28 
33  virtual void setTaskAsObjectiveOrConstraint();
34 
35 public:
36  TaskBuilder (const TaskBuilderOptions& taskOptions, Model::Ptr modelPtr);
37  virtual ~TaskBuilder ();
38 
42  void buildTask();
43 
49  Task::Ptr getTask();
50 
54  void setTaskParameters();
55 
56 
57 private:
61  void setTaskLevel();
62 
66  void setTaskWeight();
67 
71  void setTaskStiffness();
72 
76  void setTaskDamping();
77 
78 
79 
80 };
81 
82 
83 } // namespace ocra
84 
85 #endif //TASK_BUILDER_H
virtual void setTaskState()=0
TaskBuilder(const TaskBuilderOptions &taskOptions, Model::Ptr modelPtr)
Definition: TaskBuilder.cpp:6
Classes that represent frames.
virtual Feature::Ptr buildFeature()=0
Declaration file of the Model class.
A class hierarchy to compute task errors based on control frames.
#define DEFINE_CLASS_POINTER_TYPEDEFS(Class)
Definition: Macros.h:8
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
Task::Ptr getTask()
Definition: TaskBuilder.cpp:34
virtual void setTaskAsObjectiveOrConstraint()
Definition: TaskBuilder.cpp:52
Task::Ptr task
Definition: TaskBuilder.h:19
virtual void setTaskType()=0
TaskBuilderOptions options
Definition: TaskBuilder.h:21
virtual ~TaskBuilder()
Definition: TaskBuilder.cpp:13
Model::Ptr model
Definition: TaskBuilder.h:20
void setTaskParameters()
Definition: TaskBuilder.cpp:39
virtual Feature::Ptr buildFeatureDesired()=0