feature-visual-point.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_VISUALPOINT_HH__
11 #define __SOT_FEATURE_VISUALPOINT_HH__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* SOT */
20 
21 /* --------------------------------------------------------------------- */
22 /* --- API ------------------------------------------------------------- */
23 /* --------------------------------------------------------------------- */
24 
25 #if defined(WIN32)
26 #if defined(feature_visual_point_EXPORTS)
27 #define SOTFEATUREVISUALPOINT_EXPORT __declspec(dllexport)
28 #else
29 #define SOTFEATUREVISUALPOINT_EXPORT __declspec(dllimport)
30 #endif
31 #else
32 #define SOTFEATUREVISUALPOINT_EXPORT
33 #endif
34 
35 /* --------------------------------------------------------------------- */
36 /* --- CLASS ----------------------------------------------------------- */
37 /* --------------------------------------------------------------------- */
38 
39 namespace dynamicgraph {
40 namespace sot {
41 namespace dg = dynamicgraph;
42 
48  : public FeatureAbstract,
49  public FeatureReferenceHelper<FeatureVisualPoint> {
50 
51 public:
52  static const std::string CLASS_NAME;
53  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
54 
55 protected:
56  dg::Matrix L;
57 
58  /* --- SIGNALS ------------------------------------------------------------ */
59 public:
60  dg::SignalPtr<dg::Vector, int> xySIN;
63  dg::SignalPtr<double, int> ZSIN;
64  dg::SignalPtr<dg::Matrix, int> articularJacobianSIN;
65 
69 
71 
72 public:
73  FeatureVisualPoint(const std::string &name);
74  virtual ~FeatureVisualPoint(void) {}
75 
76  virtual unsigned int &getDimension(unsigned int &dim, int time);
77 
78  virtual dg::Vector &computeError(dg::Vector &res, int time);
79  virtual dg::Matrix &computeJacobian(dg::Matrix &res, int time);
80 
82  inline static Flags selectX(void) { return FLAG_LINE_1; }
83  inline static Flags selectY(void) { return FLAG_LINE_2; }
84 
85  virtual void display(std::ostream &os) const;
86 };
87 
88 } /* namespace sot */
89 } /* namespace dynamicgraph */
90 
91 #endif // #ifndef __SOT_FEATURE_VISUALPOINT_HH__
92 
93 /*
94  * Local variables:
95  * c-basic-offset: 2
96  * End:
97  */
dynamicgraph::sot::FeatureAbstract::jacobianSOUT
SignalTimeDependent< dg::Matrix, int > jacobianSOUT
Jacobian of the error wrt the robot state: .
Definition: feature-abstract.hh:190
dynamicgraph::sot::FeatureVisualPoint::~FeatureVisualPoint
virtual ~FeatureVisualPoint(void)
Definition: feature-visual-point.hh:74
dynamicgraph::sot::FeatureReferenceHelper
Definition: feature-abstract.hh:225
dynamicgraph
Definition: abstract-sot-external-interface.hh:17
dynamicgraph::sot::FeatureVisualPoint::CLASS_NAME
static const std::string CLASS_NAME
Definition: feature-visual-point.hh:52
dynamicgraph::sot::FeatureVisualPoint::ZSIN
dg::SignalPtr< double, int > ZSIN
Definition: feature-visual-point.hh:63
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
feature-abstract.hh
dynamicgraph::sot::FeatureAbstract
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:76
dynamicgraph::sot::FeatureVisualPoint::articularJacobianSIN
dg::SignalPtr< dg::Matrix, int > articularJacobianSIN
Definition: feature-visual-point.hh:64
dynamicgraph::sot::FeatureVisualPoint::xySIN
dg::SignalPtr< dg::Vector, int > xySIN
Definition: feature-visual-point.hh:60
dynamicgraph::sot::FeatureVisualPoint::selectX
static Flags selectX(void)
Definition: feature-visual-point.hh:82
dynamicgraph::sot::FeatureVisualPoint::getClassName
virtual const std::string & getClassName(void) const
Returns the name class.
Definition: feature-visual-point.hh:53
dynamicgraph::sot::FeatureVisualPoint::L
dg::Matrix L
Definition: feature-visual-point.hh:56
dynamicgraph::sot::FeatureVisualPoint
Class that defines 2D visualPoint visual feature.
Definition: feature-visual-point.hh:47
exception-task.hh
dynamicgraph::sot::FeatureAbstract::selectionSIN
SignalPtr< Flags, int > selectionSIN
This vector specifies which dimension are used to perform the computation. For instance let us assume...
Definition: feature-abstract.hh:170
dynamicgraph::sot::Flags
Definition: flags.hh:31
dynamicgraph::sot::FeatureVisualPoint::selectY
static Flags selectY(void)
Definition: feature-visual-point.hh:83
dynamicgraph::sot::FLAG_LINE_2
const SOT_CORE_EXPORT Flags FLAG_LINE_2
SOTFEATUREVISUALPOINT_EXPORT
#define SOTFEATUREVISUALPOINT_EXPORT
Definition: feature-visual-point.hh:32
dynamicgraph::sot::FLAG_LINE_1
const SOT_CORE_EXPORT Flags FLAG_LINE_1