19#ifndef _CLASS_EXACTCUBIC
20#define _CLASS_EXACTCUBIC
38 typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>,
39 typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >,
45 typedef Eigen::Matrix<Numeric, Eigen::Dynamic, Eigen::Dynamic>
MatrixX;
46 typedef Eigen::Matrix<Numeric, 3, 3>
Matrix3;
74 template <
typename In>
88 template <
typename In>
119 std::shared_ptr<spline_t>
s_ptr =
120 std::dynamic_pointer_cast<spline_t>(this->
curves_.at(index));
124 throw std::runtime_error(
125 "Parent piecewise curve do not contain only curves created from "
126 "exact_cubic class methods");
161 template <
typename In>
165 if (
Safe && size < 1) {
166 throw std::length_error(
167 "size of waypoints must be superior to 0");
187 num_t const dTi((*next).first - (*it).first);
202 num_t const dTi_1((*it2).first - (*next).first);
213 x.row(
i) = (*it).second.transpose();
216 x.row(size - 1) = (*it).second.transpose();
228 (*it).first, (*next).first));
233 template <
typename In>
237 if (
Safe && size < 1) {
238 throw std::length_error(
239 "number of waypoints should be superior to one");
253 template <
typename In>
267 template <
typename In>
310 template <
class Archive>
321 SINGLE_ARG(
typename Time,
typename Numeric,
bool Safe,
typename Point,
322 typename T_Point,
typename SplineBase),
#define DEFINE_CLASS_TEMPLATE_VERSION(Template, Type)
Definition archive.hpp:27
#define SINGLE_ARG(...)
Definition archive.hpp:23
interface for a Curve of arbitrary dimension.
struct to define constraints on start / end velocities and acceleration on a curve
Eigen::Matrix< Numeric, Eigen::Dynamic, 1 > Point
Definition effector_spline.h:28
double Numeric
Definition effector_spline.h:26
double Time
Definition effector_spline.h:27
std::vector< Point, Eigen::aligned_allocator< Point > > T_Point
Definition effector_spline.h:29
Definition bernstein.h:20
void PseudoInverse(_Matrix_Type_ &pinvmat)
An inverse kinematics architecture enforcing an arbitrary number of strict priority levels (Reference...
Definition MathDefs.h:26
bool isApprox(const T a, const T b, const T eps=1e-6)
Definition curve_abc.h:25
class allowing to create a piecewise curve.
Definition of a cubic spline.
Represents a curve of dimension Dim. If value of parameter Safe is false, no verification is made on ...
Definition curve_abc.h:36
Definition curve_constraint.h:20
Definition exact_cubic.h:41
void serialize(Archive &ar, const unsigned int version)
Definition exact_cubic.h:311
curve_abc< Time, Numeric, Safe, point_t > curve_abc_t
Definition exact_cubic.h:57
virtual ~exact_cubic()
Destructor.
Definition exact_cubic.h:114
t_spline_t::const_iterator cit_spline_t
Definition exact_cubic.h:52
exact_cubic()
Empty constructor. Add at least one curve to call other class functions.
Definition exact_cubic.h:67
Numeric num_t
Definition exact_cubic.h:48
spline_t getSplineAt(std::size_t index)
Definition exact_cubic.h:118
exact_cubic< Time, Numeric, Safe, point_t, T_Point, SplineBase > exact_cubic_t
Definition exact_cubic.h:56
Time time_t
Definition exact_cubic.h:47
SplineBase spline_t
Definition exact_cubic.h:49
Eigen::Matrix< Numeric, 3, 3 > Matrix3
Definition exact_cubic.h:46
t_spline_t::iterator it_spline_t
Definition exact_cubic.h:51
T_Point t_point_t
Definition exact_cubic.h:44
piecewise_curve_t::t_curve_ptr_t t_curve_ptr_t
Definition exact_cubic.h:60
exact_cubic(const t_curve_ptr_t &subSplines)
Definition exact_cubic.h:107
exact_cubic(const t_spline_t &subSplines)
Constructor.
Definition exact_cubic.h:101
piecewise_curve< Time, Numeric, Safe, point_t > piecewise_curve_t
Definition exact_cubic.h:58
polynomial< Time, Numeric, Safe, point_t > polynomial_t
Definition exact_cubic.h:59
exact_cubic(const exact_cubic &other)
Copy Constructor.
Definition exact_cubic.h:111
const Eigen::Ref< const point_t > point_ref_t
Definition exact_cubic.h:43
curve_constraints< Point > spline_constraints
Definition exact_cubic.h:53
Eigen::Matrix< Numeric, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Definition exact_cubic.h:45
friend class boost::serialization::access
Definition exact_cubic.h:309
exact_cubic(In wayPointsBegin, In wayPointsEnd)
Constructor.
Definition exact_cubic.h:75
std::size_t getNumberSplines()
Definition exact_cubic.h:116
std::vector< spline_t > t_spline_t
Definition exact_cubic.h:50
Point point_t
Definition exact_cubic.h:42
exact_cubic(In wayPointsBegin, In wayPointsEnd, const spline_constraints &constraints)
Constructor.
Definition exact_cubic.h:89
Definition piecewise_curve.h:37
virtual std::size_t dim() const
Get dimension of curve.
Definition piecewise_curve.h:641
std::size_t getNumberCurves()
Definition piecewise_curve.h:654
std::vector< curve_ptr_t > t_curve_ptr_t
Definition piecewise_curve.h:50
t_curve_ptr_t curves_
Definition piecewise_curve.h:659
void add_curve(const Curve &curve)
Definition piecewise_curve.h:176
bool isApprox(const piecewise_curve_t &other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const
isApprox check if other and *this are approximately equals. Only two curves of the same class can be ...
Definition piecewise_curve.h:112
Represents a polynomial of an arbitrary order defined on the interval . It follows the equation : ...
Definition polynomial.h:35
T_Point t_point_t
Definition polynomial.h:37