Loading...
Searching...
No Matches
relative-feet-inequalities.hh
Go to the documentation of this file.
1/*
2 * Copyright 2010,
3 *
4 * Mehdi Benallegue
5 * Andrei Herdt
6 * Olivier Stasse
7 *
8 *
9 * JRL, CNRS/AIST
10 *
11 * This file is part of walkGenJrl.
12 * walkGenJrl is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * walkGenJrl is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Lesser Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with walkGenJrl. If not, see <http://www.gnu.org/licenses/>.
23 *
24 * Research carried out within the scope of the
25 * Joint Japanese-French Robotics Laboratory (JRL)
26 */
27/* This object generate matrix representation of linear
28 constraint based on foot position.
29 It handles a stack of constraint on a sliding mode
30 for QP solving. */
31
32#ifndef _RELATIVE_FEET_INEQUALITIES_
33#define _RELATIVE_FEET_INEQUALITIES_
34
36
40#include <SimplePlugin.hh>
42#include <privatepgtypes.hh>
43
44namespace PatternGeneratorJRL {
45
48class RelativeFeetInequalities : public SimplePlugin {
49
50 //
51 // Public types
52 //
53public:
54 //
55 // Public member functions
56 //
57public:
60 RelativeFeetInequalities(SimplePluginManager *aSPM, PinocchioRobot *aPR);
63
69 void set_vertices(convex_hull_t &ConvexHull,
70 const support_state_t &SupportState, ineq_e type);
71
77 void set_inequalities(convex_hull_t &ConvexHull,
78 const support_state_t &Support, ineq_e type);
79
86 void compute_linear_system(convex_hull_t &ConvexHull,
87 const support_state_t &PrwSupport) const;
88
93 virtual void CallMethod(std::string &Method, std::istringstream &Args);
94
99 void getFeetSize(FootHalfSize &leftFootSize, FootHalfSize &rightFootSize);
100
101 inline double DSFeetDistance() { return DSFeetDistance_; }
102
103 //
104 // Private member functions
105 //
106private:
110 int init_convex_hulls();
111
116 int set_feet_dimensions(PinocchioRobot *aPR);
117
121 int init_feet_constraints();
122
123 //
124 // Private members
125 //
126private:
127 struct edges_s {
128 convex_hull_t LeftSS, RightSS, RightDS, LeftDS;
129 };
130 struct edges_s FootPosEdges_, ZMPPosEdges_;
131
133 convex_hull_t CoMHull_;
134
135 double LeftFPosEdgesX_[5], LeftFPosEdgesY_[5];
136 double RightFPosEdgesX_[5], RightFPosEdgesY_[5];
137
139 FootHalfSize LeftFootSize_, RightFootSize_;
140
142 double SecurityMarginX_;
143 double SecurityMarginY_;
144
146 double DSFeetDistance_;
147};
148} // namespace PatternGeneratorJRL
149#endif /* _RELATIVE_FEET_INEQUALITIES_ */
Definition: FootHalfSize.hh:33
Definition: pinocchiorobot.hh:57
Generate a stack of inequalities relative to feet centers for the whole preview window.
Definition: relative-feet-inequalities.hh:48
void set_vertices(convex_hull_t &ConvexHull, const support_state_t &SupportState, ineq_e type)
Adapt vertices to the support foot and its orientation.
Definition: relative-feet-inequalities.cpp:181
void set_inequalities(convex_hull_t &ConvexHull, const support_state_t &Support, ineq_e type)
Adapt inequalities to the support foot and its orientation.
Definition: relative-feet-inequalities.cpp:219
void compute_linear_system(convex_hull_t &ConvexHull, const support_state_t &PrwSupport) const
Compute the linear inequalities associated with the convex hull specified by a vector of points.
Definition: relative-feet-inequalities.cpp:241
void getFeetSize(FootHalfSize &leftFootSize, FootHalfSize &rightFootSize)
Reimplement the interface of SimplePluginManager.
Definition: relative-feet-inequalities.cpp:341
virtual void CallMethod(std::string &Method, std::istringstream &Args)
Reimplement the interface of SimplePluginManager.
Definition: relative-feet-inequalities.cpp:296
~RelativeFeetInequalities()
Definition: relative-feet-inequalities.cpp:76
double DSFeetDistance()
Definition: relative-feet-inequalities.hh:101
\doc Simulate a rigid body
Definition: patterngeneratorinterface.hh:41