]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blobdiff - base/main.cc
Add goal_found method for two RRTNodes
[hubacji1/iamcar.git] / base / main.cc
index 729ec4a37dd7378702e34889e3cf3928ae1d3333..8c544c198ec498930ace88e3fac16a0d7935e75f 100644 (file)
@@ -197,10 +197,10 @@ int main()
                 p.samplingInfo_ = ps.getSamplingInfo();
                 p.useSamplingInfo_ = true;
         }
-        p.goals(ps.goals());
         if (ps.cusp().size() > 0) {
                 p.goal(ps.getMidd());
                 p.slot_cusp(ps.cusp().front()); // use first found solution
+                p.goals(ps.goals());
                 jvo["midd"][0] = p.goal()->x();
                 jvo["midd"][1] = p.goal()->y();
                 jvo["midd"][2] = p.goal()->h();
@@ -268,10 +268,7 @@ int main()
                 p.next();
                 p.tend();
                 if (p.opt_path()) {
-                        if (ps.cusp().size() > 0)
-                                p.tlog(p.findt(p.slot_cusp().back()));
-                        else
-                                p.tlog(p.findt());
+                        p.tlog(p.findt());
                 }
         }
 #elif defined USE_PTHREAD