diff --git a/src/pyhpp/manipulation/path-planner.cc b/src/pyhpp/manipulation/path-planner.cc index fd5720e..89bc482 100644 --- a/src/pyhpp/manipulation/path-planner.cc +++ b/src/pyhpp/manipulation/path-planner.cc @@ -154,8 +154,17 @@ PathVectorPtr_t TransitionPlanner::timeParameterization( return trObj()->timeParameterization(path); } +// deprecated void TransitionPlanner::setEdge(const PyWEdge& transition) { trObj()->setEdge(transition.obj); + boost::python::object warnings = boost::python::import("warnings"); + warnings.attr("warn")( + "pyhpp.manipulation.TransitionPlanner.setEdge is deprecated. " + "Use setTransition instead."); +} + +void TransitionPlanner::setTransition(const PyWEdge& transition) { + trObj()->setEdge(transition.obj); } void TransitionPlanner::setReedsAndSheppSteeringMethod(double turningRadius) { @@ -248,7 +257,10 @@ void exposePathPlanners() { DocClassMethod(optimizePath)) .def("timeParameterization", &TransitionPlanner::timeParameterization, DocClassMethod(timeParameterization)) - .def("setEdge", &TransitionPlanner::setEdge, DocClassMethod(setEdge)) + .def("setEdge", &TransitionPlanner::setEdge, + DocClassMethod(setEdge)) // deprecated + .def("setTransition", &TransitionPlanner::setTransition, + DocClassMethod(setEdge)) .def("setReedsAndSheppSteeringMethod", &TransitionPlanner::setReedsAndSheppSteeringMethod, DocClassMethod(setReedsAndSheppSteeringMethod)) diff --git a/src/pyhpp/manipulation/path-planner.hh b/src/pyhpp/manipulation/path-planner.hh index 5ca00a8..8d10095 100644 --- a/src/pyhpp/manipulation/path-planner.hh +++ b/src/pyhpp/manipulation/path-planner.hh @@ -61,6 +61,7 @@ struct TransitionPlanner : public pyhpp::core::PathPlanner { PathVectorPtr_t optimizePath(const PathPtr_t& path); PathVectorPtr_t timeParameterization(const PathVectorPtr_t& path); void setEdge(const PyWEdge& transition); + void setTransition(const PyWEdge& transition); void setReedsAndSheppSteeringMethod(double turningRadius); void pathProjector(const PathProjectorPtr_t pathProjector); void clearPathOptimizers();