From: Jiri Vlasak Date: Wed, 28 Aug 2019 07:18:22 +0000 (+0200) Subject: Do not use slot planner X-Git-Tag: v0.7.0~1^2~10 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hubacji1/iamcar.git/commitdiff_plain/603e75cdd13ea2e9270207da527d6f89c68abc5b?hp=9cddf7c4305d79239760597085516502e647b2ec Do not use slot planner --- diff --git a/base/main.cc b/base/main.cc index 61fd55f..eb02e50 100644 --- a/base/main.cc +++ b/base/main.cc @@ -209,58 +209,6 @@ int main() p.ocost(p.root()); p.ocost(p.goal()); - ParallelSlot ps = ParallelSlot(); - if ( - jvi["slot"] != Json::nullValue && - jvi["slot"]["polygon"] != Json::nullValue - ) { - for (auto xy: jvi["slot"]["polygon"]) { - ps.slot().add_bnode(new RRTNode( - xy[0].asFloat(), - xy[1].asFloat() - )); - } - for (auto e: ps.slot().frame()) - so.push_back(SegmentObstacle(e->init(), e->goal())); - } -#ifdef USE_SLOTPLANNER - TSTART(); - if (ps.slot().bnodes().size() > 0) - ps.fip(co, so); - TEND(); - jvo["ppse"] = ELAPSED; - TPRINT("ParallelSlot"); -#endif - if (ps.slot().bnodes().size() > 0) { - ps.setAll(); - //if (ps.getMidd() != nullptr) - // p.setSamplingInfo(ps.getSamplingInfo()); - } - 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(); - jvo["goal"][0] = p.slot_cusp().back()->x(); - jvo["goal"][1] = p.slot_cusp().back()->y(); - jvo["goal"][2] = p.slot_cusp().back()->h(); - } else { - jvo["goal"][0] = p.goal()->x(); - jvo["goal"][1] = p.goal()->y(); - jvo["goal"][2] = p.goal()->h(); - } - TSTART(); - std::cerr << "Slot Info:" << std::endl; - if (ps.slotSide() == LEFT) - std::cerr << "- LEFT" << std::endl; - else - std::cerr << "- RIGHT" << std::endl; - if (ps.slotType() == PARALLEL) - std::cerr << "- PARALLEL" << std::endl; - else - std::cerr << "- PERPENDICULAR" << std::endl; #ifdef USE_LOADF std::vector steered; for (auto jn: jvi["traj"][0]) { @@ -310,8 +258,6 @@ int main() p.tlog(p.findt()); } } - if (p.goal_found() && ps.slotType() == PARALLEL) - p.tlog(p.findt(p.slot_cusp().back())); #elif defined USE_PTHREAD bool gf = false; RRTNode *ron = nullptr;