Commit aefa6394 authored by Steve T's avatar Steve T
Browse files

ndcurves is the final name

parent b1e1168a
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <functional> #include <functional>
#include <stdexcept> #include <stdexcept>
namespace nd_curves { namespace ndcurves {
/// \class polynomial. /// \class polynomial.
/// \brief Represents a polynomial of an arbitrary order defined on the interval /// \brief Represents a polynomial of an arbitrary order defined on the interval
/// \f$[t_{min}, t_{max}]\f$. It follows the equation :<br> /// \f$[t_{min}, t_{max}]\f$. It follows the equation :<br>
...@@ -295,7 +295,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point> { ...@@ -295,7 +295,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point> {
* @return true is the two curves are approximately equals * @return true is the two curves are approximately equals
*/ */
bool isApprox(const polynomial_t& other, const Numeric prec = Eigen::NumTraits<Numeric>::dummy_precision()) const { bool isApprox(const polynomial_t& other, const Numeric prec = Eigen::NumTraits<Numeric>::dummy_precision()) const {
return nd_curves::isApprox<num_t>(T_min_, other.min()) && nd_curves::isApprox<num_t>(T_max_, other.max()) && return ndcurves::isApprox<num_t>(T_min_, other.min()) && ndcurves::isApprox<num_t>(T_max_, other.max()) &&
dim_ == other.dim() && degree_ == other.degree() && coefficients_.isApprox(other.coefficients_, prec); dim_ == other.dim() && degree_ == other.degree() && coefficients_.isApprox(other.coefficients_, prec);
} }
...@@ -471,7 +471,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point> { ...@@ -471,7 +471,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point> {
} }
// remove last degrees is they are equal to 0 // remove last degrees is they are equal to 0
long final_degree = new_degree; long final_degree = new_degree;
while(nCoeffs.col(final_degree).norm() <= nd_curves::MARGIN && final_degree >0){ while(nCoeffs.col(final_degree).norm() <= ndcurves::MARGIN && final_degree >0){
--final_degree; --final_degree;
} }
return polynomial_t(nCoeffs.leftCols(final_degree+1), min(), max()); return polynomial_t(nCoeffs.leftCols(final_degree+1), min(), max());
...@@ -495,7 +495,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point> { ...@@ -495,7 +495,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point> {
} }
// remove last degrees is they are equal to 0 // remove last degrees is they are equal to 0
long final_degree = degree(); long final_degree = degree();
while(nCoeffs.col(final_degree).norm() <= nd_curves::MARGIN && final_degree >0){ while(nCoeffs.col(final_degree).norm() <= ndcurves::MARGIN && final_degree >0){
--final_degree; --final_degree;
} }
return polynomial_t(nCoeffs.leftCols(final_degree+1), min(), max()); return polynomial_t(nCoeffs.leftCols(final_degree+1), min(), max());
...@@ -511,7 +511,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point> { ...@@ -511,7 +511,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point> {
private: private:
void assert_operator_compatible(const polynomial_t& other) const{ void assert_operator_compatible(const polynomial_t& other) const{
if ((fabs(min() - other.min()) > nd_curves::MARGIN) || (fabs(max() - other.max()) > nd_curves::MARGIN) || dim() != other.dim()){ if ((fabs(min() - other.min()) > ndcurves::MARGIN) || (fabs(max() - other.max()) > ndcurves::MARGIN) || dim() != other.dim()){
throw std::invalid_argument("Can't perform base operation (+ - ) on two polynomials with different time ranges or different dimensions"); throw std::invalid_argument("Can't perform base operation (+ - ) on two polynomials with different time ranges or different dimensions");
} }
} }
...@@ -608,8 +608,8 @@ polynomial<T,N,S,P,TP> operator*(const double k, const polynomial<T,N,S,P,TP>& p ...@@ -608,8 +608,8 @@ polynomial<T,N,S,P,TP> operator*(const double k, const polynomial<T,N,S,P,TP>& p
return res*=k; return res*=k;
} }
} // namespace nd_curves } // namespace ndcurves
DEFINE_CLASS_TEMPLATE_VERSION(SINGLE_ARG(typename Time, typename Numeric, bool Safe, typename Point, typename T_Point), DEFINE_CLASS_TEMPLATE_VERSION(SINGLE_ARG(typename Time, typename Numeric, bool Safe, typename Point, typename T_Point),
SINGLE_ARG(nd_curves::polynomial<Time, Numeric, Safe, Point, T_Point>)) SINGLE_ARG(ndcurves::polynomial<Time, Numeric, Safe, Point, T_Point>))
#endif //_STRUCT_POLYNOMIAL #endif //_STRUCT_POLYNOMIAL
#include "nd_curves/fwd.h" #include "ndcurves/fwd.h"
#include "nd_curves/bezier_curve.h" #include "ndcurves/bezier_curve.h"
#include "nd_curves/polynomial.h" #include "ndcurves/polynomial.h"
#include "nd_curves/linear_variable.h" #include "ndcurves/linear_variable.h"
#include "nd_curves/quadratic_variable.h" #include "ndcurves/quadratic_variable.h"
#include <vector> #include <vector>
#ifndef _DEFINITION_PYTHON_BINDINGS #ifndef _DEFINITION_PYTHON_BINDINGS
#define _DEFINITION_PYTHON_BINDINGS #define _DEFINITION_PYTHON_BINDINGS
namespace nd_curves { namespace ndcurves {
/*** TEMPLATE SPECIALIZATION FOR PYTHON ****/ /*** TEMPLATE SPECIALIZATION FOR PYTHON ****/
typedef double real; typedef double real;
typedef std::vector<real> t_time_t; typedef std::vector<real> t_time_t;
...@@ -19,8 +19,8 @@ typedef Eigen::Matrix<double, Eigen::Dynamic, 1, 0, Eigen::Dynamic, 1> ret_point ...@@ -19,8 +19,8 @@ typedef Eigen::Matrix<double, Eigen::Dynamic, 1, 0, Eigen::Dynamic, 1> ret_point
typedef std::pair<pointX_t, pointX_t> pair_pointX_tangent_t; typedef std::pair<pointX_t, pointX_t> pair_pointX_tangent_t;
typedef Eigen::MatrixXd pointX_list_t; typedef Eigen::MatrixXd pointX_list_t;
typedef std::vector<pair_pointX_tangent_t, Eigen::aligned_allocator<pair_pointX_tangent_t> > t_pair_pointX_tangent_t; typedef std::vector<pair_pointX_tangent_t, Eigen::aligned_allocator<pair_pointX_tangent_t> > t_pair_pointX_tangent_t;
typedef nd_curves::curve_constraints<pointX_t> curve_constraints_t; typedef ndcurves::curve_constraints<pointX_t> curve_constraints_t;
typedef nd_curves::curve_constraints<point3_t> curve_constraints3_t; typedef ndcurves::curve_constraints<point3_t> curve_constraints3_t;
typedef std::pair<real, pointX_t> waypoint_t; typedef std::pair<real, pointX_t> waypoint_t;
typedef std::vector<waypoint_t> t_waypoint_t; typedef std::vector<waypoint_t> t_waypoint_t;
typedef Eigen::Matrix<real, Eigen::Dynamic, Eigen::Dynamic> point_listX_t; typedef Eigen::Matrix<real, Eigen::Dynamic, Eigen::Dynamic> point_listX_t;
...@@ -28,7 +28,7 @@ typedef Eigen::Matrix<real, 3, Eigen::Dynamic> point_list3_t; ...@@ -28,7 +28,7 @@ typedef Eigen::Matrix<real, 3, Eigen::Dynamic> point_list3_t;
typedef Eigen::Matrix<real, 6, Eigen::Dynamic> point_list6_t; typedef Eigen::Matrix<real, 6, Eigen::Dynamic> point_list6_t;
typedef polynomial_t::coeff_t coeff_t; typedef polynomial_t::coeff_t coeff_t;
typedef nd_curves::Bern<double> bernstein_t; typedef ndcurves::Bern<double> bernstein_t;
template <typename PointList, typename T_Point> template <typename PointList, typename T_Point>
T_Point vectorFromEigenArray(const PointList& array) { T_Point vectorFromEigenArray(const PointList& array) {
...@@ -57,5 +57,5 @@ PointList vectorToEigenArray(const T_point& vect) { ...@@ -57,5 +57,5 @@ PointList vectorToEigenArray(const T_point& vect) {
} }
return res; return res;
} }
} // namespace nd_curves } // namespace ndcurves
#endif //_DEFINITION_PYTHON_BINDINGS #endif //_DEFINITION_PYTHON_BINDINGS
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
#ifndef _CLASS_QUADRATIC_VARIABLE #ifndef _CLASS_QUADRATIC_VARIABLE
#define _CLASS_QUADRATIC_VARIABLE #define _CLASS_QUADRATIC_VARIABLE
#include "nd_curves/curve_abc.h" #include "ndcurves/curve_abc.h"
#include "nd_curves/linear_variable.h" #include "ndcurves/linear_variable.h"
#include "MathDefs.h" #include "MathDefs.h"
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <Eigen/Core> #include <Eigen/Core>
#include <stdexcept> #include <stdexcept>
namespace nd_curves { namespace ndcurves {
template <typename Numeric = double> template <typename Numeric = double>
struct quadratic_variable { struct quadratic_variable {
...@@ -189,5 +189,5 @@ quadratic_variable<N> operator/(const quadratic_variable<N>& w, const double k) ...@@ -189,5 +189,5 @@ quadratic_variable<N> operator/(const quadratic_variable<N>& w, const double k)
return res /= k; return res /= k;
} }
} // namespace nd_curves } // namespace ndcurves
#endif //_CLASS_QUADRATIC_VARIABLE #endif //_CLASS_QUADRATIC_VARIABLE
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <boost/math/constants/constants.hpp> #include <boost/math/constants/constants.hpp>
#include <Eigen/Dense> #include <Eigen/Dense>
namespace nd_curves { namespace ndcurves {
/// \class SE3Curve. /// \class SE3Curve.
/// \brief Composition of a curve of any type of dimension 3 and a curve representing an rotation /// \brief Composition of a curve of any type of dimension 3 and a curve representing an rotation
...@@ -158,7 +158,7 @@ struct SE3Curve : public curve_abc<Time, Numeric, Safe, Eigen::Transform<Numeric ...@@ -158,7 +158,7 @@ struct SE3Curve : public curve_abc<Time, Numeric, Safe, Eigen::Transform<Numeric
* @return true is the two curves are approximately equals * @return true is the two curves are approximately equals
*/ */
bool isApprox(const SE3Curve_t& other, const Numeric prec = Eigen::NumTraits<Numeric>::dummy_precision()) const { bool isApprox(const SE3Curve_t& other, const Numeric prec = Eigen::NumTraits<Numeric>::dummy_precision()) const {
return nd_curves::isApprox<Numeric>(T_min_, other.min()) && nd_curves::isApprox<Numeric>(T_max_, other.max()) && return ndcurves::isApprox<Numeric>(T_min_, other.min()) && ndcurves::isApprox<Numeric>(T_max_, other.max()) &&
(translation_curve_ == other.translation_curve_ || (translation_curve_ == other.translation_curve_ ||
translation_curve_->isApprox(other.translation_curve_.get(), prec)) && translation_curve_->isApprox(other.translation_curve_.get(), prec)) &&
(rotation_curve_ == other.rotation_curve_ || rotation_curve_->isApprox(other.rotation_curve_.get(), prec)); (rotation_curve_ == other.rotation_curve_ || rotation_curve_->isApprox(other.rotation_curve_.get(), prec));
...@@ -256,9 +256,9 @@ struct SE3Curve : public curve_abc<Time, Numeric, Safe, Eigen::Transform<Numeric ...@@ -256,9 +256,9 @@ struct SE3Curve : public curve_abc<Time, Numeric, Safe, Eigen::Transform<Numeric
}; // SE3Curve }; // SE3Curve
} // namespace nd_curves } // namespace ndcurves
DEFINE_CLASS_TEMPLATE_VERSION(SINGLE_ARG(typename Time, typename Numeric, bool Safe), DEFINE_CLASS_TEMPLATE_VERSION(SINGLE_ARG(typename Time, typename Numeric, bool Safe),
SINGLE_ARG(nd_curves::SE3Curve<Time, Numeric, Safe>)) SINGLE_ARG(ndcurves::SE3Curve<Time, Numeric, Safe>))
#endif // SE3_CURVE_H #endif // SE3_CURVE_H
...@@ -34,7 +34,7 @@ const unsigned int CURVES_API_VERSION = 1; ...@@ -34,7 +34,7 @@ const unsigned int CURVES_API_VERSION = 1;
} \ } \
} }
namespace nd_curves { namespace ndcurves {
namespace serialization { namespace serialization {
struct Serializable { struct Serializable {
private: private:
...@@ -135,6 +135,6 @@ struct Serializable { ...@@ -135,6 +135,6 @@ struct Serializable {
} // namespace serialization } // namespace serialization
} // namespace nd_curves } // namespace ndcurves
#endif // ifndef __multicontact_api_serialization_archive_hpp__ #endif // ifndef __multicontact_api_serialization_archive_hpp__
...@@ -7,22 +7,22 @@ ...@@ -7,22 +7,22 @@
/** /**
* This file must be included by all classes containing * This file must be included by all classes containing
* pointer of abstract curves as member and serializing them. * pointer of abstract curves as member and serializing them.
* nd_curves::serialization::register_types(ar) must be called before serializing them. * ndcurves::serialization::register_types(ar) must be called before serializing them.
*/ */
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/serialization/shared_ptr.hpp> #include <boost/serialization/shared_ptr.hpp>
#include "registeration.hpp" #include "registeration.hpp"
#include "nd_curves/curve_abc.h" #include "ndcurves/curve_abc.h"
#include "nd_curves/so3_linear.h" #include "ndcurves/so3_linear.h"
#include "nd_curves/se3_curve.h" #include "ndcurves/se3_curve.h"
#include "nd_curves/sinusoidal.h" #include "ndcurves/sinusoidal.h"
#include "nd_curves/polynomial.h" #include "ndcurves/polynomial.h"
#include "nd_curves/bezier_curve.h" #include "ndcurves/bezier_curve.h"
#include "nd_curves/constant_curve.h" #include "ndcurves/constant_curve.h"
#include "nd_curves/piecewise_curve.h" #include "ndcurves/piecewise_curve.h"
#include "nd_curves/exact_cubic.h" #include "ndcurves/exact_cubic.h"
#include "nd_curves/cubic_hermite_spline.h" #include "ndcurves/cubic_hermite_spline.h"
#endif // ifndef CURVES_SERIALIZAION #endif // ifndef CURVES_SERIALIZAION
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <Eigen/Dense> #include <Eigen/Dense>
#include <vector> #include <vector>
#include "nd_curves/fwd.h" #include "ndcurves/fwd.h"
/** /**
*This file define a method register_types that *This file define a method register_types that
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* This is used to serialize pointer of the abstract class curve_abc * This is used to serialize pointer of the abstract class curve_abc
*/ */
namespace nd_curves { namespace ndcurves {
namespace serialization { namespace serialization {
template <class Archive> template <class Archive>
...@@ -53,6 +53,6 @@ void register_types(Archive& ar, const unsigned int version) { ...@@ -53,6 +53,6 @@ void register_types(Archive& ar, const unsigned int version) {
} }
} // namespace serialization } // namespace serialization
} // namespace nd_curves } // namespace ndcurves
#endif // CURVES_REGISTERATION_H #endif // CURVES_REGISTERATION_H
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "curve_abc.h" #include "curve_abc.h"
#include <cmath> #include <cmath>
namespace nd_curves { namespace ndcurves {
/// \class sinusoidal. /// \class sinusoidal.
/// \brief Represents a sinusoidal curve, evaluating the following equation: /// \brief Represents a sinusoidal curve, evaluating the following equation:
/// p0 + amplitude * (sin(2pi/T + phi) /// p0 + amplitude * (sin(2pi/T + phi)
...@@ -147,9 +147,9 @@ struct sinusoidal : public curve_abc<Time, Numeric, Safe, Point> { ...@@ -147,9 +147,9 @@ struct sinusoidal : public curve_abc<Time, Numeric, Safe, Point> {
*/ */
virtual bool isApprox(const sinusoidal_t& other, virtual bool isApprox(const sinusoidal_t& other,
const Numeric prec = Eigen::NumTraits<Numeric>::dummy_precision()) const { const Numeric prec = Eigen::NumTraits<Numeric>::dummy_precision()) const {
return nd_curves::isApprox<time_t>(T_min_, other.min()) && nd_curves::isApprox<time_t>(T_max_, other.max()) && return ndcurves::isApprox<time_t>(T_min_, other.min()) && ndcurves::isApprox<time_t>(T_max_, other.max()) &&
dim_ == other.dim() && p0_.isApprox(other.p0_, prec) && amplitude_.isApprox(other.amplitude_, prec) && dim_ == other.dim() && p0_.isApprox(other.p0_, prec) && amplitude_.isApprox(other.amplitude_, prec) &&
nd_curves::isApprox<time_t>(T_, other.T_) && nd_curves::isApprox<time_t>(phi_, other.phi_); ndcurves::isApprox<time_t>(T_, other.T_) && ndcurves::isApprox<time_t>(phi_, other.phi_);
} }
virtual bool isApprox(const curve_abc_t* other, virtual bool isApprox(const curve_abc_t* other,
...@@ -211,9 +211,9 @@ struct sinusoidal : public curve_abc<Time, Numeric, Safe, Point> { ...@@ -211,9 +211,9 @@ struct sinusoidal : public curve_abc<Time, Numeric, Safe, Point> {
inline const num_t two_pi_f(const time_t& t) const { return (2 * M_PI / T_) * t; } inline const num_t two_pi_f(const time_t& t) const { return (2 * M_PI / T_) * t; }
}; // struct sinusoidal }; // struct sinusoidal
} // namespace nd_curves } // namespace ndcurves
DEFINE_CLASS_TEMPLATE_VERSION(SINGLE_ARG(typename Time, typename Numeric, bool Safe, typename Point), DEFINE_CLASS_TEMPLATE_VERSION(SINGLE_ARG(typename Time, typename Numeric, bool Safe, typename Point),
SINGLE_ARG(nd_curves::sinusoidal<Time, Numeric, Safe, Point>)) SINGLE_ARG(ndcurves::sinusoidal<Time, Numeric, Safe, Point>))
#endif // _CLASS_SINUSOIDALCURVE #endif // _CLASS_SINUSOIDALCURVE
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <boost/serialization/split_free.hpp> #include <boost/serialization/split_free.hpp>
#include <boost/serialization/vector.hpp> #include <boost/serialization/vector.hpp>
namespace nd_curves { namespace ndcurves {
/// \class SO3Linear. /// \class SO3Linear.
/// \brief Represents a linear interpolation in SO3, using the slerp method provided by Eigen::Quaternion /// \brief Represents a linear interpolation in SO3, using the slerp method provided by Eigen::Quaternion
...@@ -128,7 +128,7 @@ struct SO3Linear : public curve_abc<Time, Numeric, Safe, matrix3_t, point3_t > { ...@@ -128,7 +128,7 @@ struct SO3Linear : public curve_abc<Time, Numeric, Safe, matrix3_t, point3_t > {
* @return true is the two curves are approximately equals * @return true is the two curves are approximately equals
*/ */
bool isApprox(const SO3Linear_t& other, const Numeric prec = Eigen::NumTraits<Numeric>::dummy_precision()) const { bool isApprox(const SO3Linear_t& other, const Numeric prec = Eigen::NumTraits<Numeric>::dummy_precision()) const {
return nd_curves::isApprox<Numeric>(T_min_, other.min()) && nd_curves::isApprox<Numeric>(T_max_, other.max()) && return ndcurves::isApprox<Numeric>(T_min_, other.min()) && ndcurves::isApprox<Numeric>(T_max_, other.max()) &&
dim_ == other.dim() && init_rot_.toRotationMatrix().isApprox(other.init_rot_.toRotationMatrix(), prec) && dim_ == other.dim() && init_rot_.toRotationMatrix().isApprox(other.init_rot_.toRotationMatrix(), prec) &&
end_rot_.toRotationMatrix().isApprox(other.end_rot_.toRotationMatrix(), prec); end_rot_.toRotationMatrix().isApprox(other.end_rot_.toRotationMatrix(), prec);
} }
...@@ -300,9 +300,9 @@ struct SO3Linear : public curve_abc<Time, Numeric, Safe, matrix3_t, point3_t > { ...@@ -300,9 +300,9 @@ struct SO3Linear : public curve_abc<Time, Numeric, Safe, matrix3_t, point3_t > {
}; // struct SO3Linear }; // struct SO3Linear
} // namespace nd_curves } // namespace ndcurves
DEFINE_CLASS_TEMPLATE_VERSION(SINGLE_ARG(typename Time, typename Numeric, bool Safe), DEFINE_CLASS_TEMPLATE_VERSION(SINGLE_ARG(typename Time, typename Numeric, bool Safe),
SINGLE_ARG(nd_curves::SO3Linear<Time, Numeric, Safe>)) SINGLE_ARG(ndcurves::SO3Linear<Time, Numeric, Safe>))
#endif // _STRUCT_SO3_LINEAR_H #endif // _STRUCT_SO3_LINEAR_H
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
# Copyright (c) 2019 CNRS # Copyright (c) 2019 CNRS
# Author : Steve Tonneau # Author : Steve Tonneau
from .nd_curves import * # noqa from .ndcurves import * # noqa
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <boost/python.hpp> #include <boost/python.hpp>
namespace nd_curves { namespace ndcurves {
namespace bp = boost::python; namespace bp = boost::python;
template <typename Derived> template <typename Derived>
struct SerializableVisitor : public boost::python::def_visitor<SerializableVisitor<Derived> > { struct SerializableVisitor : public boost::python::def_visitor<SerializableVisitor<Derived> > {
...@@ -25,6 +25,6 @@ struct SerializableVisitor : public boost::python::def_visitor<SerializableVisit ...@@ -25,6 +25,6 @@ struct SerializableVisitor : public boost::python::def_visitor<SerializableVisit
; ;
} }
}; };
} // namespace nd_curves } // namespace ndcurves
#endif // ifndef __multicontact_api_python_serialization_archive_hpp__ #endif // ifndef __multicontact_api_python_serialization_archive_hpp__
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "python_variables.h" #include "python_variables.h"
#include "archive_python_binding.h" #include "archive_python_binding.h"
#include "optimization_python.h" #include "optimization_python.h"
#include <nd_curves/serialization/curves.hpp> #include <ndcurves/serialization/curves.hpp>
#include <boost/python.hpp> #include <boost/python.hpp>
#include <boost/python/class.hpp> #include <boost/python/class.hpp>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <boost/utility.hpp> #include <boost/utility.hpp>
#include <boost/python/register_ptr_to_python.hpp> #include <boost/python/register_ptr_to_python.hpp>
namespace nd_curves { namespace ndcurves {
using namespace boost::python; using namespace boost::python;
/* base wrap of curve_abc and others parent abstract class: must implement all pure virtual methods */ /* base wrap of curve_abc and others parent abstract class: must implement all pure virtual methods */
...@@ -509,7 +509,7 @@ sinusoidal_t* wrapSinusoidalConstructorStationary(const real time_traj, ...@@ -509,7 +509,7 @@ sinusoidal_t* wrapSinusoidalConstructorStationary(const real time_traj,
/* End wrap sinusoidal */ /* End wrap sinusoidal */
// TO DO : Replace all load and save function for serialization in class by using // TO DO : Replace all load and save function for serialization in class by using
// SerializableVisitor in archive_python_binding. // SerializableVisitor in archive_python_binding.
BOOST_PYTHON_MODULE(nd_curves) { BOOST_PYTHON_MODULE(ndcurves) {
/** BEGIN eigenpy init**/ /** BEGIN eigenpy init**/
eigenpy::enableEigenPy(); eigenpy::enableEigenPy();
ENABLE_SPECIFIC_MATRIX_TYPE(pointX_t); ENABLE_SPECIFIC_MATRIX_TYPE(pointX_t);
...@@ -1306,4 +1306,4 @@ BOOST_PYTHON_MODULE(nd_curves) { ...@@ -1306,4 +1306,4 @@ BOOST_PYTHON_MODULE(nd_curves) {
#endif #endif
} // End BOOST_PYTHON_MODULE } // End BOOST_PYTHON_MODULE
} // namespace nd_curves } // namespace ndcurves
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "namespace.h" #include "namespace.h"
namespace nd_curves { namespace ndcurves {
namespace python { namespace python {
bp::object getOrCreatePythonNamespace(const std::string& submodule_name) { bp::object getOrCreatePythonNamespace(const std::string& submodule_name) {
...@@ -18,4 +18,4 @@ bp::object getOrCreatePythonNamespace(const std::string& submodule_name) { ...@@ -18,4 +18,4 @@ bp::object getOrCreatePythonNamespace(const std::string& submodule_name) {
return submodule; return submodule;
} }
} // namespace python } // namespace python
} // namespace nd_curves } // namespace ndcurves
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <boost/python.hpp> #include <boost/python.hpp>
namespace nd_curves { namespace ndcurves {
namespace python { namespace python {
namespace bp = boost::python; namespace bp = boost::python;
...@@ -20,6 +20,6 @@ namespace bp = boost::python; ...@@ -20,6 +20,6 @@ namespace bp = boost::python;
/// ///
bp::object getOrCreatePythonNamespace(const std::string& submodule_name); bp::object getOrCreatePythonNamespace(const std::string& submodule_name);
} // namespace python } // namespace python
} // namespace nd_curves } // namespace ndcurves
#endif // ifndef __python_namespace_h__ #endif // ifndef __python_namespace_h__
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
# Copyright (c) 2019 CNRS # Copyright (c) 2019 CNRS
# Author : Steve Tonneau # Author : Steve Tonneau
from .nd_curves.optimization import * # noqa from .ndcurves.optimization import * # noqa
#include "python_variables.h" #include "python_variables.h"
#include "archive_python_binding.h" #include "archive_python_binding.h"
#include "namespace.h" #include "namespace.h"
#include "nd_curves/optimization/definitions.h" #include "ndcurves/optimization/definitions.h"
#include "nd_curves/optimization/quadratic_problem.h" #include "ndcurves/optimization/quadratic_problem.h"
#include <boost/python.hpp> #include <boost/python.hpp>
#include <boost/python/enum.hpp> #include <boost/python/enum.hpp>
#include <boost/python/bases.hpp> #include <boost/python/bases.hpp>
namespace nd_curves { namespace ndcurves {
namespace optimization { namespace optimization {
namespace python { namespace python {
static const bool safe = true; static const bool safe = true;
...@@ -92,7 +92,7 @@ problem_definition_t* wrapProblemDefinitionConstructor(const curve_constraints_t ...@@ -92,7 +92,7 @@ problem_definition_t* wrapProblemDefinitionConstructor(const curve_constraints_t
void exposeOptimization() { void exposeOptimization