]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/commitdiff
Consider only one goal in path procedure
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Fri, 24 Apr 2020 12:59:01 +0000 (14:59 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Fri, 24 Apr 2020 12:59:01 +0000 (14:59 +0200)
src/rrts.cc

index 2010c1c4c1895364a7beb4b75d6f8f759ed636fc..d4ea90e7eb8caf5b1e923cafc4fbabb475366fc6 100644 (file)
@@ -303,14 +303,6 @@ std::vector<RRTNode *> RRTS::path()
         if (this->goals().size() == 0)
                 return path;
         RRTNode *goal = &this->goals().front();
-        for (auto &n: this->goals()) {
-                if (
-                        n.p() != nullptr
-                        && (n.c() < goal->c() || goal->p() == nullptr)
-                ) {
-                        goal = &n;
-                }
-        }
         if (goal->p() == nullptr)
                 return path;
         while (goal != nullptr) {