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 {
41 namespace dg = dynamicgraph;
50  FeatureReferenceHelper<Feature1D> {
51 
52 public:
54  static const std::string CLASS_NAME;
56  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
57 
58 protected:
59  /* --- SIGNALS ------------------------------------------------------------ */
60 public:
68  dg::SignalPtr<dg::Vector, int> errorSIN;
69 
71  dg::SignalPtr<dg::Matrix, int> jacobianSIN;
72 
81 
85 
86 public:
88  Feature1D(const std::string &name);
89 
91  virtual ~Feature1D(void) {}
92 
94  virtual unsigned int &getDimension(unsigned int &dim, int time);
95 
102  virtual dg::Vector &computeError(dg::Vector &res, int time);
103 
105  virtual dg::Matrix &computeJacobian(dg::Matrix &res, int time);
106 
110  virtual void display(std::ostream &os) const;
111 
117 };
118 
119 } /* namespace sot */
120 } /* namespace dynamicgraph */
121 
122 #endif // #ifndef __SOT_FEATURE_1D_HH__
123 
124 /*
125  * Local variables:
126  * c-basic-offset: 2
127  * End:
128  */
dynamicgraph::sot::FeatureAbstract::jacobianSOUT
SignalTimeDependent< dg::Matrix, int > jacobianSOUT
Jacobian of the error wrt the robot state: .
Definition: feature-abstract.hh:190
dynamicgraph::sot::FeatureReferenceHelper
Definition: feature-abstract.hh:225
dynamicgraph
Definition: abstract-sot-external-interface.hh:17
dynamicgraph::sot::Feature1D::CLASS_NAME
static const std::string CLASS_NAME
Definition: feature-1d.hh:54
dynamicgraph::sot::FeatureAbstract::errorSOUT
SignalTimeDependent< dg::Vector, int > errorSOUT
This signal returns the error between the desired value and the current value : .
Definition: feature-abstract.hh:182
DECLARE_REFERENCE_FUNCTIONS
#define DECLARE_REFERENCE_FUNCTIONS(FeatureSpecialized)
Definition: feature-abstract.hh:247
dynamicgraph::sot::Feature1D
Simple test: the task is defined to be e_2 = .5 . e'.e, with e the mother task. The jacobian is then ...
Definition: feature-1d.hh:49
feature-abstract.hh
dynamicgraph::sot::FeatureAbstract
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:76
dynamicgraph::sot::Feature1D::jacobianSIN
dg::SignalPtr< dg::Matrix, int > jacobianSIN
Input for the Jacobian.
Definition: feature-1d.hh:71
SOTFEATURE1D_EXPORT
#define SOTFEATURE1D_EXPORT
Definition: feature-1d.hh:32
exception-task.hh
dynamicgraph::sot::Feature1D::~Feature1D
virtual ~Feature1D(void)
Default destructor.
Definition: feature-1d.hh:91
dynamicgraph::sot::Feature1D::errorSIN
dg::SignalPtr< dg::Vector, int > errorSIN
Input for the error.
Definition: feature-1d.hh:68
dynamicgraph::sot::Feature1D::getClassName
virtual const std::string & getClassName(void) const
Definition: feature-1d.hh:56