parameters.h
Go to the documentation of this file.
1 /******************************************************************************
2 Copyright (c) 2018, Alexander W. Winkler. All rights reserved.
3 
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6 
7 * Redistributions of source code must retain the above copyright notice, this
8  list of conditions and the following disclaimer.
9 
10 * Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 * Neither the name of the copyright holder nor the names of its
15  contributors may be used to endorse or promote products derived from
16  this software without specific prior written permission.
17 
18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 ******************************************************************************/
29 
30 #ifndef TOWR_OPTIMIZATION_PARAMETERS_H_
31 #define TOWR_OPTIMIZATION_PARAMETERS_H_
32 
33 #include <vector>
34 
35 
36 namespace towr {
37 
41 
45 struct Parameters {
46 
47  using CostWeights = std::vector<std::pair<CostName, double>>;
48  using UsedConstraints = std::vector<ConstraintName>;
49  using VecTimes = std::vector<double>;
50  using EEID = unsigned int;
51 
55  Parameters();
56  virtual ~Parameters() = default;
57 
60 
63 
65  double t_total_;
66 
69 
72 
75 
78 
80  std::vector<VecTimes> ee_phase_durations_;
81 
83  std::vector<bool> ee_in_contact_at_start_;
84 
87 
90 
93 
96 
99 
100 
101 
104 
106  int GetPhaseCount(EEID ee) const;
107 
109  bool OptimizeTimings() const;
110 
112  int GetEECount() const;
113 };
114 
115 } // namespace towr
116 
117 #endif /* TOWR_OPTIMIZATION_PARAMETERS_H_ */
int ee_polynomials_per_swing_phase_
Number of polynomials to parameterize foot movement during swing phases.
Definition: parameters.h:92
double dt_constraint_base_motion_
Interval at which the base motion constraint is enforced.
Definition: parameters.h:74
UsedConstraints constraints_
Which constraints should be used in the optimization problem.
Definition: parameters.h:59
double min_phase_duration_
When optimizing over phase duration, this is the minimum allowed.
Definition: parameters.h:86
std::vector< bool > ee_in_contact_at_start_
True if the foot is initially in contact with the terrain.
Definition: parameters.h:83
double max_phase_duration_
When optimizing over phase duration, this is is maximum allowed.
Definition: parameters.h:89
CostWeights costs_
Which costs should be used in the optimiation problem.
Definition: parameters.h:62
int GetPhaseCount(EEID ee) const
The number of phases allowed for endeffector ee.
Definition: parameters.cc:105
int GetEECount() const
The number of endeffectors.
Definition: parameters.cc:111
virtual ~Parameters()=default
int force_polynomials_per_stance_phase_
Number of polynomials to parameterize each contact force during stance phase.
Definition: parameters.h:95
Parameters()
Default parameters to use.
Definition: parameters.cc:36
std::vector< VecTimes > ee_phase_durations_
Number and initial duration of each foot&#39;s swing and stance phases.
Definition: parameters.h:80
VecTimes GetBasePolyDurations() const
The durations of each base polynomial in the spline (lin+ang).
Definition: parameters.cc:87
double dt_constraint_dynamic_
Interval at which the dynamic constraint is enforced.
Definition: parameters.h:68
ConstraintName
Definition: parameters.h:38
double force_limit_in_norm_
The maximum allowable force [N] in normal direction.
Definition: parameters.h:98
bool OptimizeTimings() const
True if the phase durations should be optimized over.
Definition: parameters.cc:79
double dt_constraint_range_of_motion_
Interval at which the range of motion constraint is enforced.
Definition: parameters.h:71
Holds the parameters to tune the optimization problem.
Definition: parameters.h:45
double t_total_
Total duration [s] of the walking motion.
Definition: parameters.h:65
std::vector< ConstraintName > UsedConstraints
Definition: parameters.h:48
unsigned int EEID
Definition: parameters.h:50
std::vector< std::pair< CostName, double >> CostWeights
Definition: parameters.h:47
CostName
Definition: parameters.h:40
double duration_base_polynomial_
Fixed duration of each cubic polynomial describing the base motion.
Definition: parameters.h:77
std::vector< double > VecTimes
Definition: parameters.h:49


towr_core
Author(s): Alexander W. Winkler
autogenerated on Sat Apr 7 2018 02:15:57