ompl::geometric::SPARS::SPARS(const base::SpaceInformationPtr &si) : base::Planner(si, "SPARS") , geomPath_(si) , stateProperty_(boost::get(vertex_state_t(), g_)) , sparseStateProperty_(boost::get(vertex_state_t(), s_)) , sparseColorProperty_(boost::get(vertex_color_t(), s_)) , representativesProperty_(boost::get(vertex_representative_t(), g_)) , nonInterfaceListsProperty_(boost::get(vertex_list_t(), s_)) , interfaceListsProperty_(boost::get(vertex_interface_list_t(), s_)) , weightProperty_(boost::get(boost::edge_weight, g_)) , sparseDJSets_(boost::get(boost::vertex_rank, s_), boost::get(boost::vertex_predecessor, s_)) , consecutiveFailures_(0) , stretchFactor_(3.) , maxFailures_(1000) , addedSolution_(false) , denseDeltaFraction_(.001) , sparseDeltaFraction_(.25) , denseDelta_(0.) , sparseDelta_(0.) , iterations_(0) , bestCost_(std::numeric_limits<double>::quiet_NaN()) { specs_.recognizedGoal = base::GOAL_SAMPLEABLE_REGION; specs_.approximateSolutions = false; specs_.optimizingPaths = true; specs_.multithreaded = true; psimp_ = std::make_shared<PathSimplifier>(si_); psimp_->freeStates(false); Planner::declareParam<double>("stretch_factor", this, &SPARS::setStretchFactor, &SPARS::getStretchFactor, "1.1:0.1:" "3.0"); Planner::declareParam<double>("sparse_delta_fraction", this, &SPARS::setSparseDeltaFraction, &SPARS::getSparseDeltaFraction, "0.0:0.01:1.0"); Planner::declareParam<double>("dense_delta_fraction", this, &SPARS::setDenseDeltaFraction, &SPARS::getDenseDeltaFraction, "0.0:0.0001:0.1"); Planner::declareParam<unsigned int>("max_failures", this, &SPARS::setMaxFailures, &SPARS::getMaxFailures, "100:10:" "3000"); addPlannerProgressProperty("iterations INTEGER", [this] { return getIterationCount(); }); addPlannerProgressProperty("best cost REAL", [this] { return getBestCost(); }); }
ompl::geometric::LazyLBTRRT::LazyLBTRRT(const base::SpaceInformationPtr &si) : base::Planner(si, "LazyLBTRRT") { specs_.approximateSolutions = true; specs_.directed = true; Planner::declareParam<double>("range", this, &LazyLBTRRT::setRange, &LazyLBTRRT::getRange, "0.:1.:10000."); Planner::declareParam<double>("goal_bias", this, &LazyLBTRRT::setGoalBias, &LazyLBTRRT::getGoalBias, "0.:.05:1."); Planner::declareParam<double>("epsilon", this, &LazyLBTRRT::setApproximationFactor, &LazyLBTRRT::getApproximationFactor, "0.:.1:10."); addPlannerProgressProperty("iterations INTEGER", [this] { return getIterationCount(); }); addPlannerProgressProperty("best cost REAL", [this] { return getBestCost(); }); }
ompl::geometric::CForest::CForest(const base::SpaceInformationPtr &si) : base::Planner(si, "CForest") { specs_.optimizingPaths = true; specs_.multithreaded = true; numThreads_ = std::max(std::thread::hardware_concurrency(), 2u); Planner::declareParam<bool>("focus_search", this, &CForest::setFocusSearch, &CForest::getFocusSearch, "0,1"); Planner::declareParam<unsigned int>("num_threads", this, &CForest::setNumThreads, &CForest::getNumThreads, "0:64"); addPlannerProgressProperty("best cost REAL", [this] { return getBestCost(); }); addPlannerProgressProperty("shared paths INTEGER", [this] { return getNumPathsShared(); }); addPlannerProgressProperty("shared states INTEGER", [this] { return getNumStatesShared(); }); }