6#ifndef BEZIER_COM_TRAJ_c0_dc0_ddc0_c1_H
7#define BEZIER_COM_TRAJ_c0_dc0_ddc0_c1_H
12namespace c0_dc0_ddc0_c1 {
32 wp.first = -4.0 *
t4 + 4.0 *
t3;
33 wp.second = 1.0 *
pi[0] *
t4 - 4.0 *
pi[0] *
t3 + 6.0 *
pi[0] *
t2 -
34 4.0 *
pi[0] *
t + 1.0 *
pi[0] - 4.0 *
pi[1] *
t4 +
35 12.0 *
pi[1] *
t3 - 12.0 *
pi[1] *
t2 + 4.0 *
pi[1] *
t +
36 6.0 *
pi[2] *
t4 - 12.0 *
pi[2] *
t3 + 6.0 *
pi[2] *
t2 +
49 (12.0 *
pi[0] *
t2 - 24.0 *
pi[0] *
t + 12.0 *
pi[0] - 48.0 *
pi[1] *
t2 +
50 72.0 *
pi[1] *
t - 24.0 *
pi[1] + 72.0 *
pi[2] *
t2 - 72.0 *
pi[2] *
t +
51 12.0 *
pi[2] + 12.0 *
pi[4] *
t2) *
62 std::vector<point_t>
pi;
65 pi.push_back((
pData.ddc0_ *
T *
T / (
n * (
n - 1))) +
67 pi.push_back(point_t::Zero());
74 bezier_wp_t::t_point_t
wps;
76 const int DIM_VAR = 3;
78 std::vector<Matrix3>
Cpi;
79 for (std::size_t
i = 0;
i <
pi.size(); ++
i) {
82 const Vector3 g =
pData.contacts_.front().contactPhase_->m_gravity;
84 const double T2 =
T *
T;
89 w0.second.head<3>() = (12 *
pi[0] - 24 *
pi[1] + 12 *
pi[2]) *
alpha;
96 w1.first.block<3, 3>(0, 0) = 4.8 *
alpha * Matrix3::Identity();
97 w1.first.block<3, 3>(3, 0) = 4.8 *
Cpi[0] *
alpha;
98 w1.second.head<3>() = 1.0 * (7.2 *
pi[0] - 9.6 *
pi[1] - 2.4 *
pi[2]) *
alpha;
99 w1.second.tail<3>() = 1.0 *
101 12.0 *
Cpi[0] *
pi[2] + 9.6 *
Cpi[1] *
pi[2]) *
105 w2.first.block<3, 3>(0, 0) = 4.8 *
alpha * Matrix3::Identity();
106 w2.first.block<3, 3>(3, 0) = 1.0 * (-4.8 *
Cpi[0] + 9.6 *
Cpi[1]) *
alpha;
107 w2.second.head<3>() = 1.0 * (3.6 *
pi[0] - 9.6 *
pi[2] + 1.2 *
pi[4]) *
alpha;
108 w2.second.tail<3>() = 1.0 *
110 1.2 *
Cpi[0] *
pi[4] - 9.6 *
Cpi[1] *
pi[2]) *
114 w3.first.block<3, 3>(3, 0) =
116 w3.second.head<3>() =
117 1.0 * (1.2 *
pi[0] + 4.8 *
pi[1] - 9.6 *
pi[2] + 3.6 *
pi[4]) *
alpha;
118 w3.second.tail<3>() =
124 w4.first.block<3, 3>(0, 0) = -9.6 *
alpha * Matrix3::Identity();
125 w4.first.block<3, 3>(3, 0) = 1.0 * (0.8 *
Cg *
T2 - 9.6 *
Cpi[2]) *
alpha;
126 w4.second.head<3>() = 1.0 * (4.8 *
pi[1] - 2.4 *
pi[2] + 7.2 *
pi[4]) *
alpha;
127 w4.second.tail<3>() =
133 w5.first.block<3, 3>(0, 0) = -24 *
alpha * Matrix3::Identity();
134 w5.first.block<3, 3>(3, 0) = 1.0 * (-24.0 *
Cpi[4]) *
alpha;
135 w5.second.head<3>() = (12 *
pi[2] + 12 *
pi[4]) *
alpha;
136 w5.second.tail<3>() =
INIT_VEL
Definition flags.hh:21
END_POS
Definition flags.hh:23
INIT_ACC
Definition flags.hh:22
INIT_POS
Definition flags.hh:20
coefs_t evaluateAccelerationCurveAtTime(const std::vector< point_t > &pi, double T, double t)
Definition waypoints_c0_dc0_ddc0_c1.hh:41
bezier_wp_t::t_point_t computeWwaypoints(const ProblemData &pData, double T)
Definition waypoints_c0_dc0_ddc0_c1.hh:72
coefs_t computeFinalVelocityPoint(const ProblemData &pData, double T)
Definition waypoints_c0_dc0_ddc0_c1.hh:142
coefs_t evaluateCurveAtTime(const std::vector< point_t > &pi, double t)
evaluateCurveAtTime compute the expression of the point on the curve at t, defined by the waypoint pi...
Definition waypoints_c0_dc0_ddc0_c1.hh:26
std::vector< point_t > computeConstantWaypoints(const ProblemData &pData, double T)
Definition waypoints_c0_dc0_ddc0_c1.hh:56
Definition common_solve_methods.hh:15
waypoint6_t w0(point_t_tC p0, point_t_tC p1, point_t_tC g, const Matrix3 &p0X, const Matrix3 &, const Matrix3 &, const double alpha)
Definition solve_0_step.cpp:12
BEZIER_COM_TRAJ_DLLAPI Matrix3 skew(point_t_tC x)
skew symmetric matrix
Definition utils.cpp:62
Eigen::Matrix< value_type, 3, 3 > Matrix3
Definition definitions.hh:17
const int DIM_POINT
Definition solve_end_effector.hh:15
centroidal_dynamics::Vector3 Vector3
Definition definitions.hh:22
waypoint6_t w3(point_t_tC p0, point_t_tC p1, point_t_tC g, const Matrix3 &, const Matrix3 &, const Matrix3 &, const double alpha)
Definition solve_0_step.cpp:45
std::pair< double, point3_t > coefs_t
Definition definitions.hh:62
waypoint6_t w1(point_t_tC p0, point_t_tC p1, point_t_tC, const Matrix3 &, const Matrix3 &, const Matrix3 &gX, const double alpha)
Definition solve_0_step.cpp:23
waypoint6_t w4(point_t_tC, point_t_tC p1, point_t_tC g, const Matrix3 &, const Matrix3 &, const Matrix3 &, const double alpha)
Definition solve_0_step.cpp:56
waypoint6_t w2(point_t_tC p0, point_t_tC p1, point_t_tC g, const Matrix3 &, const Matrix3 &, const Matrix3 &gX, const double alpha)
Definition solve_0_step.cpp:34
std::pair< MatrixXX, VectorX > computeDistanceCostFunction(size_t numPoints, const ProblemData &pData, double T, std::vector< point3_t > pts_path)
Definition solve_end_effector.hh:224
Defines all the inputs of the problem: Initial and terminal constraints, as well as selected cost fun...
Definition data.hh:92