From d64f11305034d3ee7be10918aa0daf603e62b14c Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Fri, 9 Aug 2019 11:42:18 +0200 Subject: [PATCH] Remove deprecated functions in hpp::manipulation::graph namespace. --- CMakeLists.txt | 3 -- include/hpp/manipulation/graph/edge.hh | 3 -- .../hpp/manipulation/graph/graph-component.hh | 6 --- include/hpp/manipulation/graph/graph.hh | 42 ------------------- .../graph/guided-node-selector.hh | 32 -------------- .../hpp/manipulation/graph/node-selector.hh | 32 -------------- include/hpp/manipulation/graph/node.hh | 32 -------------- include/hpp/manipulation/graph/state.hh | 10 ----- src/graph/edge.cc | 6 --- src/graph/graph-component.cc | 5 --- src/graph/graph.cc | 27 ------------ src/weighed-distance.cc | 4 +- 12 files changed, 2 insertions(+), 200 deletions(-) delete mode 100644 include/hpp/manipulation/graph/guided-node-selector.hh delete mode 100644 include/hpp/manipulation/graph/node-selector.hh delete mode 100644 include/hpp/manipulation/graph/node.hh diff --git a/CMakeLists.txt b/CMakeLists.txt index a57a561c..a52b2ea0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,12 +77,9 @@ SET (${PROJECT_NAME}_HEADERS include/hpp/manipulation/manipulation-planner.hh include/hpp/manipulation/graph-path-validation.hh include/hpp/manipulation/graph-optimizer.hh - include/hpp/manipulation/graph/node.hh include/hpp/manipulation/graph/state.hh include/hpp/manipulation/graph/edge.hh - include/hpp/manipulation/graph/node-selector.hh include/hpp/manipulation/graph/state-selector.hh - include/hpp/manipulation/graph/guided-node-selector.hh include/hpp/manipulation/graph/guided-state-selector.hh include/hpp/manipulation/graph/graph.hh include/hpp/manipulation/graph/statistics.hh diff --git a/include/hpp/manipulation/graph/edge.hh b/include/hpp/manipulation/graph/edge.hh index 926708f0..ca229eed 100644 --- a/include/hpp/manipulation/graph/edge.hh +++ b/include/hpp/manipulation/graph/edge.hh @@ -310,9 +310,6 @@ namespace hpp { void insertParamConstraint (const ImplicitPtr_t& nm, const segments_t& passiveDofs = segments_t ()); - void insertParamConstraint (const DifferentiableFunctionPtr_t function, const ComparisonTypes_t ineq) - HPP_MANIPULATION_DEPRECATED; - /// Insert a LockedJoint that parametrizes the foliation void insertParamConstraint (const LockedJointPtr_t lockedJoint); diff --git a/include/hpp/manipulation/graph/graph-component.hh b/include/hpp/manipulation/graph/graph-component.hh index 493164a3..20f82104 100644 --- a/include/hpp/manipulation/graph/graph-component.hh +++ b/include/hpp/manipulation/graph/graph-component.hh @@ -22,7 +22,6 @@ # include <hpp/util/exception.hh> # include "hpp/manipulation/config.hh" -# include "hpp/manipulation/deprecated.hh" # include "hpp/manipulation/fwd.hh" # include "hpp/manipulation/graph/fwd.hh" # include "hpp/manipulation/graph/dot.hh" @@ -60,11 +59,6 @@ namespace hpp { const ImplicitPtr_t& numConstraint, const segments_t& passiveDofs = segments_t ()); - /// Add core::DifferentiableFunction to the component. - virtual void addNumericalConstraint - (const DifferentiableFunctionPtr_t& function, const ComparisonTypes_t& ineq) - HPP_MANIPULATION_DEPRECATED; - /// Reset the numerical constraints stored in the component. virtual void resetNumericalConstraints (); diff --git a/include/hpp/manipulation/graph/graph.hh b/include/hpp/manipulation/graph/graph.hh index fb61be8f..c3c597ff 100644 --- a/include/hpp/manipulation/graph/graph.hh +++ b/include/hpp/manipulation/graph/graph.hh @@ -52,52 +52,24 @@ namespace hpp { static GraphPtr_t create(const std::string& name, DevicePtr_t robot, const ProblemPtr_t& problem); - /// Create and insert a state selector inside the graph. - /// \deprecated use createStateSelector instead - StateSelectorPtr_t createNodeSelector (const std::string& name) - HPP_MANIPULATION_DEPRECATED; - /// Create and insert a state selector inside the graph. StateSelectorPtr_t createStateSelector (const std::string& name); - /// Set the state selector - /// \warning This should be done before adding nodes to the node - /// selector otherwise the pointer to the parent graph will NOT be - /// valid. - /// \deprecated use stateSelector instead - void nodeSelector (StateSelectorPtr_t ns) HPP_MANIPULATION_DEPRECATED; - /// Set the state selector /// \warning This should be done before adding nodes to the node /// selector otherwise the pointer to the parent graph will NOT be /// valid. void stateSelector (StateSelectorPtr_t ns); - /// Get the state selector - /// \deprecated use stateSelector instead - StateSelectorPtr_t nodeSelector () const HPP_MANIPULATION_DEPRECATED - { - return stateSelector_; - } - /// Get the state selector StateSelectorPtr_t stateSelector () const { return stateSelector_; } - /// Returns the states of a configuration. - /// \deprecated use getState instead - StatePtr_t getNode (ConfigurationIn_t config) const - HPP_MANIPULATION_DEPRECATED; - /// Returns the state of a configuration. StatePtr_t getState (ConfigurationIn_t config) const; - /// Returns the state of a roadmap node - /// \deprecated use getState instead - StatePtr_t getNode(RoadmapNodePtr_t node) const; - /// Returns the state of a roadmap node StatePtr_t getState (RoadmapNodePtr_t node) const; @@ -155,20 +127,6 @@ namespace hpp { /// \return The constraint. ConstraintSetPtr_t configConstraint (const EdgePtr_t& edge) const; - /// Get error of a config with respect to a state constraint - /// - /// \param config Configuration, - /// \param state state containing the constraint to check config against - /// \retval error the error of the state constraint for the - /// configuration - /// \return whether the configuration belongs to the state. - /// Call method core::ConstraintSet::isSatisfied for the state - /// constraints. - /// \deprecated use getConfigErrorForState instead - bool getConfigErrorForNode (ConfigurationIn_t config, - const StatePtr_t& state, vector_t& error) const - HPP_MANIPULATION_DEPRECATED; - /// Get error of a config with respect to a state constraint /// /// \param config Configuration, diff --git a/include/hpp/manipulation/graph/guided-node-selector.hh b/include/hpp/manipulation/graph/guided-node-selector.hh deleted file mode 100644 index 7d424640..00000000 --- a/include/hpp/manipulation/graph/guided-node-selector.hh +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2014, LAAS-CNRS -// Authors: Joseph Mirabel (joseph.mirabel@laas.fr) -// -// This file is part of hpp-manipulation. -// hpp-manipulation is free software: you can redistribute it -// and/or modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation, either version -// 3 of the License, or (at your option) any later version. -// -// hpp-manipulation is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Lesser Public License for more details. You should have -// received a copy of the GNU Lesser General Public License along with -// hpp-manipulation. If not, see <http://www.gnu.org/licenses/>. - -#ifndef HPP_MANIPULATION_GRAPH_GUIDED_NODE_SELECTOR_HH -# define HPP_MANIPULATION_GRAPH_GUIDED_NODE_SELECTOR_HH - -#include "hpp/manipulation/graph/guided-state-selector.hh" - -namespace hpp { - namespace manipulation { - namespace graph { - typedef GuidedStateSelector GuidedNodeSelector - HPP_MANIPULATION_DEPRECATED; - typedef boost::shared_ptr < GuidedNodeSelector > GuidedNodeSelectorPtr_t; - } // namespace graph - } // namespace manipulation -} // namespace hpp - -#endif // HPP_MANIPULATION_GRAPH_GUIDED_NODE_SELECTOR_HH diff --git a/include/hpp/manipulation/graph/node-selector.hh b/include/hpp/manipulation/graph/node-selector.hh deleted file mode 100644 index 5d99087a..00000000 --- a/include/hpp/manipulation/graph/node-selector.hh +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2014, LAAS-CNRS -// Authors: Joseph Mirabel (joseph.mirabel@laas.fr) -// -// This file is part of hpp-manipulation. -// hpp-manipulation is free software: you can redistribute it -// and/or modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation, either version -// 3 of the License, or (at your option) any later version. -// -// hpp-manipulation is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Lesser Public License for more details. You should have -// received a copy of the GNU Lesser General Public License along with -// hpp-manipulation. If not, see <http://www.gnu.org/licenses/>. - -#ifndef HPP_MANIPULATION_GRAPH_NODE_SELECTOR_HH -# define HPP_MANIPULATION_GRAPH_NODE_SELECTOR_HH - -#include "hpp/manipulation/graph/state-selector.hh" - -namespace hpp { - namespace manipulation { - namespace graph { - typedef StateSelector NodeSelector HPP_MANIPULATION_DEPRECATED; - typedef boost::shared_ptr < NodeSelector > NodeSelectorPtr_t; - typedef std::vector < NodeSelectorPtr_t > NodeSelectors_t; - } // namespace graph - } // namespace manipulation -} // namespace hpp - -#endif // HPP_MANIPULATION_GRAPH_NODE_SELECTOR_HH diff --git a/include/hpp/manipulation/graph/node.hh b/include/hpp/manipulation/graph/node.hh deleted file mode 100644 index 2a9421ef..00000000 --- a/include/hpp/manipulation/graph/node.hh +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2014, LAAS-CNRS -// Authors: Joseph Mirabel (joseph.mirabel@laas.fr) -// -// This file is part of hpp-manipulation. -// hpp-manipulation is free software: you can redistribute it -// and/or modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation, either version -// 3 of the License, or (at your option) any later version. -// -// hpp-manipulation is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Lesser Public License for more details. You should have -// received a copy of the GNU Lesser General Public License along with -// hpp-manipulation. If not, see <http://www.gnu.org/licenses/>. - -#ifndef HPP_MANIPULATION_GRAPH_NODE_HH -# define HPP_MANIPULATION_GRAPH_NODE_HH - -# include <hpp/manipulation/graph/state.hh> - -namespace hpp { - namespace manipulation { - namespace graph { - typedef State Node HPP_MANIPULATION_DEPRECATED; - typedef boost::shared_ptr < Node > NodePtr_t; - typedef std::vector < NodePtr_t > Nodes_t; - } // namespace graph - } // namespace manipulation -} // namespace hpp - -#endif // HPP_MANIPULATION_GRAPH_NODE_HH diff --git a/include/hpp/manipulation/graph/state.hh b/include/hpp/manipulation/graph/state.hh index 6e0a5008..96f16630 100644 --- a/include/hpp/manipulation/graph/state.hh +++ b/include/hpp/manipulation/graph/state.hh @@ -24,7 +24,6 @@ #include <hpp/constraints/implicit.hh> #include "hpp/manipulation/config.hh" -#include "hpp/manipulation/deprecated.hh" #include "hpp/manipulation/fwd.hh" #include "hpp/manipulation/graph/fwd.hh" #include "hpp/manipulation/graph/edge.hh" @@ -134,15 +133,6 @@ namespace hpp { passiveDofsForPath_.push_back (passiveDofs); } - /// Add core::DifferentiableFunction to the component. - virtual void addNumericalConstraintForPath (const DifferentiableFunctionPtr_t& function, const ComparisonTypes_t& ineq) - HPP_MANIPULATION_DEPRECATED - { - isInit_ = false; - numericalConstraintsForPath_.push_back - (Implicit::create (function,ineq)); - } - /// Insert the numerical constraints in a ConfigProjector /// \return true is at least one ImplicitPtr_t was inserted. bool insertNumericalConstraintsForPath (ConfigProjectorPtr_t& proj) const diff --git a/src/graph/edge.cc b/src/graph/edge.cc index 61373e3a..ed590f1d 100644 --- a/src/graph/edge.cc +++ b/src/graph/edge.cc @@ -772,12 +772,6 @@ namespace hpp { paramPassiveDofs_.push_back (passiveDofs); } - void LevelSetEdge::insertParamConstraint (const DifferentiableFunctionPtr_t function, const ComparisonTypes_t ineq) - { - isInit_ = false; - insertParamConstraint (constraints::Implicit::create (function, ineq)); - } - void LevelSetEdge::insertParamConstraint (const LockedJointPtr_t lockedJoint) { isInit_ = false; diff --git a/src/graph/graph-component.cc b/src/graph/graph-component.cc index 2d58b330..485e3f4e 100644 --- a/src/graph/graph-component.cc +++ b/src/graph/graph-component.cc @@ -59,11 +59,6 @@ namespace hpp { passiveDofs_.push_back (passiveDofs); } - void GraphComponent::addNumericalConstraint (const DifferentiableFunctionPtr_t& function, const ComparisonTypes_t& ineq) - { - addNumericalConstraint (Implicit::create (function,ineq)); - } - void GraphComponent::resetNumericalConstraints () { isInit_ = false; diff --git a/src/graph/graph.cc b/src/graph/graph.cc index 6ee5c30c..84d6f9a3 100644 --- a/src/graph/graph.cc +++ b/src/graph/graph.cc @@ -59,11 +59,6 @@ namespace hpp { isInit_ = true; } - StateSelectorPtr_t Graph::createNodeSelector (const std::string& name) - { - return createStateSelector (name); - } - StateSelectorPtr_t Graph::createStateSelector (const std::string& name) { isInit_ = false; @@ -72,11 +67,6 @@ namespace hpp { return stateSelector_; } - void Graph::nodeSelector (StateSelectorPtr_t ns) - { - stateSelector (ns); - } - void Graph::stateSelector (StateSelectorPtr_t ns) { isInit_ = false; @@ -124,22 +114,12 @@ namespace hpp { return problem_; } - StatePtr_t Graph::getNode (ConfigurationIn_t config) const - { - return getState (config); - } - StatePtr_t Graph::getState (ConfigurationIn_t config) const { if (!stateSelector_) throw std::runtime_error ("No StateSelector in Constraint Graph."); return stateSelector_->getState (config); } - StatePtr_t Graph::getNode(RoadmapNodePtr_t coreNode) const - { - return stateSelector_->getState (coreNode); - } - StatePtr_t Graph::getState(RoadmapNodePtr_t coreNode) const { return stateSelector_->getState (coreNode); @@ -204,13 +184,6 @@ namespace hpp { return state->configConstraint (); } - bool Graph::getConfigErrorForNode (ConfigurationIn_t config, - const StatePtr_t& state, - vector_t& error) const - { - return getConfigErrorForState (config, state, error); - } - bool Graph::getConfigErrorForState (ConfigurationIn_t config, const StatePtr_t& state, vector_t& error) const diff --git a/src/weighed-distance.cc b/src/weighed-distance.cc index 756e0f11..66fe9145 100644 --- a/src/weighed-distance.cc +++ b/src/weighed-distance.cc @@ -88,8 +88,8 @@ namespace hpp { value_type d = core::WeighedDistance::impl_distance (q1, q2); graph::Edges_t pes = graph_->getEdges ( - graph_->getNode (static_cast <RoadmapNodePtr_t>(n1)), - graph_->getNode (static_cast <RoadmapNodePtr_t>(n2))); + graph_->getState (static_cast <RoadmapNodePtr_t>(n1)), + graph_->getState (static_cast <RoadmapNodePtr_t>(n2))); while (!pes.empty ()) { if (pes.back ()->canConnect (q1, q2)) return d; -- GitLab