sot-talos-balance  2.0.5
Collection of dynamic-graph entities aimed at implementing balance control on talos.
ankle-joint-selector.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_ankle_joint_selector_H__
18 #define __sot_talos_balance_ankle_joint_selector_H__
19 
20 /* --------------------------------------------------------------------- */
21 /* --- API ------------------------------------------------------------- */
22 /* --------------------------------------------------------------------- */
23 
24 #if defined(WIN32)
25 #if defined(position_controller_EXPORTS)
26 #define ANKLE_JOINT_SELECTOR_EXPORT __declspec(dllexport)
27 #else
28 #define ANKLE_JOINT_SELECTOR_EXPORT __declspec(dllimport)
29 #endif
30 #else
31 #define ANKLE_JOINT_SELECTOR_EXPORT
32 #endif
33 
34 /* --------------------------------------------------------------------- */
35 /* --- INCLUDE --------------------------------------------------------- */
36 /* --------------------------------------------------------------------- */
37 
38 #include <dynamic-graph/signal-helper.h>
39 
40 #include <map>
41 #include <sot/core/flags.hh>
42 
43 #include "boost/assign.hpp"
44 
45 namespace dynamicgraph {
46 namespace sot {
47 namespace talos_balance {
48 
49 /* --------------------------------------------------------------------- */
50 /* --- CLASS ----------------------------------------------------------- */
51 /* --------------------------------------------------------------------- */
52 
54  : public ::dynamicgraph::Entity {
55  DYNAMIC_GRAPH_ENTITY_DECL();
56 
57  public:
58  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
59 
60  /* --- CONSTRUCTOR ---- */
61  AnkleJointSelector(const std::string& name);
62 
63  void init(const int& n);
64 
65  /* --- SIGNALS --- */
66  DECLARE_SIGNAL_IN(phase, int);
67 
68  DECLARE_SIGNAL_IN(rightRollCoupled, dynamicgraph::Vector);
69  DECLARE_SIGNAL_IN(rightRollDecoupled, dynamicgraph::Vector);
70  DECLARE_SIGNAL_IN(rightPitchCoupled, dynamicgraph::Vector);
71  DECLARE_SIGNAL_IN(rightPitchDecoupled, dynamicgraph::Vector);
72 
73  DECLARE_SIGNAL_IN(leftRollCoupled, dynamicgraph::Vector);
74  DECLARE_SIGNAL_IN(leftRollDecoupled, dynamicgraph::Vector);
75  DECLARE_SIGNAL_IN(leftPitchCoupled, dynamicgraph::Vector);
76  DECLARE_SIGNAL_IN(leftPitchDecoupled, dynamicgraph::Vector);
77 
78  DECLARE_SIGNAL_OUT(selecLeft, Flags);
79  DECLARE_SIGNAL_OUT(selecRight, Flags);
80 
81  DECLARE_SIGNAL_OUT(rightRoll, dynamicgraph::Vector);
82  DECLARE_SIGNAL_OUT(rightPitch, dynamicgraph::Vector);
83 
84  DECLARE_SIGNAL_OUT(leftRoll, dynamicgraph::Vector);
85  DECLARE_SIGNAL_OUT(leftPitch, dynamicgraph::Vector);
86 
87  /* --- COMMANDS --- */
88  /* --- ENTITY INHERITANCE --- */
89  virtual void display(std::ostream& os) const;
90 
91  protected:
92  Flags m_zeros;
93  Flags m_ones;
94  int m_n;
95  bool
97 
98 }; // class AnkleJointSelector
99 
100 } // namespace talos_balance
101 } // namespace sot
102 } // namespace dynamicgraph
103 
104 #endif // #ifndef __sot_talos_balance_ankle_joint_selector_H__
sot_talos_balance.test.appli_admittance_end_effector.sot
sot
Definition: appli_admittance_end_effector.py:117
dynamicgraph::sot::talos_balance::AnkleJointSelector
Definition: ankle-joint-selector.hh:53
dynamicgraph
Definition: treeview.dox:24
dynamicgraph::sot::talos_balance::AnkleJointSelector::m_initSucceeded
bool m_initSucceeded
Definition: ankle-joint-selector.hh:96
dynamicgraph::sot::talos_balance::AnkleJointSelector::m_zeros
Flags m_zeros
Definition: ankle-joint-selector.hh:92
dynamicgraph::sot::talos_balance::AnkleJointSelector::m_ones
Flags m_ones
Definition: ankle-joint-selector.hh:93
dynamicgraph::sot::talos_balance::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hh:36
ANKLE_JOINT_SELECTOR_EXPORT
#define ANKLE_JOINT_SELECTOR_EXPORT
Definition: ankle-joint-selector.hh:31
sot_talos_balance.test.appli_dcm_zmp_control.name
name
Definition: appli_dcm_zmp_control.py:298
dynamicgraph::sot::talos_balance::AnkleJointSelector::m_n
int m_n
Definition: ankle-joint-selector.hh:94