sot-core  4.11.6
Hierarchical task solver plug-in for dynamic-graph.
feature-generic.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_GENERIC_HH__
11 #define __SOT_FEATURE_GENERIC_HH__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* SOT */
20 
21 /* --------------------------------------------------------------------- */
22 /* --- API ------------------------------------------------------------- */
23 /* --------------------------------------------------------------------- */
24 
25 #if defined(WIN32)
26 #if defined(feature_generic_EXPORTS)
27 #define SOTFEATUREGENERIC_EXPORT __declspec(dllexport)
28 #else
29 #define SOTFEATUREGENERIC_EXPORT __declspec(dllimport)
30 #endif
31 #else
32 #define SOTFEATUREGENERIC_EXPORT
33 #endif
34 
35 /* --------------------------------------------------------------------- */
36 /* --- CLASS ----------------------------------------------------------- */
37 /* --------------------------------------------------------------------- */
38 
39 namespace dynamicgraph {
40 namespace sot {
41 
57  : public FeatureAbstract,
58  FeatureReferenceHelper<FeatureGeneric> {
59 
60 public:
62  static const std::string CLASS_NAME;
64  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
65 
66 protected:
68 
69  /* --- SIGNALS ------------------------------------------------------------ */
70 public:
78  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> errorSIN;
79 
81  dynamicgraph::SignalPtr<dynamicgraph::Matrix, int> jacobianSIN;
82 
91 
95 
96 public:
98  FeatureGeneric(const std::string &name);
99 
101  virtual ~FeatureGeneric(void) {}
102 
104  virtual unsigned int &getDimension(unsigned int &dim, int time);
105 
112  virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res,
113  int time);
114 
116  virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res,
117  int time);
118 
122  virtual void display(std::ostream &os) const;
123 
129 };
130 
131 } /* namespace sot */
132 } /* namespace dynamicgraph */
133 
134 #endif // #ifndef __SOT_FEATURE_GENERIC_HH__
135 
136 /*
137  * Local variables:
138  * c-basic-offset: 2
139  * End:
140  */
#define SOTFEATUREGENERIC_EXPORT
Definition: feature-generic.hh:32
Definition: feature-abstract.hh:227
Eigen::VectorXd::Index Index
Definition: robot-utils.hh:39
virtual const std::string & getClassName(void) const
Definition: feature-generic.hh:64
dynamicgraph::SignalPtr< dynamicgraph::Matrix, int > jacobianSIN
Input for the Jacobian.
Definition: feature-generic.hh:81
SignalTimeDependent< dynamicgraph::Matrix, int > jacobianSOUT
Jacobian of the error wrt the robot state: .
Definition: feature-abstract.hh:192
dynamicgraph::Vector::Index dimensionDefault
Definition: feature-generic.hh:67
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:75
#define DECLARE_REFERENCE_FUNCTIONS(FeatureSpecialized)
Definition: feature-abstract.hh:249
virtual ~FeatureGeneric(void)
Default destructor.
Definition: feature-generic.hh:101
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > errorSIN
Input for the error.
Definition: feature-generic.hh:78
SignalTimeDependent< dynamicgraph::Vector, int > errorSOUT
This signal returns the error between the desired value and the current value : . ...
Definition: feature-abstract.hh:184
static const std::string CLASS_NAME
Definition: feature-generic.hh:62
Class that defines a generic implementation of the abstract interface for features.
Definition: feature-generic.hh:56
Definition: abstract-sot-external-interface.hh:17