Commit f2f4f1a5 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[Python] update to changes in operator == (do not exist anymore in curve_abc)

parent d92d8e84
...@@ -403,8 +403,6 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -403,8 +403,6 @@ BOOST_PYTHON_MODULE(curves) {
class_<CurveWrapper, boost::noncopyable>("curve", no_init) class_<CurveWrapper, boost::noncopyable>("curve", no_init)
.def("__call__", pure_virtual(&curve_abc_t::operator()), "Evaluate the curve at the given time.", .def("__call__", pure_virtual(&curve_abc_t::operator()), "Evaluate the curve at the given time.",
args("self", "t")) args("self", "t"))
.def("__eq__", &curve_abc_t::operator==)
.def("__ne__", &curve_abc_t::operator!=)
.def("derivate", pure_virtual(&curve_abc_t::derivate), "Evaluate the derivative of order N of curve at time t.", .def("derivate", pure_virtual(&curve_abc_t::derivate), "Evaluate the derivative of order N of curve at time t.",
args("self", "t", "N")) args("self", "t", "N"))
.def("compute_derivate", pure_virtual(&curve_abc_t::compute_derivate_ptr),return_value_policy<manage_new_object>(), "Return the derivative of *this at the order N.", args("self", "N")) .def("compute_derivate", pure_virtual(&curve_abc_t::compute_derivate_ptr),return_value_policy<manage_new_object>(), "Return the derivative of *this at the order N.", args("self", "N"))
...@@ -427,8 +425,6 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -427,8 +425,6 @@ BOOST_PYTHON_MODULE(curves) {
class_<Curve3Wrapper, boost::noncopyable, bases<curve_abc_t> >("curve3", no_init) class_<Curve3Wrapper, boost::noncopyable, bases<curve_abc_t> >("curve3", no_init)
.def("__call__", pure_virtual(&curve_3_t::operator()), "Evaluate the curve at the given time.", .def("__call__", pure_virtual(&curve_3_t::operator()), "Evaluate the curve at the given time.",
args("self", "t")) args("self", "t"))
.def("__eq__", &curve_3_t::operator==)
.def("__ne__", &curve_3_t::operator!=)
.def("derivate", pure_virtual(&curve_3_t::derivate), "Evaluate the derivative of order N of curve at time t.", .def("derivate", pure_virtual(&curve_3_t::derivate), "Evaluate the derivative of order N of curve at time t.",
args("self", "t", "N")) args("self", "t", "N"))
.def("compute_derivate", pure_virtual(&curve_3_t::compute_derivate_ptr),return_value_policy<manage_new_object>(), "Return the derivative of *this at the order N.", args("self", "N")) .def("compute_derivate", pure_virtual(&curve_3_t::compute_derivate_ptr),return_value_policy<manage_new_object>(), "Return the derivative of *this at the order N.", args("self", "N"))
...@@ -439,8 +435,6 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -439,8 +435,6 @@ BOOST_PYTHON_MODULE(curves) {
class_<CurveRotationWrapper, boost::noncopyable, bases<curve_abc_t> >("curve_rotation", no_init) class_<CurveRotationWrapper, boost::noncopyable, bases<curve_abc_t> >("curve_rotation", no_init)
.def("__call__", pure_virtual(&curve_rotation_t::operator()), "Evaluate the curve at the given time.", .def("__call__", pure_virtual(&curve_rotation_t::operator()), "Evaluate the curve at the given time.",
args("self", "t")) args("self", "t"))
.def("__eq__", &curve_rotation_t::operator==)
.def("__ne__", &curve_rotation_t::operator!=)
.def("derivate", pure_virtual(&curve_rotation_t::derivate), .def("derivate", pure_virtual(&curve_rotation_t::derivate),
"Evaluate the derivative of order N of curve at time t.", args("self", "t", "N")) "Evaluate the derivative of order N of curve at time t.", args("self", "t", "N"))
.def("compute_derivate", pure_virtual(&curve_rotation_t::compute_derivate_ptr),return_value_policy<manage_new_object>(), "Return the derivative of *this at the order N.", args("self", "N")) .def("compute_derivate", pure_virtual(&curve_rotation_t::compute_derivate_ptr),return_value_policy<manage_new_object>(), "Return the derivative of *this at the order N.", args("self", "N"))
...@@ -451,8 +445,6 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -451,8 +445,6 @@ BOOST_PYTHON_MODULE(curves) {
class_<CurveSE3Wrapper, boost::noncopyable, bases<curve_abc_t> >("curve_SE3", no_init) class_<CurveSE3Wrapper, boost::noncopyable, bases<curve_abc_t> >("curve_SE3", no_init)
.def("__call__", &se3Return, "Evaluate the curve at the given time. Return as an homogeneous matrix.", .def("__call__", &se3Return, "Evaluate the curve at the given time. Return as an homogeneous matrix.",
args("self", "t")) args("self", "t"))
.def("__eq__", &curve_SE3_t::operator==)
.def("__ne__", &curve_SE3_t::operator!=)
.def("derivate", pure_virtual(&curve_SE3_t::derivate), .def("derivate", pure_virtual(&curve_SE3_t::derivate),
"Evaluate the derivative of order N of curve at time t. Return as a vector 6.", args("self", "t", "N")) "Evaluate the derivative of order N of curve at time t. Return as a vector 6.", args("self", "t", "N"))
.def("compute_derivate", pure_virtual(&curve_SE3_t::compute_derivate_ptr),return_value_policy<manage_new_object>(), "Return the derivative of *this at the order N.", args("self", "N")) .def("compute_derivate", pure_virtual(&curve_SE3_t::compute_derivate_ptr),return_value_policy<manage_new_object>(), "Return the derivative of *this at the order N.", args("self", "N"))
...@@ -494,6 +486,8 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -494,6 +486,8 @@ BOOST_PYTHON_MODULE(curves) {
.def("loadFromBinary", &bezier3_t::loadFromBinary<bezier3_t>, bp::args("filename"), .def("loadFromBinary", &bezier3_t::loadFromBinary<bezier3_t>, bp::args("filename"),
"Loads *this from a binary file.") "Loads *this from a binary file.")
//.def(SerializableVisitor<bezier_t>()) //.def(SerializableVisitor<bezier_t>())
.def(bp::self == bp::self)
.def(bp::self != bp::self)
; ;
/** END bezier3 curve**/ /** END bezier3 curve**/
/** BEGIN bezier curve**/ /** BEGIN bezier curve**/
...@@ -517,6 +511,8 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -517,6 +511,8 @@ BOOST_PYTHON_MODULE(curves) {
"Saves *this inside a binary file.") "Saves *this inside a binary file.")
.def("loadFromBinary", &bezier_t::loadFromBinary<bezier_t>, bp::args("filename"), .def("loadFromBinary", &bezier_t::loadFromBinary<bezier_t>, bp::args("filename"),
"Loads *this from a binary file.") "Loads *this from a binary file.")
.def(bp::self == bp::self)
.def(bp::self != bp::self)
//.def(SerializableVisitor<bezier_t>()) //.def(SerializableVisitor<bezier_t>())
; ;
/** END bezier curve**/ /** END bezier curve**/
...@@ -557,7 +553,10 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -557,7 +553,10 @@ BOOST_PYTHON_MODULE(curves) {
.def("waypoints", &wayPointsToLists, return_value_policy<manage_new_object>()) .def("waypoints", &wayPointsToLists, return_value_policy<manage_new_object>())
.def("waypointAtIndex", &bezier_linear_variable_t::waypointAtIndex) .def("waypointAtIndex", &bezier_linear_variable_t::waypointAtIndex)
.def_readonly("degree", &bezier_linear_variable_t::degree_) .def_readonly("degree", &bezier_linear_variable_t::degree_)
.def_readonly("nbWaypoints", &bezier_linear_variable_t::size_); .def_readonly("nbWaypoints", &bezier_linear_variable_t::size_)
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
class_<quadratic_variable_t>("cost", no_init) class_<quadratic_variable_t>("cost", no_init)
.add_property("A", &cost_t_quad) .add_property("A", &cost_t_quad)
...@@ -609,7 +608,10 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -609,7 +608,10 @@ BOOST_PYTHON_MODULE(curves) {
.def("saveAsBinary", &polynomial_t::saveAsBinary<polynomial_t>, bp::args("filename"), .def("saveAsBinary", &polynomial_t::saveAsBinary<polynomial_t>, bp::args("filename"),
"Saves *this inside a binary file.") "Saves *this inside a binary file.")
.def("loadFromBinary", &polynomial_t::loadFromBinary<polynomial_t>, bp::args("filename"), .def("loadFromBinary", &polynomial_t::loadFromBinary<polynomial_t>, bp::args("filename"),
"Loads *this from a binary file."); "Loads *this from a binary file.")
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
/** END polynomial function**/ /** END polynomial function**/
/** BEGIN piecewise curve function **/ /** BEGIN piecewise curve function **/
...@@ -673,7 +675,10 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -673,7 +675,10 @@ BOOST_PYTHON_MODULE(curves) {
.def("saveAsBinary", &piecewise_t::saveAsBinary<piecewise_t>, .def("saveAsBinary", &piecewise_t::saveAsBinary<piecewise_t>,
bp::args("filename"), "Saves *this inside a binary file.") bp::args("filename"), "Saves *this inside a binary file.")
.def("loadFromBinary", &piecewise_t::loadFromBinary<piecewise_t>, .def("loadFromBinary", &piecewise_t::loadFromBinary<piecewise_t>,
bp::args("filename"), "Loads *this from a binary file."); bp::args("filename"), "Loads *this from a binary file.")
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
class_<piecewise_SE3_t, bases<curve_SE3_t> >("piecewise_SE3", init<>()) class_<piecewise_SE3_t, bases<curve_SE3_t> >("piecewise_SE3", init<>())
.def("__init__", make_constructor(&wrapPiecewiseSE3Constructor, default_call_policies(), arg("curve")), .def("__init__", make_constructor(&wrapPiecewiseSE3Constructor, default_call_policies(), arg("curve")),
...@@ -704,6 +709,8 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -704,6 +709,8 @@ BOOST_PYTHON_MODULE(curves) {
"Saves *this inside a binary file.") "Saves *this inside a binary file.")
.def("loadFromBinary", &piecewise_SE3_t::loadFromBinary<piecewise_SE3_t>, bp::args("filename"), .def("loadFromBinary", &piecewise_SE3_t::loadFromBinary<piecewise_SE3_t>, bp::args("filename"),
"Loads *this from a binary file.") "Loads *this from a binary file.")
.def(bp::self == bp::self)
.def(bp::self != bp::self)
#ifdef CURVES_WITH_PINOCCHIO_SUPPORT #ifdef CURVES_WITH_PINOCCHIO_SUPPORT
.def("append", &addFinalSE3, .def("append", &addFinalSE3,
"Append a new linear SE3 curve at the end of the piecewise curve, defined between self.max() " "Append a new linear SE3 curve at the end of the piecewise curve, defined between self.max() "
...@@ -730,7 +737,10 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -730,7 +737,10 @@ BOOST_PYTHON_MODULE(curves) {
.def("saveAsBinary", &exact_cubic_t::saveAsBinary<exact_cubic_t>, bp::args("filename"), .def("saveAsBinary", &exact_cubic_t::saveAsBinary<exact_cubic_t>, bp::args("filename"),
"Saves *this inside a binary file.") "Saves *this inside a binary file.")
.def("loadFromBinary", &exact_cubic_t::loadFromBinary<exact_cubic_t>, bp::args("filename"), .def("loadFromBinary", &exact_cubic_t::loadFromBinary<exact_cubic_t>, bp::args("filename"),
"Loads *this from a binary file."); "Loads *this from a binary file.")
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
/** END exact_cubic curve**/ /** END exact_cubic curve**/
/** BEGIN cubic_hermite_spline **/ /** BEGIN cubic_hermite_spline **/
...@@ -747,7 +757,10 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -747,7 +757,10 @@ BOOST_PYTHON_MODULE(curves) {
.def("saveAsBinary", &cubic_hermite_spline_t::saveAsBinary<cubic_hermite_spline_t>, bp::args("filename"), .def("saveAsBinary", &cubic_hermite_spline_t::saveAsBinary<cubic_hermite_spline_t>, bp::args("filename"),
"Saves *this inside a binary file.") "Saves *this inside a binary file.")
.def("loadFromBinary", &cubic_hermite_spline_t::loadFromBinary<cubic_hermite_spline_t>, bp::args("filename"), .def("loadFromBinary", &cubic_hermite_spline_t::loadFromBinary<cubic_hermite_spline_t>, bp::args("filename"),
"Loads *this from a binary file."); "Loads *this from a binary file.")
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
/** END cubic_hermite_spline **/ /** END cubic_hermite_spline **/
/** BEGIN curve constraints**/ /** BEGIN curve constraints**/
...@@ -761,7 +774,10 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -761,7 +774,10 @@ BOOST_PYTHON_MODULE(curves) {
/** END curve constraints**/ /** END curve constraints**/
/** BEGIN bernstein polynomial**/ /** BEGIN bernstein polynomial**/
class_<bernstein_t>("bernstein", init<const unsigned int, const unsigned int>()) class_<bernstein_t>("bernstein", init<const unsigned int, const unsigned int>())
.def("__call__", &bernstein_t::operator()); .def("__call__", &bernstein_t::operator())
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
/** END bernstein polynomial**/ /** END bernstein polynomial**/
/** BEGIN SO3 Linear**/ /** BEGIN SO3 Linear**/
...@@ -791,6 +807,8 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -791,6 +807,8 @@ BOOST_PYTHON_MODULE(curves) {
"Saves *this inside a binary file.") "Saves *this inside a binary file.")
.def("loadFromBinary",&SO3Linear_t::loadFromBinary<SO3Linear_t>,bp::args("filename"), .def("loadFromBinary",&SO3Linear_t::loadFromBinary<SO3Linear_t>,bp::args("filename"),
"Loads *this from a binary file.") "Loads *this from a binary file.")
.def(bp::self == bp::self)
.def(bp::self != bp::self)
; ;
/** END SO3 Linear**/ /** END SO3 Linear**/
...@@ -842,6 +860,8 @@ BOOST_PYTHON_MODULE(curves) { ...@@ -842,6 +860,8 @@ BOOST_PYTHON_MODULE(curves) {
"Saves *this inside a binary file.") "Saves *this inside a binary file.")
.def("loadFromBinary",&SE3Curve_t::loadFromBinary<SE3Curve_t>,bp::args("filename"), .def("loadFromBinary",&SE3Curve_t::loadFromBinary<SE3Curve_t>,bp::args("filename"),
"Loads *this from a binary file.") "Loads *this from a binary file.")
.def(bp::self == bp::self)
.def(bp::self != bp::self)
#ifdef CURVES_WITH_PINOCCHIO_SUPPORT #ifdef CURVES_WITH_PINOCCHIO_SUPPORT
.def("__init__", .def("__init__",
make_constructor(&wrapSE3CurveFromSE3Pinocchio, default_call_policies(), make_constructor(&wrapSE3CurveFromSE3Pinocchio, default_call_policies(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment