sot-core  4.10.1
Hierarchical task solver plug-in for dynamic-graph.
feature-1d.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_FEATURE_1D_HH__
11 #define __SOT_FEATURE_1D_HH__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* SOT */
20 
21 /* --------------------------------------------------------------------- */
22 /* --- API ------------------------------------------------------------- */
23 /* --------------------------------------------------------------------- */
24 
25 #if defined(WIN32)
26 #if defined(feature_1d_EXPORTS)
27 #define SOTFEATURE1D_EXPORT __declspec(dllexport)
28 #else
29 #define SOTFEATURE1D_EXPORT __declspec(dllimport)
30 #endif
31 #else
32 #define SOTFEATURE1D_EXPORT
33 #endif
34 
35 /* --------------------------------------------------------------------- */
36 /* --- CLASS ----------------------------------------------------------- */
37 /* --------------------------------------------------------------------- */
38 
39 namespace dynamicgraph {
40 namespace sot {
49  FeatureReferenceHelper<Feature1D> {
50 
51 public:
53  static const std::string CLASS_NAME;
55  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
56 
57 protected:
58  /* --- SIGNALS ------------------------------------------------------------ */
59 public:
67  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> errorSIN;
68 
70  dynamicgraph::SignalPtr<dynamicgraph::Matrix, int> jacobianSIN;
71 
80 
84 
85 public:
87  Feature1D(const std::string &name);
88 
90  virtual ~Feature1D(void) {}
91 
93  virtual unsigned int &getDimension(unsigned int &dim, int time);
94 
101  virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res,
102  int time);
103 
105  virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res,
106  int time);
107 
111  virtual void display(std::ostream &os) const;
112 
118 };
119 
120 } /* namespace sot */
121 } /* namespace dynamicgraph */
122 
123 #endif // #ifndef __SOT_FEATURE_1D_HH__
124 
125 /*
126  * Local variables:
127  * c-basic-offset: 2
128  * End:
129  */
Definition: feature-abstract.hh:227
virtual const std::string & getClassName(void) const
Definition: feature-1d.hh:55
static const std::string CLASS_NAME
Definition: feature-1d.hh:53
SignalTimeDependent< dynamicgraph::Matrix, int > jacobianSOUT
Jacobian of the error wrt the robot state: .
Definition: feature-abstract.hh:192
#define SOTFEATURE1D_EXPORT
Definition: feature-1d.hh:32
dynamicgraph::SignalPtr< dynamicgraph::Matrix, int > jacobianSIN
Input for the Jacobian.
Definition: feature-1d.hh:70
Simple test: the task is defined to be e_2 = .5 . e&#39;.e, with e the mother task. The jacobian is then ...
Definition: feature-1d.hh:48
virtual ~Feature1D(void)
Default destructor.
Definition: feature-1d.hh:90
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:75
#define DECLARE_REFERENCE_FUNCTIONS(FeatureSpecialized)
Definition: feature-abstract.hh:249
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > errorSIN
Input for the error.
Definition: feature-1d.hh:67
SignalTimeDependent< dynamicgraph::Vector, int > errorSOUT
This signal returns the error between the desired value and the current value : . ...
Definition: feature-abstract.hh:184
Definition: abstract-sot-external-interface.hh:17