fwd.h 3.8 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
/**
 * \file fwd.h
 * \brief forward declaration of all curves class
 * \author Pierre Fernbach
 * \version 0.1
 * \date 27/11/19
 *
 */

#ifndef CURVES_FWD_H
#define CURVES_FWD_H
12
13
14
#include <Eigen/Dense>
#include <vector>
#include <boost/smart_ptr/shared_ptr.hpp>
15
16
17
18
19
20
21
22
23
24
25
26

namespace curves {

template <typename Time, typename Numeric, bool Safe, typename Point , typename Point_derivate >
  struct curve_abc;

template <typename Time, typename Numeric, bool Safe,typename Point >
  struct bezier_curve;

template <typename Time, typename Numeric, bool Safe,typename Point >
  struct cubic_hermite_spline;

27
28
template <typename Time, typename Numeric, bool Safe, typename Point,
          typename T_Point,typename SplineBase >
29
30
31
  struct exact_cubic;

template <typename Time, typename Numeric, bool Safe, typename Point,
32
            typename Point_derivate>
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  struct piecewise_curve;

template <typename Time, typename Numeric, bool Safe,typename Point, typename T_Point>
  struct polynomial;

template <typename Time, typename Numeric, bool Safe>
  struct SE3Curve;

template <typename Time, typename Numeric, bool Safe>
  struct SO3Linear;

template <typename Numeric>
  struct Bern;

template <typename Point>
  struct curve_constraints;

template <typename Numeric, bool Safe>
  struct linear_variable;

template <typename Numeric>
  struct quadratic_variable;
55
56

// typedef of the commonly used templates arguments :
57
// eigen types :
58
59
60
61
typedef Eigen::Vector3d point3_t;
typedef Eigen::Matrix<double, 6, 1> point6_t;
typedef Eigen::VectorXd pointX_t;
typedef Eigen::Matrix<double, 3, 3> matrix3_t;
62
typedef Eigen::Matrix<double, 4, 4> matrix4_t;
63
64
typedef Eigen::Quaternion<double> quaternion_t;
typedef Eigen::Transform<double, 3, Eigen::Affine> transform_t;
65
typedef std::vector<point3_t, Eigen::aligned_allocator<point3_t> > t_point3_t;
66
typedef std::vector<pointX_t, Eigen::aligned_allocator<pointX_t> > t_pointX_t;
67
68

// abstract curves types:
69
typedef curve_abc<double, double, true, pointX_t,pointX_t> curve_abc_t; // base abstract class
70
typedef curve_abc<double, double, true, point3_t,point3_t> curve_3_t;    // generic class of curve of size 3
71
typedef curve_abc<double, double, true, matrix3_t, point3_t> curve_rotation_t;  // templated class used for the rotation (return dimension are fixed)
72
73
74
typedef curve_abc<double, double, true, transform_t, point6_t> curve_SE3_t;  // templated abstract class used for all the se3 curves (return dimension are fixed)

// shared pointer to abstract types:
75
typedef boost::shared_ptr<curve_abc_t> curve_ptr_t;
76
typedef boost::shared_ptr<curve_3_t> curve3_ptr_t;
77
typedef boost::shared_ptr<curve_rotation_t> curve_rotation_ptr_t;
78
79
80
typedef boost::shared_ptr<curve_SE3_t> curve_SE3_ptr_t;

// definition of all curves class with pointX as return type:
81
typedef polynomial<double, double, true, pointX_t, t_pointX_t> polynomial_t;
82
83
84
85
86
87
88
89
90
91
92
93
94
typedef exact_cubic<double, double, true, pointX_t,t_pointX_t, polynomial_t> exact_cubic_t;
typedef bezier_curve<double, double, true, pointX_t> bezier_t;
typedef cubic_hermite_spline<double, double, true, pointX_t> cubic_hermite_spline_t;
typedef piecewise_curve <double, double, true, pointX_t,pointX_t> piecewise_t;

// definition of all curves class with point3 as return type:
typedef polynomial<double, double, true, point3_t, t_point3_t> polynomial3_t;
typedef exact_cubic<double, double, true, point3_t,t_point3_t, polynomial_t> exact_cubic3_t;
typedef bezier_curve<double, double, true, point3_t> bezier3_t;
typedef cubic_hermite_spline<double, double, true, point3_t> cubic_hermite_spline3_t;
typedef piecewise_curve <double, double, true, point3_t,point3_t> piecewise3_t;

// special curves with return type fixed:
95
96
typedef SO3Linear<double, double, true> SO3Linear_t;
typedef SE3Curve<double, double, true> SE3Curve_t;
97
typedef piecewise_curve <double, double, true,  transform_t, point6_t> piecewise_SE3_t;
98

99
100
101
}

#endif // CURVES_FWD_H