]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Run path optimization in each iteration
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Thu, 4 Oct 2018 11:45:09 +0000 (13:45 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Thu, 4 Oct 2018 11:45:09 +0000 (13:45 +0200)
base/main.cc
decision_control/rrtplanner.cc

index b0e559368ee5ca9975db9d69e617b6af5d53e049..42975aee82df71f54a8cf35a92967db7c1e14303 100644 (file)
@@ -99,6 +99,8 @@ int main()
         while (run_planner) {
                 p.next();
                 p.tend();
+                if (p.opt_path())
+                        p.tlog(p.findt());
 #ifdef USE_GL
                 p.glplot();
 #endif
index b299bd9576e47b0bf176c5fb741cd4b7ad3149c3..98d5d4b29a0d572c20839541519ed20665fda660 100644 (file)
@@ -501,8 +501,6 @@ bool T2::next()
                                 if (this->goal_found(pn, this->cost)) {
                                         this->goal_cost();
                                         this->tlog(this->findt());
-                                        this->opt_path();
-                                        this->tlog(this->findt());
                                         en_add = false;
                                 }
                         }
@@ -538,8 +536,6 @@ bool T2::next()
                                         if (this->goal_found(pn, this->cost)) {
                                                 this->goal_cost();
                                                 this->tlog(this->findt());
-                                                this->opt_path();
-                                                this->tlog(this->findt());
                                                 en_add = false;
                                         }
                                 }