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:
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,
100  sigtime_t time);
101  VectorMultiBound &computeTaskExponentialDecrease(VectorMultiBound &errorRef,
102  sigtime_t time);
103  dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &J,
104  sigtime_t time);
105  dynamicgraph::Vector &computeErrorTimeDerivative(dynamicgraph::Vector &res,
106  sigtime_t time);
107 
108  /* --- SIGNALS ------------------------------------------------------------ */
109  public:
116 
117  /* --- DISPLAY ------------------------------------------------------------ */
118  void display(std::ostream &os) const;
119 
120  /* --- Writing graph --- */
121  virtual std::ostream &writeGraph(std::ostream &os) const;
122 };
123 
124 } /* namespace sot */
125 } /* namespace dynamicgraph */
126 
127 #endif /* #ifndef __SOT_TASK_H__ */
dynamicgraph::sot::Task::errorTimeDerivativeSOUT
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t > errorTimeDerivativeSOUT
Definition: task.hh:115
dynamicgraph::sot::Task::controlSelectionSIN
dynamicgraph::SignalPtr< Flags, sigtime_t > controlSelectionSIN
Definition: task.hh:112
dynamicgraph::sot::Task::controlGainSIN
dynamicgraph::SignalPtr< double, sigtime_t > controlGainSIN
Definition: task.hh:110
dynamicgraph::sot::Task::FeatureList_t
std::list< FeatureAbstract * > FeatureList_t
Definition: task.hh:74
dynamicgraph::sot::Task::withDerivative
bool withDerivative
Definition: task.hh:78
dynamicgraph::SignalPtr< double, sigtime_t >
dynamicgraph
dynamicgraph::sot::VectorMultiBound
std::vector< MultiBound > VectorMultiBound
Definition: multi-bound.hh:72
dynamicgraph::Matrix
Eigen::MatrixXd Matrix
feature-abstract.hh
dynamicgraph::sot::TaskAbstract
Definition: task-abstract.hh:51
dynamicgraph::sot::FeatureAbstract
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:76
dynamicgraph::sot::Task::featureList
FeatureList_t featureList
Definition: task.hh:77
DYNAMIC_GRAPH_ENTITY_DECL
#define DYNAMIC_GRAPH_ENTITY_DECL()
dynamicgraph::sigtime_t
int64_t sigtime_t
dynamicgraph::sot::Task::getFeatureList
FeatureList_t & getFeatureList(void)
Definition: task.hh:89
SOTTASK_EXPORT
#define SOTTASK_EXPORT
Definition: task.hh:40
display
dynamicgraph::Vector
Eigen::VectorXd Vector
dynamicgraph::sot::Task::errorSOUT
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t > errorSOUT
Definition: task.hh:113
flags.hh
linear-algebra.h
exception-task.hh
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t >
dynamicgraph::sot::Task
Class that defines the basic elements of a task.
Definition: task.hh:72
task-abstract.hh
dynamicgraph::sot::Flags
Definition: flags.hh:33
writeGraph
void writeGraph(const char *filename)
dynamicgraph::sot::Task::dampingGainSINOUT
dynamicgraph::SignalPtr< double, sigtime_t > dampingGainSINOUT
Definition: task.hh:111
n
Vec3f n
compile.name
name
Definition: compile.py:23


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31