diff --git a/include/hpp/manipulation/roadmap-node.hh b/include/hpp/manipulation/roadmap-node.hh index e55a92b31ffd26c7bc6be47c17f77ac1d81732ac..422da08d0f01ccf581efee5f067b73b54cdcb644 100644 --- a/include/hpp/manipulation/roadmap-node.hh +++ b/include/hpp/manipulation/roadmap-node.hh @@ -92,21 +92,21 @@ namespace hpp { } /// \} - void symbolicComponent (const LeafConnectedCompPtr_t& sc) + void leafConnectedComponent (const LeafConnectedCompPtr_t& sc) { - symbolicCC_ = sc; + leafCC_ = sc; } - LeafConnectedCompPtr_t symbolicComponent () const + LeafConnectedCompPtr_t leafConnectedComponent () const { - return symbolicCC_; + return leafCC_; } private: CachingSystem cacheSystem_; graph::StateWkPtr_t state_; - LeafConnectedCompPtr_t symbolicCC_; + LeafConnectedCompPtr_t leafCC_; }; } // namespace manipulation } // namespace hpp diff --git a/include/hpp/manipulation/roadmap.hh b/include/hpp/manipulation/roadmap.hh index 56de8879e3565d1f0e5bcc4fdb7e95eb0a9c9304..abe2aa814b4e2739886afdf28afd03aef0b572af 100644 --- a/include/hpp/manipulation/roadmap.hh +++ b/include/hpp/manipulation/roadmap.hh @@ -66,10 +66,14 @@ namespace hpp { /// Get graph state corresponding to given roadmap node graph::StatePtr_t getState(RoadmapNodePtr_t node); - /// Get the symbolic components - const LeafConnectedComps_t& symbolicComponents () const + /// Get leaf connected components + /// + /// Leaf connected components are composed of nodes + /// \li belonging to the same connected component of the roadmap and, + /// \li lying in the same leaf of a transition. + const LeafConnectedComps_t& leafConnectedComponents () const { - return symbolicCCs_; + return leafCCs_; } protected: @@ -97,7 +101,7 @@ namespace hpp { Histograms_t histograms_; graph::GraphPtr_t graph_; RoadmapWkPtr_t weak_; - LeafConnectedComps_t symbolicCCs_; + LeafConnectedComps_t leafCCs_; }; /// \} } // namespace manipulation diff --git a/src/leaf-connected-comp.cc b/src/leaf-connected-comp.cc index e7204bc8404861c783cb546670730c83d27cb757..bbf5fd56b8f1c7745869118d0a43ee2d18d13e2a 100644 --- a/src/leaf-connected-comp.cc +++ b/src/leaf-connected-comp.cc @@ -74,7 +74,7 @@ namespace hpp { // Tell other's nodes that they now belong to this connected component for (RoadmapNodes_t::iterator itNode = other->nodes_.begin (); itNode != other->nodes_.end (); ++itNode) { - (*itNode)->symbolicComponent (weak_.lock ()); + (*itNode)->leafConnectedComponent (weak_.lock ()); } // Add other's nodes to this list. nodes_.insert (nodes_.end (), other->nodes_.begin(), other->nodes_.end()); diff --git a/src/roadmap.cc b/src/roadmap.cc index 28e67f5ab8586a6e00d4533c1a218a5ad8c2e12f..cfec8b7711649bf36bf146cef5e0b1e410f85880 100644 --- a/src/roadmap.cc +++ b/src/roadmap.cc @@ -51,7 +51,7 @@ namespace hpp { for (it = hs.begin(); it != hs.end(); ++it) (*it)->clear (); } - symbolicCCs_.clear(); + leafCCs_.clear(); } void Roadmap::push_node (const core::NodePtr_t& n) @@ -60,7 +60,7 @@ namespace hpp { const RoadmapNodePtr_t& node = static_cast <const RoadmapNodePtr_t> (n); statInsert (node); - symbolicCCs_.insert(node->symbolicComponent()); + leafCCs_.insert(node->leafConnectedComponent()); } void Roadmap::statInsert (const RoadmapNodePtr_t& n) @@ -119,7 +119,7 @@ namespace hpp { // call RoadmapNode constructor with new manipulation connected component RoadmapNodePtr_t node = new RoadmapNode (q, ConnectedComponent::create(weak_)); LeafConnectedCompPtr_t sc = WeighedLeafConnectedComp::create (weak_.lock()); - node->symbolicComponent (sc); + node->leafConnectedComponent (sc); sc->setFirstNode(node); return node; } @@ -134,16 +134,16 @@ namespace hpp { Parent::addEdge(edge); const RoadmapNodePtr_t& f = static_cast <const RoadmapNodePtr_t> (edge->from()); const RoadmapNodePtr_t& t = static_cast <const RoadmapNodePtr_t> (edge->to()); - LeafConnectedCompPtr_t scf = f->symbolicComponent(); - LeafConnectedCompPtr_t sct = t->symbolicComponent(); + LeafConnectedCompPtr_t scf = f->leafConnectedComponent(); + LeafConnectedCompPtr_t sct = t->leafConnectedComponent(); scf->canReach(sct); if (scf->canMerge(sct)) { if (scf->nodes().size() > sct->nodes().size()) { scf->merge(sct); - symbolicCCs_.erase(sct); + leafCCs_.erase(sct); } else { sct->merge(scf); - symbolicCCs_.erase(scf); + leafCCs_.erase(scf); } } } diff --git a/src/symbolic-planner.cc b/src/symbolic-planner.cc index f0ae1b3c8467dba727976b9c317be031df4cef99..9e5cfd5fd65cdc8cd4603c8b366ac029472b560c 100644 --- a/src/symbolic-planner.cc +++ b/src/symbolic-planner.cc @@ -179,7 +179,7 @@ namespace hpp { // Get the roadmap and the symbolic components RoadmapPtr_t rdm = HPP_DYNAMIC_PTR_CAST(Roadmap, roadmap()); HPP_ASSERT(rdm); - LeafConnectedCompList_t scs = sorted_list (rdm->symbolicComponents()); + LeafConnectedCompList_t scs = sorted_list (rdm->leafConnectedComponents()); core::Nodes_t newNodes; core::PathPtr_t path; @@ -301,7 +301,7 @@ namespace hpp { HPP_START_TIMECOUNTER (chooseEdge); // This code should go into a NodeSelector derived class. WeighedLeafConnectedCompPtr_t wscPtr = HPP_DYNAMIC_PTR_CAST - (WeighedLeafConnectedComp, n_near->symbolicComponent()); + (WeighedLeafConnectedComp, n_near->leafConnectedComponent()); if (wscPtr) { WeighedLeafConnectedComp wsc = *wscPtr; value_type R = rand() / RAND_MAX; @@ -528,12 +528,12 @@ namespace hpp { // results in similar weights for the symbolic components. const value_type weightInc = 1.3; const value_type weightDec = 0.99; - CastToWSC_ptr (oldWSC, near->symbolicComponent()); + CastToWSC_ptr (oldWSC, near->leafConnectedComponent()); CollisionValidationReportPtr_t colRep; switch (extend.status) { case SUCCESS: { - CastToWSC_ptr (newWSC, newN->symbolicComponent()); + CastToWSC_ptr (newWSC, newN->leafConnectedComponent()); switch (extend.info) { case SUCCESS: // If the corresponding edge is a loop, no adjustment.