From cc026e38e1b8034d0b422a60a4d52454835c2fca Mon Sep 17 00:00:00 2001 From: Florent Lamiraux Date: Tue, 10 Mar 2026 09:46:01 +0000 Subject: [PATCH 1/2] [TransitionPlanner] Replace setEdge by setTransition Make setEdge deprecated. --- src/pyhpp/manipulation/path-planner.cc | 11 ++++++++++- src/pyhpp/manipulation/path-planner.hh | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/pyhpp/manipulation/path-planner.cc b/src/pyhpp/manipulation/path-planner.cc index fd5720e..4caa1d5 100644 --- a/src/pyhpp/manipulation/path-planner.cc +++ b/src/pyhpp/manipulation/path-planner.cc @@ -154,8 +154,16 @@ 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 +256,8 @@ 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(); From fa590bd051ae25f95d50540134301da871f8508c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 09:50:01 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/pyhpp/manipulation/path-planner.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pyhpp/manipulation/path-planner.cc b/src/pyhpp/manipulation/path-planner.cc index 4caa1d5..89bc482 100644 --- a/src/pyhpp/manipulation/path-planner.cc +++ b/src/pyhpp/manipulation/path-planner.cc @@ -158,8 +158,9 @@ PathVectorPtr_t TransitionPlanner::timeParameterization( 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."); + warnings.attr("warn")( + "pyhpp.manipulation.TransitionPlanner.setEdge is deprecated. " + "Use setTransition instead."); } void TransitionPlanner::setTransition(const PyWEdge& transition) { @@ -256,8 +257,10 @@ void exposePathPlanners() { DocClassMethod(optimizePath)) .def("timeParameterization", &TransitionPlanner::timeParameterization, DocClassMethod(timeParameterization)) - .def("setEdge", &TransitionPlanner::setEdge, DocClassMethod(setEdge)) // deprecated - .def("setTransition", &TransitionPlanner::setTransition, DocClassMethod(setEdge)) + .def("setEdge", &TransitionPlanner::setEdge, + DocClassMethod(setEdge)) // deprecated + .def("setTransition", &TransitionPlanner::setTransition, + DocClassMethod(setEdge)) .def("setReedsAndSheppSteeringMethod", &TransitionPlanner::setReedsAndSheppSteeringMethod, DocClassMethod(setReedsAndSheppSteeringMethod))