hpp-spline  4.10.0
template based classes for creating and manipulating spline and bezier curves. Comes with extra options specific to end-effector trajectories in robotics.
quintic_spline.h
Go to the documentation of this file.
1 
13 #ifndef _STRUCT_QUINTIC_SPLINE
14 #define _STRUCT_QUINTIC_SPLINE
15 
16 #include "MathDefs.h"
17 
18 #include "polynom.h"
19 
20 #include <stdexcept>
21 
22 namespace spline {
27 template <typename Point, typename T_Point>
28 T_Point make_quintic_vector(Point const& a, Point const& b, Point const& c, Point const& d, Point const& e,
29  Point const& f) {
30  T_Point res;
31  res.push_back(a);
32  res.push_back(b);
33  res.push_back(c);
34  res.push_back(d);
35  res.push_back(e);
36  res.push_back(f);
37  return res;
38 }
39 
40 template <typename Time, typename Numeric, std::size_t Dim, bool Safe, typename Point, typename T_Point>
42  Point const& d, Point const& e, Point const& f,
43  const Time min, const Time max) {
44  T_Point coeffs = make_quintic_vector<Point, T_Point>(a, b, c, d, e, f);
45  return polynom<Time, Numeric, Dim, Safe, Point, T_Point>(coeffs.begin(), coeffs.end(), min, max);
46 }
47 } // namespace spline
48 #endif //_STRUCT_QUINTIC_SPLINE
polynom.h
Definition of a cubic spline.
spline::make_quintic_vector
T_Point make_quintic_vector(Point const &a, Point const &b, Point const &c, Point const &d, Point const &e, Point const &f)
Creates coefficient vector of a quintic spline defined on the interval [tBegin, tEnd]....
Definition: quintic_spline.h:28
spline::helpers::Time
double Time
Definition: effector_spline.h:27
spline::helpers::Point
Eigen::Matrix< Numeric, 3, 1 > Point
Definition: effector_spline.h:28
spline::polynom
Represents a polynomf arbitrary order defined on the interval [tBegin, tEnd]. It follows the equation...
Definition: polynom.h:34
MathDefs.h
spline::create_quintic
polynom< Time, Numeric, Dim, Safe, Point, T_Point > create_quintic(Point const &a, Point const &b, Point const &c, Point const &d, Point const &e, Point const &f, const Time min, const Time max)
Definition: quintic_spline.h:41
spline
Definition: bernstein.h:20
spline::helpers::T_Point
std::vector< Point, Eigen::aligned_allocator< Point > > T_Point
Definition: effector_spline.h:29