sot-core  4.11.8
Hierarchical task solver plug-in for dynamic-graph.
com-freezer.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 __SOT_SOTCOMFREEZER_H_H
11 #define __SOT_SOTCOMFREEZER_H_H
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* Matrix */
18 #include <dynamic-graph/linear-algebra.h>
19 
20 /* SOT */
21 #include <dynamic-graph/all-signals.h>
22 #include <dynamic-graph/entity.h>
23 
24 /* --------------------------------------------------------------------- */
25 /* --- API ------------------------------------------------------------- */
26 /* --------------------------------------------------------------------- */
27 
28 #if defined(WIN32)
29 #if defined(com_freezer_EXPORTS)
30 #define SOTCOMFREEZER_EXPORT __declspec(dllexport)
31 #else
32 #define SOTCOMFREEZER_EXPORT __declspec(dllimport)
33 #endif
34 #else
35 #define SOTCOMFREEZER_EXPORT
36 #endif
37 
38 namespace dynamicgraph {
39 namespace sot {
40 
41 /* --------------------------------------------------------------------- */
42 /* --- CLASS ----------------------------------------------------------- */
43 /* --------------------------------------------------------------------- */
44 
45 class SOTCOMFREEZER_EXPORT CoMFreezer : public dynamicgraph::Entity {
46  public:
47  static const std::string CLASS_NAME;
48  virtual const std::string &getClassName() const { return CLASS_NAME; }
49 
50  private:
51  dynamicgraph::Vector m_lastCoM;
52  bool m_previousPGInProcess;
53  int m_lastStopTime;
54 
55  public: /* --- CONSTRUCTION --- */
56  CoMFreezer(const std::string &name);
57  virtual ~CoMFreezer(void);
58 
59  public: /* --- SIGNAL --- */
60  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> CoMRefSIN;
61  dynamicgraph::SignalPtr<unsigned, int> PGInProcessSIN;
62  dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> freezedCoMSOUT;
63 
64  public: /* --- FUNCTION --- */
65  dynamicgraph::Vector &computeFreezedCoM(dynamicgraph::Vector &freezedCoM,
66  const int &time);
67 
68  public: /* --- PARAMS --- */
69  virtual void display(std::ostream &os) const;
70 };
71 
72 } /* namespace sot */
73 } /* namespace dynamicgraph */
74 
75 #endif /* #ifndef __SOT_SOTCOMFREEZER_H_H */
Definition: com-freezer.hh:45
virtual const std::string & getClassName() const
Definition: com-freezer.hh:48
static const std::string CLASS_NAME
Definition: com-freezer.hh:47
CoMFreezer(const std::string &name)
dynamicgraph::Vector & computeFreezedCoM(dynamicgraph::Vector &freezedCoM, const int &time)
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > freezedCoMSOUT
Definition: com-freezer.hh:62
dynamicgraph::SignalPtr< unsigned, int > PGInProcessSIN
Definition: com-freezer.hh:61
virtual void display(std::ostream &os) const
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > CoMRefSIN
Definition: com-freezer.hh:60
#define SOTCOMFREEZER_EXPORT
Definition: com-freezer.hh:35
Definition: abstract-sot-external-interface.hh:17