mass-apparent.h
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_SOTMASSAPPARENT_H__
11 #define __SOT_SOTMASSAPPARENT_H__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* Matrix */
18 #include <dynamic-graph/linear-algebra.h>
19 
20 /* SOT */
21 #include <dynamic-graph/entity.h>
22 #include <dynamic-graph/signal-ptr.h>
23 #include <dynamic-graph/signal-time-dependent.h>
24 #include <sot/core/matrix-geometry.hh>
25 
26 /* STD */
27 #include <string>
28 
29 /* --------------------------------------------------------------------- */
30 /* --- API ------------------------------------------------------------- */
31 /* --------------------------------------------------------------------- */
32 
33 #if defined(WIN32)
34 #if defined(mass_apparent_EXPORTS)
35 #define SOTMASSAPPARENT_EXPORT __declspec(dllexport)
36 #else
37 #define SOTMASSAPPARENT_EXPORT __declspec(dllimport)
38 #endif
39 #else
40 #define SOTMASSAPPARENT_EXPORT
41 #endif
42 
43 namespace dynamicgraph {
44 namespace sot {
45 namespace dg = dynamicgraph;
46 
47 /* --------------------------------------------------------------------- */
48 /* --- CLASS ----------------------------------------------------------- */
49 /* --------------------------------------------------------------------- */
50 class SOTMASSAPPARENT_EXPORT MassApparent : public dg::Entity {
51  public:
52  static const std::string CLASS_NAME;
53  virtual const std::string& getClassName(void) const { return CLASS_NAME; }
54 
55  public: /* --- CONSTRUCTION --- */
56  MassApparent(const std::string& name);
57  virtual ~MassApparent(void);
58 
59  public: /* --- SIGNAL --- */
60  dg::SignalPtr<dynamicgraph::Matrix, int> jacobianSIN;
61  dg::SignalPtr<dynamicgraph::Matrix, int> inertiaInverseSIN;
62  dg::SignalTimeDependent<dynamicgraph::Matrix, int> massInverseSOUT;
63  dg::SignalTimeDependent<dynamicgraph::Matrix, int> massSOUT;
64 
65  dg::SignalPtr<dynamicgraph::Matrix, int> inertiaSIN;
66  dg::SignalTimeDependent<dynamicgraph::Matrix, int> inertiaInverseSOUT;
67 
68  public: /* --- FUNCTIONS --- */
69  dynamicgraph::Matrix& computeMassInverse(dynamicgraph::Matrix& res, const int& time);
70  dynamicgraph::Matrix& computeMass(dynamicgraph::Matrix& res, const int& time);
71  dynamicgraph::Matrix& computeInertiaInverse(dynamicgraph::Matrix& res, const int& time);
72 };
73 
74 } // namespace sot
75 } // namespace dynamicgraph
76 
77 #endif // #ifndef __SOT_SOTMASSAPPARENT_H__
dg::SignalTimeDependent< dynamicgraph::Matrix, int > massInverseSOUT
Definition: mass-apparent.h:62
virtual const std::string & getClassName(void) const
Definition: mass-apparent.h:53
dg::SignalTimeDependent< dynamicgraph::Matrix, int > massSOUT
Definition: mass-apparent.h:63
Definition: mass-apparent.h:50
static const std::string CLASS_NAME
Definition: mass-apparent.h:52
dg::SignalPtr< dynamicgraph::Matrix, int > jacobianSIN
Definition: mass-apparent.h:60
#define SOTMASSAPPARENT_EXPORT
Definition: mass-apparent.h:40
dg::SignalPtr< dynamicgraph::Matrix, int > inertiaSIN
Definition: mass-apparent.h:65
dg::SignalTimeDependent< dynamicgraph::Matrix, int > inertiaInverseSOUT
Definition: mass-apparent.h:66
Definition: angle-estimator.h:42
dg::SignalPtr< dynamicgraph::Matrix, int > inertiaInverseSIN
Definition: mass-apparent.h:61