diff --git a/include/hpp/manipulation/graph/edge.hh b/include/hpp/manipulation/graph/edge.hh index 25b0b95a32b5064a821e14c8946443f942bd7c90..bfe54800572eea1d11dd416d88e55398af78a54c 100644 --- a/include/hpp/manipulation/graph/edge.hh +++ b/include/hpp/manipulation/graph/edge.hh @@ -138,33 +138,6 @@ namespace hpp { state_ = state; } - /// Get the state in which path is. - /// \deprecated use StatePtr_t state () const instead - StatePtr_t node () const - { - return state_.lock(); - } - - /// Set state - /// \deprecated use void state (StatePtr_t state) instead - void node (StatePtr_t state) - { - state_ = state; - } - - /// \deprecated use state(StatePtr_t) instead. - void isInNodeFrom (bool iinf) HPP_MANIPULATION_DEPRECATED - { - if (iinf) state_ = from_; - else state_ = to_; - } - - /// \deprecated see StatePtr_t state() const - bool isInNodeFrom () const HPP_MANIPULATION_DEPRECATED - { - return state_.lock() == from_.lock(); - } - /// Get steering method associated to the edge. const core::SteeringMethodPtr_t& steeringMethod () const { @@ -320,13 +293,6 @@ namespace hpp { /// \param wTo is the destination state of wEdge void setWaypoint (const std::size_t index, const EdgePtr_t wEdge, const StatePtr_t wTo); - /// Get the state in which path after the waypoint is. - /// \deprecated use StatePtr_t state () const instead - StatePtr_t node () const; - - /// Get the state in which path after the waypoint is. - StatePtr_t state () const; - protected: WaypointEdge (const std::string& name) : Edge (name) diff --git a/src/graph-optimizer.cc b/src/graph-optimizer.cc index af60207740e913204e6531e476cdde576efe98c3..fa31e7f8aa604b8ee37abf3e7aa15b47600e0160 100644 --- a/src/graph-optimizer.cc +++ b/src/graph-optimizer.cc @@ -59,7 +59,7 @@ namespace hpp { hppDout(info, "No manipulation::ConstraintSet"); break; } - if (c && edge->node() != c->edge ()->node()) break; + if (c && edge->state() != c->edge ()->state()) break; if (isShort != c->edge()->isShort()) // We do not optimize edges marked as short break; toOpt->appendPath (current); diff --git a/src/graph/edge.cc b/src/graph/edge.cc index ee6453a33932ff7eca1b85ad8f41bc96546c4930..9741be1afcd400835a07ceedf41803dec713aa3e 100644 --- a/src/graph/edge.cc +++ b/src/graph/edge.cc @@ -436,12 +436,6 @@ namespace hpp { waypoints_[index] = Waypoint_t (wEdge, wTo); } - StatePtr_t WaypointEdge::state () const - { - if (isInNodeFrom ()) return waypoints_.back().second; - else return to (); - } - template <> EdgePtr_t WaypointEdge::waypoint <Edge> (const std::size_t index) const { diff --git a/src/path-optimization/keypoints.cc b/src/path-optimization/keypoints.cc index f0b167136808a6d42b5fab82f2a7717a697b60fd..384750c16389c4c7d43ea9d96e117a7bbefca9f2 100644 --- a/src/path-optimization/keypoints.cc +++ b/src/path-optimization/keypoints.cc @@ -62,7 +62,7 @@ namespace hpp { PathVectorPtr_t output = PathVector::create (path->outputSize (), path->outputDerivativeSize ()); for (std::size_t j = 0; j < paths.size(); ++j) - output->concatenate (*paths[j].path); + output->concatenate (paths[j].path); } return output; } @@ -89,7 +89,7 @@ namespace hpp { hppDout(info, "No manipulation::ConstraintSet"); break; } - if (c && ikpp.edge->node() != c->edge ()->node()) break; + if (c && ikpp.edge->state() != c->edge ()->state()) break; if (ikpp.isShort != c->edge()->isShort()) // We do not optimize edges marked as short break; ikpp.path->appendPath (current); @@ -120,7 +120,7 @@ namespace hpp { graph::Edges_t edges; graph::Graph& graph = *problem_.constraintGraph (); try { - edges = graph.getEdges (ikpp1.edge->node(), ikpp2.edge->node()); + edges = graph.getEdges (ikpp1.edge->state(), ikpp2.edge->state()); } catch (const std::logic_error& e) { hppDout (error, e.what ()); return PathVectorPtr_t (); @@ -169,12 +169,12 @@ namespace hpp { PathVectorPtr_t tmp = PathVector::create (ikpp1.path->outputSize (), ikpp1.path->outputDerivativeSize ()); - tmp->concatenate (*(ikpp1.path->extract - (make_pair (t0, t1))-> as <PathVector> ())); + tmp->concatenate (ikpp1.path->extract + (make_pair (t0, t1))-> as <PathVector> ()); tmp->appendPath (short1); tmp->appendPath (short2); - tmp->concatenate (*(ikpp2.path->extract - (make_pair (t4, t5))-> as <PathVector> ())); + tmp->concatenate (ikpp2.path->extract + (make_pair (t4, t5))-> as <PathVector> ()); if (cur_length >= tmp->length()) { cur_length = tmp->length(); @@ -199,10 +199,10 @@ namespace hpp { PathVectorPtr_t output = PathVector::create (shortcut->outputSize (), shortcut->outputDerivativeSize ()); for (std::size_t j = 0; j < i1; ++j) - output->concatenate (*input[j].path); - output->concatenate (*flat); + output->concatenate (input[j].path); + output->concatenate (flat); for (std::size_t j = i2 + 1; j < input.size(); ++j) - output->concatenate (*input[j].path); + output->concatenate (input[j].path); return split (output); } diff --git a/src/path-optimization/small-steps.cc b/src/path-optimization/small-steps.cc index 1ebf1ff14244249917ed0a57e817de1d53a7ecd1..0ae7baef2ce4dccda1550dfa3c4fcced52a5e404 100644 --- a/src/path-optimization/small-steps.cc +++ b/src/path-optimization/small-steps.cc @@ -61,12 +61,12 @@ namespace hpp { current = flat->pathAtRank (i_e); c = HPP_DYNAMIC_PTR_CAST (ConstraintSet, current->constraints ()); if (!c && edge) break; - if (c && edge->node() != c->edge ()->node()) break; + if (c && edge->state() != c->edge ()->state()) break; toOpt->appendPath (current); } toConcat = step.optimize (toOpt); i_s = i_e; - opted->concatenate (*toConcat); + opted->concatenate (toConcat); } const_cast <core::Problem&>(this->problem ()).pathValidation (gpv);