hpp-bezier-com-traj 6.0.0
Multi contact trajectory generation for the COM using Bezier curves
Loading...
Searching...
No Matches
data.hh
Go to the documentation of this file.
1/*
2 * Copyright 2018, LAAS-CNRS
3 * Author: Steve Tonneau
4 */
5
6#ifndef BEZIER_COM_TRAJ_LIB_DATA_H
7#define BEZIER_COM_TRAJ_LIB_DATA_H
8
9#include <ndcurves/bezier_curve.h>
10
11#include <Eigen/Dense>
17#include <hpp/centroidal-dynamics/centroidal_dynamics.hh>
18#include <vector>
19
20namespace bezier_com_traj {
29 : contactPhase_(0),
30 Kin_(Eigen::Matrix3d::Zero()),
31 kin_(VectorX::Zero(0)),
32 Ang_(Eigen::Matrix3d::Zero()),
33 ang_(VectorX::Zero(0)) {}
34
36 : contactPhase_(
37 new centroidal_dynamics::Equilibrium(*(other.contactPhase_))),
38 Kin_(other.Kin_),
39 kin_(other.kin_),
40 Ang_(other.Ang_),
41 ang_(other.ang_) {}
42
43 ContactData(centroidal_dynamics::Equilibrium* contactPhase)
44 : contactPhase_(contactPhase),
45 Kin_(Eigen::Matrix3d::Zero()),
46 kin_(VectorX::Zero(0)),
47 Ang_(Eigen::Matrix3d::Zero()),
48 ang_(VectorX::Zero(0)) {}
50
51 centroidal_dynamics::Equilibrium* contactPhase_;
52 MatrixX3 Kin_; // inequality kinematic constraints
54 MatrixX3 Ang_; // inequality angular momentum constraints
56};
57
65 : flag_(INIT_POS | INIT_VEL | END_VEL | END_POS),
66 constraintAcceleration_(false),
67 maxAcceleration_(10.),
68 reduce_h_(1e-3) {}
69
70 Constraints(ConstraintFlag flag)
71 : flag_(flag),
72 constraintAcceleration_(false),
73 maxAcceleration_(10.),
74 reduce_h_(1e-3) {}
75
77
78 ConstraintFlag flag_;
81 double reduce_h_;
82};
83
94 : c0_(point_t::Zero()),
95 dc0_(point_t::Zero()),
96 ddc0_(point_t::Zero()),
97 j0_(point_t::Zero()),
98 c1_(point_t::Zero()),
99 dc1_(point_t::Zero()),
100 ddc1_(point_t::Zero()),
101 j1_(point_t::Zero()),
102 useAngularMomentum_(false),
103 costFunction_(ACCELERATION),
104 representation_(DOUBLE_DESCRIPTION) {}
105
106 std::vector<ContactData> contacts_;
107 point_t c0_, dc0_, ddc0_, j0_, c1_, dc1_, ddc1_, j1_;
111 CostFunction costFunction_;
112 GIWCRepresentation representation_;
113};
114
116
123 : ResultData(),
124 c_of_t_(bezier_t::zero(3)),
125 dL_of_t_(bezier_t::zero(3)),
126 dc1_(point_t::Zero()),
127 ddc1_(point_t::Zero()) {}
129
130 bezier_t c_of_t_; // center of mass trajectory
131 bezier_t dL_of_t_; // angular momentum derivative trajectory
132 point_t dc1_; // terminal velocity
133 point_t ddc1_; // terminal acceleration
134};
135} // end namespace bezier_com_traj
136
137#endif
INIT_VEL
Definition flags.hh:21
END_VEL
Definition flags.hh:24
ACCELERATION
Definition flags.hh:13
END_POS
Definition flags.hh:23
INIT_POS
Definition flags.hh:20
DOUBLE_DESCRIPTION
Definition flags.hh:37
#define BEZIER_COM_TRAJ_DLLAPI
Definition local_config.hh:52
Definition common_solve_methods.hh:15
centroidal_dynamics::VectorX VectorX
Definition definitions.hh:24
Eigen::Matrix< value_type, Eigen::Dynamic, 3 > MatrixX3
Definition definitions.hh:20
solvers::ResultData ResultData
Definition data.hh:115
Eigen::Vector3d point_t
Definition definitions.hh:42
ndcurves::bezier_curve< double, double, true, point_t > bezier_t
Definition definitions.hh:55
Used to define the constraints on the trajectory generation problem. Flags are used to constrain init...
Definition data.hh:63
Constraints(ConstraintFlag flag)
Definition data.hh:70
double reduce_h_
Definition data.hh:81
bool constraintAcceleration_
Definition data.hh:79
Constraints()
Definition data.hh:64
double maxAcceleration_
Definition data.hh:80
~Constraints()
Definition data.hh:76
ConstraintFlag flag_
Definition data.hh:78
Contact data contains all the contact information relative to a contact phase: contact points and nor...
Definition data.hh:27
MatrixX3 Kin_
Definition data.hh:52
ContactData(centroidal_dynamics::Equilibrium *contactPhase)
Definition data.hh:43
ContactData(const ContactData &other)
Definition data.hh:35
~ContactData()
Definition data.hh:49
centroidal_dynamics::Equilibrium * contactPhase_
Definition data.hh:51
MatrixX3 Ang_
Definition data.hh:54
VectorX kin_
Definition data.hh:53
ContactData()
Definition data.hh:28
VectorX ang_
Definition data.hh:55
Defines all the inputs of the problem: Initial and terminal constraints, as well as selected cost fun...
Definition data.hh:92
CostFunction costFunction_
Definition data.hh:111
ProblemData()
Definition data.hh:93
std::vector< ContactData > contacts_
Definition data.hh:106
point_t l0_
Definition data.hh:108
point_t c0_
Definition data.hh:107
GIWCRepresentation representation_
Definition data.hh:112
bool useAngularMomentum_
Definition data.hh:109
Constraints constraints_
Definition data.hh:110
Specialized ResultData that computes the Bezier curves corresponding to the computed trajectory.
Definition data.hh:121
point_t ddc1_
Definition data.hh:133
ResultDataCOMTraj()
Definition data.hh:122
~ResultDataCOMTraj()
Definition data.hh:128
bezier_t c_of_t_
Definition data.hh:130
point_t dc1_
Definition data.hh:132
bezier_t dL_of_t_
Definition data.hh:131
Struct used to return the results of the trajectory generation problem.
Definition solver-abstract.hpp:52