| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include <Eigen/Dense> | ||
| 2 | #include <eigenpy/eigenpy.hpp> | ||
| 3 | #include <eigenpy/geometry.hpp> | ||
| 4 | #include <eigenpy/memory.hpp> | ||
| 5 | #include <vector> | ||
| 6 | |||
| 7 | #include "ndcurves/bernstein.h" | ||
| 8 | #include "ndcurves/bezier_curve.h" | ||
| 9 | #include "ndcurves/constant_curve.h" | ||
| 10 | #include "ndcurves/cubic_hermite_spline.h" | ||
| 11 | #include "ndcurves/curve_constraint.h" | ||
| 12 | #include "ndcurves/curve_conversion.h" | ||
| 13 | #include "ndcurves/exact_cubic.h" | ||
| 14 | #include "ndcurves/fwd.h" | ||
| 15 | #include "ndcurves/linear_variable.h" | ||
| 16 | #include "ndcurves/piecewise_curve.h" | ||
| 17 | #include "ndcurves/polynomial.h" | ||
| 18 | #include "ndcurves/python/python_definitions.h" | ||
| 19 | #include "ndcurves/se3_curve.h" | ||
| 20 | #include "ndcurves/sinusoidal.h" | ||
| 21 | #include "ndcurves/so3_linear.h" | ||
| 22 | |||
| 23 | #ifndef _VARIABLES_PYTHON_BINDINGS | ||
| 24 | #define _VARIABLES_PYTHON_BINDINGS | ||
| 25 | |||
| 26 | namespace ndcurves { | ||
| 27 | static const int dim = 3; | ||
| 28 | typedef linear_variable<real, true> linear_variable_t; | ||
| 29 | typedef quadratic_variable<real> quadratic_variable_t; | ||
| 30 | typedef bezier_curve<real, real, true, linear_variable_t> | ||
| 31 | bezier_linear_variable_t; | ||
| 32 | |||
| 33 | /*linear variable control points*/ | ||
| 34 | bezier_linear_variable_t* wrapBezierLinearConstructor( | ||
| 35 | const point_list3_t& matrices, const point_list3_t& vectors); | ||
| 36 | bezier_linear_variable_t* wrapBezierLinearConstructorBounds( | ||
| 37 | const point_list3_t& matrices, const point_list3_t& vectors, | ||
| 38 | const real T_min, const real T_max); | ||
| 39 | |||
| 40 | typedef Eigen::Matrix<real, Eigen::Dynamic, Eigen::Dynamic> matrix_x_t; | ||
| 41 | |||
| 42 | struct matrix_pair { | ||
| 43 | matrix_pair() {} | ||
| 44 | ✗ | matrix_pair(const Eigen::Ref<const matrix_x_t> A, | |
| 45 | const Eigen::Ref<const matrix_x_t> b) | ||
| 46 | ✗ | : A_(A), b_(b) {} | |
| 47 | matrix_x_t A_; | ||
| 48 | matrix_x_t b_; | ||
| 49 | ✗ | matrix_x_t A() { return A_; } | |
| 50 | ✗ | matrix_x_t b() { return b_; } | |
| 51 | }; | ||
| 52 | |||
| 53 | Eigen::Matrix<real, Eigen::Dynamic, Eigen::Dynamic> cost_t_quad( | ||
| 54 | const quadratic_variable_t& p); | ||
| 55 | Eigen::Matrix<real, Eigen::Dynamic, 1> cost_t_linear( | ||
| 56 | const quadratic_variable_t& p); | ||
| 57 | real cost_t_constant(const quadratic_variable_t& p); | ||
| 58 | |||
| 59 | linear_variable_t* wayPointsToLists(const bezier_linear_variable_t& self); | ||
| 60 | |||
| 61 | struct LinearBezierVector { | ||
| 62 | std::vector<bezier_linear_variable_t> beziers_; | ||
| 63 | ✗ | std::size_t size() { return beziers_.size(); } | |
| 64 | ✗ | bezier_linear_variable_t* at(std::size_t i) { | |
| 65 | ✗ | assert(i < size()); | |
| 66 | ✗ | return new bezier_linear_variable_t(beziers_[i]); | |
| 67 | } | ||
| 68 | }; | ||
| 69 | |||
| 70 | /*** TEMPLATE SPECIALIZATION FOR PYTHON ****/ | ||
| 71 | } // namespace ndcurves | ||
| 72 | // EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION(ndcurves::piecewise_SE3_t) | ||
| 73 | |||
| 74 | #endif //_VARIABLES_PYTHON_BINDINGS | ||
| 75 |