sot-core  4.11.8
Hierarchical task solver plug-in for dynamic-graph.
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 
47  : public FeatureAbstract,
48  public FeatureReferenceHelper<FeatureVisualPoint> {
49  public:
50  static const std::string CLASS_NAME;
51  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
52 
53  protected:
54  dynamicgraph::Matrix L;
55 
56  /* --- SIGNALS ------------------------------------------------------------ */
57  public:
58  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> xySIN;
61  dynamicgraph::SignalPtr<double, int> ZSIN;
62  dynamicgraph::SignalPtr<dynamicgraph::Matrix, int> articularJacobianSIN;
63 
67 
69 
70  public:
71  FeatureVisualPoint(const std::string &name);
72  virtual ~FeatureVisualPoint(void) {}
73 
74  virtual unsigned int &getDimension(unsigned int &dim, int time);
75 
76  virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res,
77  int time);
78  virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res,
79  int time);
80 
82  inline static Flags selectX(void) { return Flags("10"); }
83  inline static Flags selectY(void) { return Flags("01"); }
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  */
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:76
SignalTimeDependent< dynamicgraph::Matrix, int > jacobianSOUT
Jacobian of the error wrt the robot state: .
Definition: feature-abstract.hh:193
SignalTimeDependent< dynamicgraph::Vector, int > errorSOUT
This signal returns the error between the desired value and the current value : .
Definition: feature-abstract.hh:185
SignalPtr< Flags, int > selectionSIN
This vector specifies which dimension are used to perform the computation. For instance let us assume...
Definition: feature-abstract.hh:173
Definition: feature-abstract.hh:229
Class that defines 2D visualPoint visual feature.
Definition: feature-visual-point.hh:48
virtual dynamicgraph::Matrix & computeJacobian(dynamicgraph::Matrix &res, int time)
Compute the Jacobian of the error according the robot state.
virtual const std::string & getClassName(void) const
Returns the name class.
Definition: feature-visual-point.hh:51
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > xySIN
Definition: feature-visual-point.hh:58
static Flags selectX(void)
Definition: feature-visual-point.hh:82
FeatureVisualPoint(const std::string &name)
virtual dynamicgraph::Vector & computeError(dynamicgraph::Vector &res, int time)
Compute the error between the desired feature and the current value of the feature measured or deduce...
virtual unsigned int & getDimension(unsigned int &dim, int time)
Verbose method.
virtual void display(std::ostream &os) const
static const std::string CLASS_NAME
Definition: feature-visual-point.hh:50
dynamicgraph::SignalPtr< dynamicgraph::Matrix, int > articularJacobianSIN
Definition: feature-visual-point.hh:62
DECLARE_REFERENCE_FUNCTIONS(FeatureVisualPoint)
virtual ~FeatureVisualPoint(void)
Definition: feature-visual-point.hh:72
static Flags selectY(void)
Definition: feature-visual-point.hh:83
dynamicgraph::Matrix L
Definition: feature-visual-point.hh:54
dynamicgraph::SignalPtr< double, int > ZSIN
Definition: feature-visual-point.hh:61
Definition: flags.hh:33
#define SOTFEATUREVISUALPOINT_EXPORT
Definition: feature-visual-point.hh:32
Definition: abstract-sot-external-interface.hh:17