85 std::vector<double> base_spline_timings_;
90 while (t_left > eps) {
91 double duration = t_left>dt? dt : t_left;
92 base_spline_timings_.push_back(duration);
97 return base_spline_timings_;
115 std::vector<double> T_feet;
118 T_feet.push_back(std::accumulate(v.begin(), v.end(), 0.0));
121 double T = T_feet.empty()? 0.0 : T_feet.front();
122 for (
double Tf : T_feet)
123 assert(fabs(Tf - T) < 1e-6);
134 return std::find(v.begin(), v.end(), c) != v.end();
std::pair< double, double > bound_phase_duration_
int GetEECount() const
The number of endeffectors.
int force_polynomials_per_stance_phase_
Number of polynomials to parameterize each contact force during stance phase.
sets RangeOfMotionConstraint
ConstraintName
Identifiers to be used to add certain constraints to the optimization problem.
std::vector< int > bounds_final_ang_vel_
std::vector< int > bounds_final_lin_pos_
which dimensions (x,y,z) of the final base state should be bounded
int ee_polynomials_per_swing_phase_
Number of polynomials to parameterize foot movement during swing phases.
double dt_constraint_range_of_motion_
Interval at which the range of motion constraint is enforced.
std::vector< int > bounds_final_lin_vel_
double duration_base_polynomial_
Fixed duration of each cubic polynomial describing the base motion.
double dt_constraint_dynamic_
Interval at which the dynamic constraint is enforced.
double GetTotalTime() const
Total duration [s] of the motion.
std::vector< VecTimes > ee_phase_durations_
Number and initial duration of each foot's swing and stance phases.
void OptimizePhaseDurations()
Specifies that timings of all feet, so the gait, should be optimized.
double force_limit_in_normal_direction_
The maximum allowable force [N] in normal direction.
int GetPhaseCount(EEID ee) const
The number of phases allowed for endeffector ee.
sets TotalDurationConstraint
double dt_constraint_base_motion_
Interval at which the base motion constraint is enforced.
std::vector< double > VecTimes
std::vector< int > bounds_final_ang_pos_
Parameters()
Default parameters to get started.
std::vector< bool > ee_in_contact_at_start_
True if the foot is initially in contact with the terrain.
UsedConstraints constraints_
Which constraints should be used in the optimization problem.
VecTimes GetBasePolyDurations() const
The durations of each base polynomial in the spline (lin+ang).
bool IsOptimizeTimings() const
True if the phase durations should be optimized over.