9 template<
size_t state_dimensions>
11 using Vector = Eigen::Matrix<double, state_dimensions, 1>;
17 : length_(quartic_blend_path.length_), b_(quartic_blend_path.b_), c_(quartic_blend_path.c_),
18 e_(quartic_blend_path.e_), f_(quartic_blend_path.f_), lm_(quartic_blend_path.lm_),
19 rm_(quartic_blend_path.rm_) {}
22 const Vector &lb,
const Vector &lm,
const Vector &rm,
23 double s_mid,
double max_diff,
double s_abs_max) : lb_(lb), lm_(lm), rm_(rm) {
24 Vector s_abs = ((-16 * max_diff) / (3. * (lm - rm).array())).abs();
25 double s_abs_min = std::min<double>({s_abs.minCoeff(), s_abs_max});
26 length_ = 2 * s_abs_min;
27 b_ = (lm - rm).array() / (16. * std::pow(s_abs_min, 3));
28 c_ = (-lm + rm).array() / (4. * std::pow(s_abs_min, 2));
30 f_ = lb.array() + lm.array() * (-s_abs_min + s_mid);
35 f_ + s * (e_ + s * (s * (c_ + s * b_))),
36 e_ + s * (s * (3 * c_ + s * 4 * b_)),
37 s * (6 * c_ + s * 12 * b_),
42 [[nodiscard]]
inline double length()
const override {
47 return (-3 * (lm_ - rm_)) / (4. * this->
length() / 2);
51 return (3 * (lm_ - rm_)) / (2. * std::pow(this->
length() / 2, 2));
Definition: quartic_blend_path.hpp:10
double length() const override
Definition: quartic_blend_path.hpp:42
QuarticBlendPath(const QuarticBlendPath< state_dimensions > &quartic_blend_path)
Definition: quartic_blend_path.hpp:16
Vector max_ddq() const override
Definition: quartic_blend_path.hpp:46
Vector max_dddq() const override
Definition: quartic_blend_path.hpp:50
QuarticBlendPath(const Vector &lb, const Vector &lm, const Vector &rm, double s_mid, double max_diff, double s_abs_max)
Definition: quartic_blend_path.hpp:21
QuarticBlendPath()
Definition: quartic_blend_path.hpp:14
PathStep< state_dimensions > operator()(double s) const override
Definition: quartic_blend_path.hpp:33
Definition: gripper.cpp:3
Eigen::Vector< double, 7 > Vector7d
Definition: types.hpp:9