Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/pyhpp/manipulation/path-planner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions src/pyhpp/manipulation/path-planner.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down