zmpreffromcom.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_ZMPREFFROMCOM_H__
11 #define __SOT_ZMPREFFROMCOM_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(zmpreffromcom_EXPORTS)
35 #define SOTZMPREFFROMCOM_EXPORT __declspec(dllexport)
36 #else
37 #define SOTZMPREFFROMCOM_EXPORT __declspec(dllimport)
38 #endif
39 #else
40 #define SOTZMPREFFROMCOM_EXPORT
41 #endif
42 
43 namespace dynamicgraph {
44 namespace sot {
45 namespace dg = dynamicgraph;
46 
47 /* --------------------------------------------------------------------- */
48 /* --- CLASS ----------------------------------------------------------- */
49 /* --------------------------------------------------------------------- */
50 
51 class SOTZMPREFFROMCOM_EXPORT ZmprefFromCom : public dg::Entity {
52  public:
53  static const std::string CLASS_NAME;
54  virtual const std::string& getClassName(void) const { return CLASS_NAME; }
55 
56  public:
57  double dt;
58  const static double DT_DEFAULT; // = 5e-3; // 5ms
59  double footHeight;
60  const static double FOOT_HEIGHT_DEFAULT; // = .105;
61 
62  public: /* --- CONSTRUCTION --- */
63  ZmprefFromCom(const std::string& name);
64  virtual ~ZmprefFromCom(void);
65 
66  public: /* --- SIGNAL --- */
67  dynamicgraph::Vector& computeZmpref(dynamicgraph::Vector& res, const int& time);
68 
69  dg::SignalPtr<MatrixHomogeneous, int> waistPositionSIN;
70  dg::SignalPtr<dynamicgraph::Vector, int> comPositionSIN;
71  dg::SignalPtr<dynamicgraph::Vector, int> dcomSIN;
72  dg::SignalTimeDependent<dynamicgraph::Vector, int> zmprefSOUT;
73 };
74 
75 } /* namespace sot */
76 } /* namespace dynamicgraph */
77 
78 #endif // #ifndef __SOT_ZMPREFFROMCOM_H__
dg::SignalPtr< MatrixHomogeneous, int > waistPositionSIN
Definition: zmpreffromcom.h:69
dg::SignalTimeDependent< dynamicgraph::Vector, int > zmprefSOUT
Definition: zmpreffromcom.h:72
static const double DT_DEFAULT
Definition: zmpreffromcom.h:58
virtual const std::string & getClassName(void) const
Definition: zmpreffromcom.h:54
Definition: zmpreffromcom.h:51
double footHeight
Definition: zmpreffromcom.h:59
dg::SignalPtr< dynamicgraph::Vector, int > dcomSIN
Definition: zmpreffromcom.h:71
dg::SignalPtr< dynamicgraph::Vector, int > comPositionSIN
Definition: zmpreffromcom.h:70
double dt
Definition: zmpreffromcom.h:57
static const double FOOT_HEIGHT_DEFAULT
Definition: zmpreffromcom.h:60
static const std::string CLASS_NAME
Definition: zmpreffromcom.h:53
#define SOTZMPREFFROMCOM_EXPORT
Definition: zmpreffromcom.h:40
Definition: angle-estimator.h:42