]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blobdiff - base/main.cc
Start from original goal
[hubacji1/iamcar.git] / base / main.cc
index e028b2899b01a17c16c1e24cd4d3498f92c79a57..9779164f37564762067fa219b8f7c9afca4c0447 100644 (file)
@@ -183,6 +183,8 @@ int main()
                                 xy[1].asFloat()
                         ));
                 }
+                for (auto e: ps.slot().frame())
+                        so.push_back(SegmentObstacle(e->init(), e->goal()));
         }
 #ifdef USE_SLOTPLANNER
         TSTART();
@@ -194,13 +196,12 @@ int main()
 #endif
         if (ps.slot().bnodes().size() > 0) {
                 ps.setAll();
-                p.samplingInfo_ = ps.getSamplingInfo();
-                p.useSamplingInfo_ = true;
+                //p.setSamplingInfo(ps.getSamplingInfo());
         }
         if (ps.cusp().size() > 0) {
                 p.goal(ps.getMidd());
-                p.goals(ps.goals());
                 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();
@@ -271,6 +272,8 @@ int main()
                         p.tlog(p.findt());
                 }
         }
+        if (ps.slotType() == PARALLEL)
+                p.tlog(p.findt(p.slot_cusp().back()));
 #elif defined USE_PTHREAD
         bool gf = false;
         RRTNode *ron = nullptr;