Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
* Copyright 2010, |
3 |
|
|
* François Bleibel, |
4 |
|
|
* Olivier Stasse, |
5 |
|
|
* |
6 |
|
|
* CNRS/AIST |
7 |
|
|
* |
8 |
|
|
*/ |
9 |
|
|
|
10 |
|
|
#ifndef __SOT_FEATURE_VECTOR3_HH__ |
11 |
|
|
#define __SOT_FEATURE_VECTOR3_HH__ |
12 |
|
|
|
13 |
|
|
/* --------------------------------------------------------------------- */ |
14 |
|
|
/* --- INCLUDE --------------------------------------------------------- */ |
15 |
|
|
/* --------------------------------------------------------------------- */ |
16 |
|
|
|
17 |
|
|
/* SOT */ |
18 |
|
|
#include <sot/core/exception-task.hh> |
19 |
|
|
#include <sot/core/feature-abstract.hh> |
20 |
|
|
#include <sot/core/matrix-geometry.hh> |
21 |
|
|
|
22 |
|
|
/* --------------------------------------------------------------------- */ |
23 |
|
|
/* --- API ------------------------------------------------------------- */ |
24 |
|
|
/* --------------------------------------------------------------------- */ |
25 |
|
|
|
26 |
|
|
#if defined(WIN32) |
27 |
|
|
#if defined(feature_vector3_EXPORTS) |
28 |
|
|
#define SOTFEATUREVECTOR3_EXPORT __declspec(dllexport) |
29 |
|
|
#else |
30 |
|
|
#define SOTFEATUREVECTOR3_EXPORT __declspec(dllimport) |
31 |
|
|
#endif |
32 |
|
|
#else |
33 |
|
|
#define SOTFEATUREVECTOR3_EXPORT |
34 |
|
|
#endif |
35 |
|
|
|
36 |
|
|
/* --------------------------------------------------------------------- */ |
37 |
|
|
/* --- CLASS ----------------------------------------------------------- */ |
38 |
|
|
/* --------------------------------------------------------------------- */ |
39 |
|
|
|
40 |
|
|
namespace dynamicgraph { |
41 |
|
|
namespace sot { |
42 |
|
|
|
43 |
|
|
/*! |
44 |
|
|
\class FeatureVector3 |
45 |
|
|
\brief Class that defines point-3d control feature |
46 |
|
|
*/ |
47 |
|
|
class SOTFEATUREVECTOR3_EXPORT FeatureVector3 : public FeatureAbstract { |
48 |
|
|
public: |
49 |
|
|
static const std::string CLASS_NAME; |
50 |
|
✗ |
virtual const std::string &getClassName(void) const { return CLASS_NAME; } |
51 |
|
|
|
52 |
|
✗ |
DECLARE_NO_REFERENCE; |
53 |
|
|
|
54 |
|
|
protected: |
55 |
|
|
/* --- SIGNALS ------------------------------------------------------------ */ |
56 |
|
|
public: |
57 |
|
|
dynamicgraph::SignalPtr<dynamicgraph::Vector, int> vectorSIN; |
58 |
|
|
dynamicgraph::SignalPtr<MatrixHomogeneous, int> positionSIN; |
59 |
|
|
dynamicgraph::SignalPtr<dynamicgraph::Matrix, int> articularJacobianSIN; |
60 |
|
|
dynamicgraph::SignalPtr<dynamicgraph::Vector, int> positionRefSIN; |
61 |
|
|
|
62 |
|
|
using FeatureAbstract::errorSOUT; |
63 |
|
|
using FeatureAbstract::jacobianSOUT; |
64 |
|
|
using FeatureAbstract::selectionSIN; |
65 |
|
|
|
66 |
|
|
public: |
67 |
|
|
FeatureVector3(const std::string &name); |
68 |
|
✗ |
virtual ~FeatureVector3(void) {} |
69 |
|
|
|
70 |
|
|
virtual unsigned int &getDimension(unsigned int &dim, int time); |
71 |
|
|
|
72 |
|
|
virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res, |
73 |
|
|
int time); |
74 |
|
|
virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res, |
75 |
|
|
int time); |
76 |
|
|
|
77 |
|
|
virtual void display(std::ostream &os) const; |
78 |
|
|
}; |
79 |
|
|
|
80 |
|
|
} /* namespace sot */ |
81 |
|
|
} /* namespace dynamicgraph */ |
82 |
|
|
|
83 |
|
|
#endif // #ifndef __SOT_FEATURE_VECTOR3_HH__ |
84 |
|
|
|
85 |
|
|
/* |
86 |
|
|
* Local variables: |
87 |
|
|
* c-basic-offset: 2 |
88 |
|
|
* End: |
89 |
|
|
*/ |
90 |
|
|
|