task.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOT_TASK_H__
11 #define __SOT_TASK_H__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* Matrix */
19 
20 /* STD */
21 #include <string>
22 
23 /* SOT */
26 #include <sot/core/flags.hh>
28 
29 /* --------------------------------------------------------------------- */
30 /* --- API ------------------------------------------------------------- */
31 /* --------------------------------------------------------------------- */
32 
33 #if defined(WIN32)
34 #if defined task_EXPORTS
35 #define SOTTASK_EXPORT __declspec(dllexport)
36 #else
37 #define SOTTASK_EXPORT __declspec(dllimport)
38 #endif
39 #else
40 #define SOTTASK_EXPORT
41 #endif
42 
43 /* --------------------------------------------------------------------- */
44 /* --- CLASS ----------------------------------------------------------- */
45 /* --------------------------------------------------------------------- */
69 namespace dynamicgraph {
70 namespace sot {
71 
73  public:
74  typedef std::list<FeatureAbstract *> FeatureList_t;
75 
76  protected:
77  FeatureList_t featureList;
79 
81 
82  public:
83  Task(const std::string &n);
84  void initCommands(void);
85 
86  void addFeature(FeatureAbstract &s);
87  void addFeatureFromName(const std::string &name);
88  void clearFeatureList(void);
89  FeatureList_t &getFeatureList(void) { return featureList; }
90 
91  void setControlSelection(const Flags &act);
92  void addControlSelection(const Flags &act);
93  void clearControlSelection(void);
94 
95  void setWithDerivative(const bool &s);
96  bool getWithDerivative(void);
97 
98  /* --- COMPUTATION --- */
99  dynamicgraph::Vector &computeError(dynamicgraph::Vector &error, int time);
100  VectorMultiBound &computeTaskExponentialDecrease(VectorMultiBound &errorRef,
101  int time);
102  dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &J, int time);
103  dynamicgraph::Vector &computeErrorTimeDerivative(dynamicgraph::Vector &res,
104  int time);
105 
106  /* --- SIGNALS ------------------------------------------------------------ */
107  public:
114 
115  /* --- DISPLAY ------------------------------------------------------------ */
116  void display(std::ostream &os) const;
117 
118  /* --- Writing graph --- */
119  virtual std::ostream &writeGraph(std::ostream &os) const;
120 };
121 
122 } /* namespace sot */
123 } /* namespace dynamicgraph */
124 
125 #endif /* #ifndef __SOT_TASK_H__ */
J
Eigen::VectorXd Vector
s
Vec3f n
FeatureList_t featureList
Definition: task.hh:77
dynamicgraph::SignalPtr< double, int > controlGainSIN
Definition: task.hh:108
std::vector< MultiBound > VectorMultiBound
Definition: multi-bound.hh:71
dynamicgraph::SignalPtr< Flags, int > controlSelectionSIN
Definition: task.hh:110
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > errorSOUT
Definition: task.hh:111
#define SOTTASK_EXPORT
Definition: task.hh:40
#define DYNAMIC_GRAPH_ENTITY_DECL()
dynamicgraph::SignalPtr< double, int > dampingGainSINOUT
Definition: task.hh:109
This class gives the abstract definition of a feature.
res
Eigen::MatrixXd Matrix
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > errorTimeDerivativeSOUT
Definition: task.hh:113
Class that defines the basic elements of a task.
Definition: task.hh:72
std::list< FeatureAbstract * > FeatureList_t
Definition: task.hh:74
void writeGraph(const char *filename)
FeatureList_t & getFeatureList(void)
Definition: task.hh:89


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26