#include "curves/fwd.h" #include "curves/bezier_curve.h" #include "curves/linear_variable.h" #include "curves/quadratic_variable.h" #include #ifndef _DEFINITION_PYTHON_BINDINGS #define _DEFINITION_PYTHON_BINDINGS namespace curves { /*** TEMPLATE SPECIALIZATION FOR PYTHON ****/ typedef double real; typedef std::vector t_time_t; typedef Eigen::VectorXd time_waypoints_t; typedef Eigen::Matrix ret_pointX_t; typedef std::pair pair_pointX_tangent_t; typedef Eigen::MatrixXd pointX_list_t; typedef std::vector > t_pair_pointX_tangent_t; typedef curves::curve_constraints curve_constraints_t; typedef curves::curve_constraints curve_constraints3_t; typedef std::pair waypoint_t; typedef std::vector t_waypoint_t; typedef Eigen::Matrix point_listX_t; typedef Eigen::Matrix point_list3_t; typedef Eigen::Matrix point_list6_t; typedef polynomial_t::coeff_t coeff_t; typedef curves::Bern bernstein_t; template T_Point vectorFromEigenArray(const PointList& array) { T_Point res; for (int i = 0; i < array.cols(); ++i) { res.push_back(array.col(i)); } return res; } template T_Point vectorFromEigenVector(const PointList& vector) { T_Point res; for (int i = 0; i < vector.rows(); ++i) { res.push_back(vector[i]); } return res; } template PointList vectorToEigenArray(const T_point& vect) { const size_t nCols = vect.size(); const size_t nRows = vect[0].rows(); PointList res(nRows,nCols); for (size_t i = 0; i < vect.size(); ++i) { res.block(0,i,nRows,1) = vect[i]; } return res; } } // namespace curves #endif //_DEFINITION_PYTHON_BINDINGS