Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
* Copyright 2010, |
3 |
|
|
* François Bleibel, |
4 |
|
|
* Olivier Stasse, |
5 |
|
|
* |
6 |
|
|
* CNRS/AIST |
7 |
|
|
* |
8 |
|
|
*/ |
9 |
|
|
|
10 |
|
|
#ifndef __SOT_TASK_PD_H__ |
11 |
|
|
#define __SOT_TASK_PD_H__ |
12 |
|
|
|
13 |
|
|
/* --------------------------------------------------------------------- */ |
14 |
|
|
/* --- INCLUDE --------------------------------------------------------- */ |
15 |
|
|
/* --------------------------------------------------------------------- */ |
16 |
|
|
|
17 |
|
|
/* SOT */ |
18 |
|
|
#include <sot/core/task.hh> |
19 |
|
|
|
20 |
|
|
/* --------------------------------------------------------------------- */ |
21 |
|
|
/* --- API ------------------------------------------------------------- */ |
22 |
|
|
/* --------------------------------------------------------------------- */ |
23 |
|
|
|
24 |
|
|
#if defined(WIN32) |
25 |
|
|
#if defined(task_pd_EXPORTS) |
26 |
|
|
#define SOTTASKPD_EXPORT __declspec(dllexport) |
27 |
|
|
#else |
28 |
|
|
#define SOTTASKPD_EXPORT __declspec(dllimport) |
29 |
|
|
#endif |
30 |
|
|
#else |
31 |
|
|
#define SOTTASKPD_EXPORT |
32 |
|
|
#endif |
33 |
|
|
|
34 |
|
|
/* --------------------------------------------------------------------- */ |
35 |
|
|
/* --- CLASS ----------------------------------------------------------- */ |
36 |
|
|
/* --------------------------------------------------------------------- */ |
37 |
|
|
|
38 |
|
|
namespace dynamicgraph { |
39 |
|
|
namespace sot { |
40 |
|
|
|
41 |
|
|
class SOTTASKPD_EXPORT TaskPD : public Task { |
42 |
|
|
public: |
43 |
|
|
static const std::string CLASS_NAME; |
44 |
|
✗ |
virtual const std::string &getClassName(void) const { return CLASS_NAME; } |
45 |
|
|
|
46 |
|
|
dynamicgraph::Vector previousError; |
47 |
|
|
double beta; |
48 |
|
|
|
49 |
|
|
public: |
50 |
|
|
TaskPD(const std::string &n); |
51 |
|
|
|
52 |
|
|
/* --- COMPUTATION --- */ |
53 |
|
|
dynamicgraph::Vector &computeErrorDot(dynamicgraph::Vector &error, int time); |
54 |
|
|
VectorMultiBound &computeTaskModif(VectorMultiBound &error, int time); |
55 |
|
|
|
56 |
|
|
/* --- SIGNALS ------------------------------------------------------------ */ |
57 |
|
|
public: |
58 |
|
|
dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> errorDotSOUT; |
59 |
|
|
dynamicgraph::SignalPtr<dynamicgraph::Vector, int> errorDotSIN; |
60 |
|
|
|
61 |
|
|
/* --- PARAMS --- */ |
62 |
|
|
void initCommand(void); |
63 |
|
|
}; |
64 |
|
|
|
65 |
|
|
} /* namespace sot */ |
66 |
|
|
} /* namespace dynamicgraph */ |
67 |
|
|
|
68 |
|
|
#endif /* #ifndef __SOT_TASK_PD_H__ */ |
69 |
|
|
|