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