CForest.cpp
43 ompl::geometric::CForest::CForest(const base::SpaceInformationPtr &si) : base::Planner(si, "CForest")
49 Planner::declareParam<bool>("focus_search", this, &CForest::setFocusSearch, &CForest::getFocusSearch, "0,1");
50 Planner::declareParam<unsigned int>("num_threads", this, &CForest::setNumThreads, &CForest::getNumThreads, "0:64");
76 OMPL_WARN("%s cannot report intermediate solutions, not added as CForest planner.", planner->getName().c_str());
149 OMPL_INFORM("%s: No optimization objective specified. Defaulting to optimizing path length for the allowed "
159 OMPL_INFORM("%s: Number and type of instances not specified. Defaulting to %d instances of RRTstar.",
168 // This call is needed to make sure the ParamSet is up to date after changes induced by the planner setup calls
173 ompl::base::PlannerStatus ompl::geometric::CForest::solve(const base::PlannerTerminationCondition &ptc)
183 OMPL_WARN("Cannot use previously set intermediate solution callback with %s", getName().c_str());
186 [this](const base::Planner *planner, const std::vector<const base::State *> &states, const base::Cost cost) {
268 void ompl::geometric::CForest::solve(base::Planner *planner, const base::PlannerTerminationCondition &ptc)
unsigned int numGoalVertices() const
Returns the number of goal vertices.
Definition: PlannerData.cpp:328
bool getEdgeWeight(unsigned int v1, unsigned int v2, Cost *weight) const
Returns the weight of the edge between the given vertex indices. If there exists an edge between v1 a...
Definition: PlannerData.cpp:157
void getPlannerData(base::PlannerData &data) const override
Get information about the current run of the motion planner. Repeated calls to this function will upd...
Definition: CForest.cpp:89
virtual void setTag(int tag)
Set the integer tag associated with this vertex.
Definition: PlannerData.h:171
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:111
std::string getNumPathsShared() const
Get number of paths shared by the algorithm.
Definition: CForest.cpp:218
virtual void setup()
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
Definition: Planner.cpp:92
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique,...
Definition: PlannerData.h:238
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Definition: PlannerTerminationCondition.h:127
unsigned int numVertices() const
Retrieve the number of vertices in this structure.
Definition: PlannerData.cpp:202
unsigned int numStartVertices() const
Returns the number of start vertices.
Definition: PlannerData.cpp:323
const PlannerDataVertex & getStartVertex(unsigned int i) const
Retrieve a reference to the ith start vertex object. If i is greater than the number of start vertice...
Definition: PlannerData.cpp:359
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:112
bool markGoalState(const State *st)
Mark the given state as a goal vertex. If the given state does not exist in a vertex,...
Definition: PlannerData.cpp:597
std::string getNumStatesShared() const
Get number of states actually shared by the algorithm.
Definition: CForest.cpp:223
const PlannerDataVertex & getVertex(unsigned int index) const
Retrieve a reference to the vertex object with the given index. If this vertex does not exist,...
Definition: PlannerData.cpp:212
void clear() override
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Definition: CForest.cpp:124
virtual const State * getState() const
Retrieve the state associated with this vertex.
Definition: PlannerData.h:176
void setNumThreads(unsigned int numThreads=0)
Set default number of threads to use when no planner instances are specified by the user.
Definition: CForest.cpp:68
bool markStartState(const State *st)
Mark the given state as a start vertex. If the given state does not exist in a vertex,...
Definition: PlannerData.cpp:580
virtual void clear()
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Definition: Planner.cpp:118
void setup() override
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
Definition: CForest.cpp:142
const PlannerDataVertex & getGoalVertex(unsigned int i) const
Retrieve a reference to the ith goal vertex object. If i is greater than the number of goal vertices,...
Definition: PlannerData.cpp:375
virtual void getPlannerData(PlannerData &data) const
Get information about the current run of the motion planner. Repeated calls to this function will upd...
Definition: Planner.cpp:129
std::function< void(const Planner *, const std::vector< const base::State * > &, const Cost)> ReportIntermediateSolutionFn
When a planner has an intermediate solution (e.g., optimizing planners), a function with this signatu...
Definition: ProblemDefinition.h:209
unsigned int getIncomingEdges(unsigned int v, std::vector< unsigned int > &edgeList) const
Returns a list of vertices with outgoing edges to the vertex with index v. The number of edges connec...
Definition: PlannerData.cpp:131
virtual bool addEdge(unsigned int v1, unsigned int v2, const PlannerDataEdge &edge=PlannerDataEdge(), Cost weight=Cost(1.0))
Adds a directed edge between the given vertex indexes. An optional edge structure and weight can be s...
Definition: PlannerData.cpp:432
base::PlannerStatus solve(const base::PlannerTerminationCondition &ptc) override
Function that can solve the motion planning problem. This function can be called multiple times on th...
Definition: CForest.cpp:173
std::string toString(float val)
convert float to string using classic "C" locale semantics
Definition: String.cpp:82
Base class for a vertex in the PlannerData structure. All derived classes must implement the clone an...
Definition: PlannerData.h:122
duration seconds(double sec)
Return the time duration representing a given number of seconds.
Definition: Time.h:128
const PlannerDataEdge & getEdge(unsigned int v1, unsigned int v2) const
Retrieve a reference to the edge object connecting vertices with indexes v1 and v2....
Definition: PlannerData.cpp:230