sot-core  4.11.1
Hierarchical task solver plug-in for dynamic-graph.
vector-to-rotation.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 __SOTVECTORTOMATRIX_HH
11 #define __SOTVECTORTOMATRIX_HH
12 
13 #include <dynamic-graph/all-signals.h>
14 #include <dynamic-graph/entity.h>
16 
17 /* Matrix */
18 #include <dynamic-graph/linear-algebra.h>
19 
20 /* STD */
21 #include <vector>
22 
23 /* --------------------------------------------------------------------- */
24 /* --- API ------------------------------------------------------------- */
25 /* --------------------------------------------------------------------- */
26 
27 #if defined(WIN32)
28 #if defined(vector_to_rotation_EXPORTS)
29 #define SOTVECTORTOROTATION_EXPORT __declspec(dllexport)
30 #else
31 #define SOTVECTORTOROTATION_EXPORT __declspec(dllimport)
32 #endif
33 #else
34 #define SOTVECTORTOROTATION_EXPORT
35 #endif
36 
37 /* --------------------------------------------------------------------- */
38 /* --- VECTOR ---------------------------------------------------------- */
39 /* --------------------------------------------------------------------- */
40 namespace dynamicgraph {
41 namespace sot {
42 
43 class SOTVECTORTOROTATION_EXPORT VectorToRotation : public dynamicgraph::Entity {
44  enum sotAxis { AXIS_X, AXIS_Y, AXIS_Z };
45 
46  unsigned int size;
47  std::vector<sotAxis> axes;
48 
49 public:
50  static const std::string CLASS_NAME;
51  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
52 
53  VectorToRotation(const std::string &name);
54 
55  virtual ~VectorToRotation(void) {}
56 
57  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> SIN;
58  dynamicgraph::SignalTimeDependent<MatrixRotation, int> SOUT;
59 
60  MatrixRotation &computeRotation(const dynamicgraph::Vector &angles,
61  MatrixRotation &res);
62 };
63 
64 } /* namespace sot */
65 } /* namespace dynamicgraph */
66 
67 #endif // #ifndef __SOTVECTORTOMATRIX_HH
dynamicgraph::sot::VectorToRotation::~VectorToRotation
virtual ~VectorToRotation(void)
Definition: vector-to-rotation.hh:55
dynamicgraph
Definition: abstract-sot-external-interface.hh:17
dynamicgraph::sot::VectorToRotation::SIN
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > SIN
Definition: vector-to-rotation.hh:57
dynamicgraph::sot::VectorToRotation::CLASS_NAME
static const std::string CLASS_NAME
Definition: vector-to-rotation.hh:50
dynamicgraph::sot::VectorToRotation::SOUT
dynamicgraph::SignalTimeDependent< MatrixRotation, int > SOUT
Definition: vector-to-rotation.hh:58
dynamicgraph::sot::VectorToRotation
Definition: vector-to-rotation.hh:43
dynamicgraph::sot::VectorToRotation::getClassName
virtual const std::string & getClassName(void) const
Definition: vector-to-rotation.hh:51
matrix-geometry.hh
SOTVECTORTOROTATION_EXPORT
#define SOTVECTORTOROTATION_EXPORT
Definition: vector-to-rotation.hh:34
dynamicgraph::sot::MatrixRotation
Eigen::Matrix< double, 3, 3 > SOT_CORE_EXPORT MatrixRotation
Definition: matrix-geometry.hh:75