sot-talos-balance  1.6.0
dummy-walking-pattern-generator.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2018, Gepetto team, LAAS-CNRS
3  *
4  * This file is part of sot-talos-balance.
5  * sot-talos-balance is free software: you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public License
7  * as published by the Free Software Foundation, either version 3 of
8  * the License, or (at your option) any later version.
9  * sot-talos-balance is distributed in the hope that it will be
10  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details. You should
13  * have received a copy of the GNU Lesser General Public License along
14  * with sot-talos-balance. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef __sot_talos_balance_dummy_walking_pattern_generator_H__
18 #define __sot_talos_balance_dummy_walking_pattern_generator_H__
19 
20 /* --------------------------------------------------------------------- */
21 /* --- API ------------------------------------------------------------- */
22 /* --------------------------------------------------------------------- */
23 
24 #if defined (WIN32)
25 # if defined (dummy_walking_pattern_generator_EXPORTS)
26 # define DUMMYWALKINGPATTERNGENERATOR_EXPORT __declspec(dllexport)
27 # else
28 # define DUMMYWALKINGPATTERNGENERATOR_EXPORT __declspec(dllimport)
29 # endif
30 #else
31 # define DUMMYWALKINGPATTERNGENERATOR_EXPORT
32 #endif
33 
34 
35 /* --------------------------------------------------------------------- */
36 /* --- INCLUDE --------------------------------------------------------- */
37 /* --------------------------------------------------------------------- */
38 
39 #include <dynamic-graph/signal-helper.h>
40 #include <map>
41 #include "boost/assign.hpp"
42 
43 #include <sot/core/robot-utils.hh>
44 #include <sot/core/matrix-geometry.hh>
45 #include <dynamic-graph/linear-algebra.h>
46 
47 namespace dynamicgraph {
48  namespace sot {
49  namespace talos_balance {
50 
51  /* --------------------------------------------------------------------- */
52  /* --- CLASS ----------------------------------------------------------- */
53  /* --------------------------------------------------------------------- */
54 
56  : public ::dynamicgraph::Entity
57  {
58  DYNAMIC_GRAPH_ENTITY_DECL();
59 
60  public:
61  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
62 
63  /* --- CONSTRUCTOR ---- */
64  DummyWalkingPatternGenerator( const std::string & name );
65 
66  void init();
67 
68  /* --- SIGNALS --- */
69  DECLARE_SIGNAL_IN(omega, double);
70  DECLARE_SIGNAL_IN(rho, double);
71  DECLARE_SIGNAL_IN(phase, int);
72 
73  DECLARE_SIGNAL_IN(footLeft, MatrixHomogeneous);
74  DECLARE_SIGNAL_IN(footRight, MatrixHomogeneous);
75  DECLARE_SIGNAL_IN(waist, MatrixHomogeneous);
76 
77  DECLARE_SIGNAL_IN(com, dynamicgraph::Vector);
78  DECLARE_SIGNAL_IN(vcom, dynamicgraph::Vector);
79  DECLARE_SIGNAL_IN(acom, dynamicgraph::Vector);
80 
81  DECLARE_SIGNAL_IN(zmp, dynamicgraph::Vector);
82 
83  DECLARE_SIGNAL_IN(referenceFrame, MatrixHomogeneous);
84 
85  DECLARE_SIGNAL_INNER(rf, MatrixHomogeneous);
86 
87  DECLARE_SIGNAL_OUT(comDes, dynamicgraph::Vector);
88  DECLARE_SIGNAL_OUT(vcomDes, dynamicgraph::Vector);
89  DECLARE_SIGNAL_OUT(acomDes, dynamicgraph::Vector);
90  DECLARE_SIGNAL_OUT(dcmDes, dynamicgraph::Vector);
91  DECLARE_SIGNAL_OUT(zmpDes, dynamicgraph::Vector);
92 
93  DECLARE_SIGNAL_OUT(footLeftDes, MatrixHomogeneous);
94  DECLARE_SIGNAL_OUT(footRightDes, MatrixHomogeneous);
95  DECLARE_SIGNAL_OUT(waistDes, MatrixHomogeneous);
96 
97  DECLARE_SIGNAL_OUT(omegaDes, double);
98  DECLARE_SIGNAL_OUT(rhoDes, double);
99  DECLARE_SIGNAL_OUT(phaseDes, int);
100 
101  /* --- COMMANDS --- */
102  /* --- ENTITY INHERITANCE --- */
103  virtual void display( std::ostream& os ) const;
104 
105  protected:
107 
108  dynamicgraph::Vector actInv(MatrixHomogeneous m, dynamicgraph::Vector v);
109  MatrixHomogeneous actInv(MatrixHomogeneous m1, MatrixHomogeneous m2);
110 
111  }; // class DummyWalkingPatternGenerator
112 
113  } // namespace talos_balance
114  } // namespace sot
115 } // namespace dynamicgraph
116 
117 
118 
119 #endif // #ifndef __sot_talos_balance_dummy_walking_pattern_generator_H__
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hh:40
#define DUMMYWALKINGPATTERNGENERATOR_EXPORT