sot-talos-balance  2.0.5
Collection of dynamic-graph entities aimed at implementing balance control on talos.
foot-force-difference-controller.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_foot_force_difference_controller_H__
18 #define __sot_talos_balance_foot_force_difference_controller_H__
19 
20 /* --------------------------------------------------------------------- */
21 /* --- API ------------------------------------------------------------- */
22 /* --------------------------------------------------------------------- */
23 
24 #if defined(WIN32)
25 #if defined(foot_force_difference_controller_EXPORTS)
26 #define FOOT_FORCE_DIFFERENCE_CONTROLLER_EXPORT __declspec(dllexport)
27 #else
28 #define FOOT_FORCE_DIFFERENCE_CONTROLLER_EXPORT __declspec(dllimport)
29 #endif
30 #else
31 #define FOOT_FORCE_DIFFERENCE_CONTROLLER_EXPORT
32 #endif
33 
34 /* --------------------------------------------------------------------- */
35 /* --- INCLUDE --------------------------------------------------------- */
36 /* --------------------------------------------------------------------- */
37 
38 #include <dynamic-graph/linear-algebra.h>
39 #include <dynamic-graph/signal-helper.h>
40 
41 #include <map>
42 #include <sot/core/matrix-geometry.hh>
43 
44 #include "boost/assign.hpp"
45 
46 namespace dynamicgraph {
47 namespace sot {
48 namespace talos_balance {
49 
50 /* --------------------------------------------------------------------- */
51 /* --- CLASS ----------------------------------------------------------- */
52 /* --------------------------------------------------------------------- */
53 
55  : public ::dynamicgraph::Entity {
56  DYNAMIC_GRAPH_ENTITY_DECL();
57 
58  public:
59  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
60 
61  /* --- CONSTRUCTOR ---- */
62  FootForceDifferenceController(const std::string& name);
63 
64  void init();
65 
66  /* --- SIGNALS --- */
67  DECLARE_SIGNAL_IN(phase, int);
68 
69  DECLARE_SIGNAL_IN(gainSwing, double);
70  DECLARE_SIGNAL_IN(gainStance, double);
71  DECLARE_SIGNAL_IN(gainDouble, double);
72 
73  DECLARE_SIGNAL_IN(dfzAdmittance, double);
74  DECLARE_SIGNAL_IN(vdcFrequency, double);
75  DECLARE_SIGNAL_IN(vdcDamping, double);
76 
77  DECLARE_SIGNAL_IN(swingAdmittance, dynamicgraph::Vector);
78 
79  DECLARE_SIGNAL_IN(wrenchRightDes, dynamicgraph::Vector);
80  DECLARE_SIGNAL_IN(wrenchLeftDes, dynamicgraph::Vector);
81  DECLARE_SIGNAL_IN(wrenchRight, dynamicgraph::Vector);
82  DECLARE_SIGNAL_IN(wrenchLeft, dynamicgraph::Vector);
83 
84  DECLARE_SIGNAL_IN(posRightDes, MatrixHomogeneous);
85  DECLARE_SIGNAL_IN(posLeftDes, MatrixHomogeneous);
86  DECLARE_SIGNAL_IN(posRight, MatrixHomogeneous);
87  DECLARE_SIGNAL_IN(posLeft, MatrixHomogeneous);
88 
89  DECLARE_SIGNAL_INNER(dz_ctrl, double);
90  DECLARE_SIGNAL_INNER(dz_pos, double);
91 
92  DECLARE_SIGNAL_OUT(vRight, dynamicgraph::Vector);
93  DECLARE_SIGNAL_OUT(vLeft, dynamicgraph::Vector);
94 
95  DECLARE_SIGNAL_OUT(gainRight, double);
96  DECLARE_SIGNAL_OUT(gainLeft, double);
97 
98  /* --- COMMANDS --- */
99  /* --- ENTITY INHERITANCE --- */
100  virtual void display(std::ostream& os) const;
101 
102  protected:
103  Eigen::Vector3d calcSwingAdmittance(
106 
107  double m_eps;
108  bool
110 
111 }; // class FootForceDifferenceController
112 
113 } // namespace talos_balance
114 } // namespace sot
115 } // namespace dynamicgraph
116 
117 #endif // #ifndef __sot_talos_balance_foot_force_difference_controller_H__
sot_talos_balance.test.appli_admittance_end_effector.sot
sot
Definition: appli_admittance_end_effector.py:117
sot_talos_balance.test.appli_dcm_zmp_control_ffdc.swingAdmittance
list swingAdmittance
Definition: appli_dcm_zmp_control_ffdc.py:296
dynamicgraph
Definition: treeview.dox:24
dynamicgraph::sot::talos_balance::FootForceDifferenceController::m_initSucceeded
bool m_initSucceeded
Definition: foot-force-difference-controller.hh:109
sot_talos_balance.test.appli_dcm_zmp_control_ffdc.vdcDamping
float vdcDamping
Definition: appli_dcm_zmp_control_ffdc.py:295
sot_talos_balance.test.appli_dcm_zmp_control_ffdc.vdcFrequency
float vdcFrequency
Definition: appli_dcm_zmp_control_ffdc.py:294
dynamicgraph::sot::talos_balance::FootForceDifferenceController
Definition: foot-force-difference-controller.hh:54
sot_talos_balance.test.appli_dcm_zmp_control_ffdc.gainDouble
float gainDouble
Definition: appli_dcm_zmp_control_ffdc.py:300
dynamicgraph::sot::talos_balance::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hh:36
sot_talos_balance.test.script_test_end_effector.wrench
wrench
Definition: script_test_end_effector.py:9
FOOT_FORCE_DIFFERENCE_CONTROLLER_EXPORT
#define FOOT_FORCE_DIFFERENCE_CONTROLLER_EXPORT
Definition: foot-force-difference-controller.hh:31
sot_talos_balance.test.appli_dcm_zmp_control_ffdc.gainSwing
float gainSwing
Definition: appli_dcm_zmp_control_ffdc.py:298
dynamicgraph::sot::talos_balance::FootForceDifferenceController::m_eps
double m_eps
Definition: foot-force-difference-controller.hh:107
sot_talos_balance.test.appli_dcm_zmp_control_ffdc.dfzAdmittance
int dfzAdmittance
Definition: appli_dcm_zmp_control_ffdc.py:293
sot_talos_balance.test.appli_dcm_zmp_control_ffdc.gainStance
float gainStance
Definition: appli_dcm_zmp_control_ffdc.py:299
sot_talos_balance.test.appli_dcm_zmp_control.name
name
Definition: appli_dcm_zmp_control.py:298