Object containing planner generated vertex and edge data. It is assumed that all vertices are unique, and only a single directed edge connects two vertices. More...
#include <ompl/base/PlannerData.h>

Classes | |
class | Graph |
Wrapper class for the Boost.Graph representation of the PlannerData. This class inherits from a boost::adjacency_list Graph structure. More... | |
Public Member Functions | |
PlannerData (const PlannerData &)=delete | |
PlannerData & | operator= (const PlannerData &)=delete |
PlannerData (SpaceInformationPtr si) | |
Constructor. Accepts a SpaceInformationPtr for the space planned in. More... | |
virtual | ~PlannerData () |
Destructor. More... | |
const SpaceInformationPtr & | getSpaceInformation () const |
Return the instance of SpaceInformation used in this PlannerData. More... | |
virtual bool | hasControls () const |
Indicate whether any information about controls (ompl::control::Control) is stored in this instance. More... | |
PlannerData construction | |
unsigned int | addVertex (const PlannerDataVertex &st) |
Adds the given vertex to the graph data. The vertex index is returned. Duplicates are not added. If a vertex is duplicated, the index of the existing vertex is returned instead. Indexes are volatile and may change after adding/removing a subsequent vertex. More... | |
unsigned int | addStartVertex (const PlannerDataVertex &v) |
Adds the given vertex to the graph data, and marks it as a start vertex. The vertex index is returned. Duplicates are not added. If a vertex is duplicated, the index of the existing vertex is returned instead. Indexes are volatile and may change after adding/removing a subsequent vertex. More... | |
unsigned int | addGoalVertex (const PlannerDataVertex &v) |
Adds the given vertex to the graph data, and marks it as a start vertex. The vertex index is returned. Duplicates are not added. If a vertex is duplicated, the index of the existing vertex is returned instead. Indexes are volatile and may change after adding/removing a subsequent vertex. More... | |
bool | markStartState (const State *st) |
Mark the given state as a start vertex. If the given state does not exist in a vertex, false is returned. More... | |
bool | markGoalState (const State *st) |
Mark the given state as a goal vertex. If the given state does not exist in a vertex, false is returned. More... | |
bool | tagState (const State *st, int tag) |
Set the integer tag associated with the given state. If the given state does not exist in a vertex, false is returned. More... | |
virtual bool | removeVertex (const PlannerDataVertex &st) |
Removes the vertex associated with the given data. If the vertex does not exist, false is returned. This method has O(n) complexity in the number of vertices. More... | |
virtual bool | removeVertex (unsigned int vIndex) |
Removes the vertex with the given index. If the index is out of range, false is returned. This method has O(n) complexity in the number of vertices. More... | |
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 supplied. Success is returned. More... | |
virtual bool | addEdge (const PlannerDataVertex &v1, const PlannerDataVertex &v2, const PlannerDataEdge &edge=PlannerDataEdge(), Cost weight=Cost(1.0)) |
Adds a directed edge between the given vertex indexes. The vertices are added to the data if they are not already in the structure. An optional edge structure and weight can also be supplied. Success is returned. More... | |
virtual bool | removeEdge (unsigned int v1, unsigned int v2) |
Removes the edge between vertex indexes v1 and v2. Success is returned. More... | |
virtual bool | removeEdge (const PlannerDataVertex &v1, const PlannerDataVertex &v2) |
Removes the edge between the vertices associated with the given vertex data. Success is returned. More... | |
virtual void | clear () |
Clears the entire data structure. More... | |
virtual void | decoupleFromPlanner () |
Creates a deep copy of the states contained in the vertices of this PlannerData structure so that when the planner that created this instance goes out of scope, all data remains intact. More... | |
PlannerData Properties | |
unsigned int | numEdges () const |
Retrieve the number of edges in this structure. More... | |
unsigned int | numVertices () const |
Retrieve the number of vertices in this structure. More... | |
unsigned int | numStartVertices () const |
Returns the number of start vertices. More... | |
unsigned int | numGoalVertices () const |
Returns the number of goal vertices. More... | |
PlannerData vertex lookup | |
bool | vertexExists (const PlannerDataVertex &v) const |
Check whether a vertex exists with the given vertex data. More... | |
const PlannerDataVertex & | getVertex (unsigned int index) const |
Retrieve a reference to the vertex object with the given index. If this vertex does not exist, NO_VERTEX is returned. More... | |
PlannerDataVertex & | getVertex (unsigned int index) |
Retrieve a reference to the vertex object with the given index. If this vertex does not exist, NO_VERTEX is returned. More... | |
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 vertices, NO_VERTEX is returned. More... | |
PlannerDataVertex & | getStartVertex (unsigned int i) |
Retrieve a reference to the ith start vertex object. If i is greater than the number of start vertices, NO_VERTEX is returned. More... | |
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, NO_VERTEX is returned. More... | |
PlannerDataVertex & | getGoalVertex (unsigned int i) |
Retrieve a reference to the ith goal vertex object. If i is greater than the number of goal vertices, NO_VERTEX is returned. More... | |
unsigned int | getStartIndex (unsigned int i) const |
Returns the index of the ith start state. INVALID_INDEX is returned if i is out of range. Indexes are volatile and may change after adding/removing a vertex. More... | |
unsigned int | getGoalIndex (unsigned int i) const |
Returns the index of the ith goal state. INVALID_INDEX is returned if i is out of range Indexes are volatile and may change after adding/removing a vertex. More... | |
bool | isStartVertex (unsigned int index) const |
Returns true if the given vertex index is marked as a start vertex. More... | |
bool | isGoalVertex (unsigned int index) const |
Returns true if the given vertex index is marked as a goal vertex. More... | |
unsigned int | vertexIndex (const PlannerDataVertex &v) const |
Return the index for the vertex associated with the given data. INVALID_INDEX is returned if this vertex does not exist. Indexes are volatile and may change after adding/removing a vertex. More... | |
PlannerData edge lookup | |
bool | edgeExists (unsigned int v1, unsigned int v2) const |
Check whether an edge between vertex index v1 and index v2 exists. More... | |
const PlannerDataEdge & | getEdge (unsigned int v1, unsigned int v2) const |
Retrieve a reference to the edge object connecting vertices with indexes v1 and v2. If this edge does not exist, NO_EDGE is returned. More... | |
PlannerDataEdge & | getEdge (unsigned int v1, unsigned int v2) |
Retrieve a reference to the edge object connecting vertices with indexes v1 and v2. If this edge does not exist, NO_EDGE is returned. More... | |
unsigned int | getEdges (unsigned int v, std::vector< unsigned int > &edgeList) const |
Returns a list of the vertex indexes directly connected to vertex with index v (outgoing edges). The number of outgoing edges from v is returned. More... | |
unsigned int | getEdges (unsigned int v, std::map< unsigned int, const PlannerDataEdge * > &edgeMap) const |
Returns a map of outgoing edges from vertex with index v. Key = vertex index, value = edge structure. The number of outgoing edges from v is returned. More... | |
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 connecting to v is returned. More... | |
unsigned int | getIncomingEdges (unsigned int v, std::map< unsigned int, const PlannerDataEdge * > &edgeMap) const |
Returns a map of incoming edges to the vertex with index v (i.e. if there is an edge from w to v, w and the edge structure will be in the map.) Key = vertex index, value = edge structure. The number of incoming edges to v is returned. More... | |
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 and \v2, the edge weight is placed in the out-variable weight. Otherwise, this function returns false. More... | |
bool | setEdgeWeight (unsigned int v1, unsigned int v2, Cost weight) |
Sets the weight of the edge between the given vertex indices. If an edge between v1 and v2 does not exist, this function returns false. More... | |
void | computeEdgeWeights (const OptimizationObjective &opt) |
Computes the weight for all edges given the OptimizationObjective opt. More... | |
void | computeEdgeWeights () |
Computes all edge weights using state space distance (i.e. getSpaceInformation()->distance()) More... | |
Output methods | |
void | printGraphviz (std::ostream &out=std::cout) const |
Writes a Graphviz dot file of this structure to the given stream. More... | |
void | printGraphML (std::ostream &out=std::cout) const |
Writes a GraphML file of this structure to the given stream. More... | |
void | printPLY (std::ostream &out, bool asIs=false) const |
Write a mesh of the planner graph to a stream. Insert additional vertices if asIs == true. More... | |
Advanced graph extraction | |
void | extractMinimumSpanningTree (unsigned int v, const OptimizationObjective &opt, PlannerData &mst) const |
Extracts the minimum spanning tree of the data rooted at the vertex with index v. The minimum spanning tree is saved into mst. O(|E| log |V|) complexity. More... | |
void | extractReachable (unsigned int v, PlannerData &data) const |
Extracts the subset of PlannerData reachable from the vertex with index v. For tree structures, this will be the sub-tree rooted at v. The reachable set is saved into data. More... | |
StateStoragePtr | extractStateStorage () const |
Extract a ompl::base::GraphStateStorage object from this PlannerData. Memory for states is copied (the resulting ompl::base::StateStorage is independent from this PlannerData) More... | |
Graph & | toBoostGraph () |
Extract a Boost.Graph object from this PlannerData. More... | |
const Graph & | toBoostGraph () const |
Extract a Boost.Graph object from this PlannerData. More... | |
Public Attributes | |
std::map< std::string, std::string > | properties |
Any extra properties (key-value pairs) the planner can set. More... | |
Static Public Attributes | |
static const PlannerDataEdge | NO_EDGE = ompl::base::PlannerDataEdge() |
Representation for a non-existant edge. More... | |
static const PlannerDataVertex | NO_VERTEX = ompl::base::PlannerDataVertex(nullptr) |
Representation for a non-existant vertex. More... | |
static const unsigned int | INVALID_INDEX = std::numeric_limits<unsigned int>::max() |
Representation of an invalid vertex index. More... | |
Protected Attributes | |
std::map< const State *, unsigned int > | stateIndexMap_ |
A mapping of states to vertex indexes. For fast lookup of vertex index. More... | |
std::vector< unsigned int > | startVertexIndices_ |
A mutable listing of the vertices marked as start states. Stored in sorted order. More... | |
std::vector< unsigned int > | goalVertexIndices_ |
A mutable listing of the vertices marked as goal states. Stored in sorted order. More... | |
SpaceInformationPtr | si_ |
The space information instance for this data. More... | |
std::set< State * > | decoupledStates_ |
A list of states that are allocated during the decoupleFromPlanner method. These states are freed by PlannerData in the destructor. More... | |
Detailed Description
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique, and only a single directed edge connects two vertices.
- Note
- The storage for states this class maintains belongs to the planner instance that filled the data (by default; see PlannerData::decoupleFromPlanner())
Definition at line 174 of file PlannerData.h.
Constructor & Destructor Documentation
◆ PlannerData()
ompl::base::PlannerData::PlannerData | ( | SpaceInformationPtr | si | ) |
Constructor. Accepts a SpaceInformationPtr for the space planned in.
Definition at line 58 of file PlannerData.cpp.
◆ ~PlannerData()
|
virtual |
Destructor.
Reimplemented in ompl::control::PlannerData.
Definition at line 63 of file PlannerData.cpp.
Member Function Documentation
◆ addEdge() [1/2]
|
virtual |
Adds a directed edge between the given vertex indexes. The vertices are added to the data if they are not already in the structure. An optional edge structure and weight can also be supplied. Success is returned.
Definition at line 456 of file PlannerData.cpp.
◆ addEdge() [2/2]
|
virtual |
Adds a directed edge between the given vertex indexes. An optional edge structure and weight can be supplied. Success is returned.
Definition at line 432 of file PlannerData.cpp.
◆ addGoalVertex()
unsigned int ompl::base::PlannerData::addGoalVertex | ( | const PlannerDataVertex & | v | ) |
Adds the given vertex to the graph data, and marks it as a start vertex. The vertex index is returned. Duplicates are not added. If a vertex is duplicated, the index of the existing vertex is returned instead. Indexes are volatile and may change after adding/removing a subsequent vertex.
Definition at line 422 of file PlannerData.cpp.
◆ addStartVertex()
unsigned int ompl::base::PlannerData::addStartVertex | ( | const PlannerDataVertex & | v | ) |
Adds the given vertex to the graph data, and marks it as a start vertex. The vertex index is returned. Duplicates are not added. If a vertex is duplicated, the index of the existing vertex is returned instead. Indexes are volatile and may change after adding/removing a subsequent vertex.
Definition at line 413 of file PlannerData.cpp.
◆ addVertex()
unsigned int ompl::base::PlannerData::addVertex | ( | const PlannerDataVertex & | st | ) |
Adds the given vertex to the graph data. The vertex index is returned. Duplicates are not added. If a vertex is duplicated, the index of the existing vertex is returned instead. Indexes are volatile and may change after adding/removing a subsequent vertex.
Definition at line 391 of file PlannerData.cpp.
◆ clear()
|
virtual |
Clears the entire data structure.
Reimplemented in ompl::control::PlannerData.
Definition at line 74 of file PlannerData.cpp.
◆ computeEdgeWeights() [1/2]
void ompl::base::PlannerData::computeEdgeWeights | ( | ) |
Computes all edge weights using state space distance (i.e. getSpaceInformation()->distance())
Definition at line 630 of file PlannerData.cpp.
◆ computeEdgeWeights() [2/2]
void ompl::base::PlannerData::computeEdgeWeights | ( | const OptimizationObjective & | opt | ) |
Computes the weight for all edges given the OptimizationObjective opt.
Definition at line 614 of file PlannerData.cpp.
◆ decoupleFromPlanner()
|
virtual |
Creates a deep copy of the states contained in the vertices of this PlannerData structure so that when the planner that created this instance goes out of scope, all data remains intact.
- Remarks
- Shallow state pointers inside of the PlannerDataVertex objects already in this PlannerData will be replaced with clones which are scoped to this PlannerData object. A subsequent call to this method is necessary after any other vertices are added to ensure that this PlannerData instance is fully decoupled.
Reimplemented in ompl::control::PlannerData.
Definition at line 80 of file PlannerData.cpp.
◆ edgeExists()
bool ompl::base::PlannerData::edgeExists | ( | unsigned int | v1, |
unsigned int | v2 | ||
) | const |
Check whether an edge between vertex index v1 and index v2 exists.
Definition at line 188 of file PlannerData.cpp.
◆ extractMinimumSpanningTree()
void ompl::base::PlannerData::extractMinimumSpanningTree | ( | unsigned int | v, |
const OptimizationObjective & | opt, | ||
base::PlannerData & | mst | ||
) | const |
Extracts the minimum spanning tree of the data rooted at the vertex with index v. The minimum spanning tree is saved into mst. O(|E| log |V|) complexity.
Definition at line 638 of file PlannerData.cpp.
◆ extractReachable()
void ompl::base::PlannerData::extractReachable | ( | unsigned int | v, |
base::PlannerData & | data | ||
) | const |
Extracts the subset of PlannerData reachable from the vertex with index v. For tree structures, this will be the sub-tree rooted at v. The reachable set is saved into data.
Definition at line 685 of file PlannerData.cpp.
◆ extractStateStorage()
ompl::base::StateStoragePtr ompl::base::PlannerData::extractStateStorage | ( | ) | const |
Extract a ompl::base::GraphStateStorage object from this PlannerData. Memory for states is copied (the resulting ompl::base::StateStorage is independent from this PlannerData)
Definition at line 716 of file PlannerData.cpp.
◆ getEdge() [1/2]
ompl::base::PlannerDataEdge & ompl::base::PlannerData::getEdge | ( | unsigned int | v1, |
unsigned int | v2 | ||
) |
Retrieve a reference to the edge object connecting vertices with indexes v1 and v2. If this edge does not exist, NO_EDGE is returned.
Definition at line 245 of file PlannerData.cpp.
◆ getEdge() [2/2]
const ompl::base::PlannerDataEdge & ompl::base::PlannerData::getEdge | ( | unsigned int | v1, |
unsigned int | v2 | ||
) | const |
Retrieve a reference to the edge object connecting vertices with indexes v1 and v2. If this edge does not exist, NO_EDGE is returned.
Definition at line 230 of file PlannerData.cpp.
◆ getEdges() [1/2]
unsigned int ompl::base::PlannerData::getEdges | ( | unsigned int | v, |
std::map< unsigned int, const PlannerDataEdge * > & | edgeMap | ||
) | const |
Returns a map of outgoing edges from vertex with index v. Key = vertex index, value = edge structure. The number of outgoing edges from v is returned.
Definition at line 117 of file PlannerData.cpp.
◆ getEdges() [2/2]
unsigned int ompl::base::PlannerData::getEdges | ( | unsigned int | v, |
std::vector< unsigned int > & | edgeList | ||
) | const |
Returns a list of the vertex indexes directly connected to vertex with index v (outgoing edges). The number of outgoing edges from v is returned.
Definition at line 104 of file PlannerData.cpp.
◆ getEdgeWeight()
bool ompl::base::PlannerData::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 and \v2, the edge weight is placed in the out-variable weight. Otherwise, this function returns false.
Definition at line 157 of file PlannerData.cpp.
◆ getGoalIndex()
unsigned int ompl::base::PlannerData::getGoalIndex | ( | unsigned int | i | ) | const |
Returns the index of the ith goal state. INVALID_INDEX is returned if i is out of range Indexes are volatile and may change after adding/removing a vertex.
Definition at line 341 of file PlannerData.cpp.
◆ getGoalVertex() [1/2]
ompl::base::PlannerDataVertex & ompl::base::PlannerData::getGoalVertex | ( | unsigned int | i | ) |
Retrieve a reference to the ith goal vertex object. If i is greater than the number of goal vertices, NO_VERTEX is returned.
Definition at line 383 of file PlannerData.cpp.
◆ getGoalVertex() [2/2]
const ompl::base::PlannerDataVertex & ompl::base::PlannerData::getGoalVertex | ( | unsigned int | i | ) | const |
Retrieve a reference to the ith goal vertex object. If i is greater than the number of goal vertices, NO_VERTEX is returned.
Definition at line 375 of file PlannerData.cpp.
◆ getIncomingEdges() [1/2]
unsigned int ompl::base::PlannerData::getIncomingEdges | ( | unsigned int | v, |
std::map< unsigned int, const PlannerDataEdge * > & | edgeMap | ||
) | const |
Returns a map of incoming edges to the vertex with index v (i.e. if there is an edge from w to v, w and the edge structure will be in the map.) Key = vertex index, value = edge structure. The number of incoming edges to v is returned.
Definition at line 143 of file PlannerData.cpp.
◆ getIncomingEdges() [2/2]
unsigned int ompl::base::PlannerData::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 connecting to v is returned.
Definition at line 131 of file PlannerData.cpp.
◆ getSpaceInformation()
const ompl::base::SpaceInformationPtr & ompl::base::PlannerData::getSpaceInformation | ( | ) | const |
Return the instance of SpaceInformation used in this PlannerData.
Definition at line 757 of file PlannerData.cpp.
◆ getStartIndex()
unsigned int ompl::base::PlannerData::getStartIndex | ( | unsigned int | i | ) | const |
Returns the index of the ith start state. INVALID_INDEX is returned if i is out of range. Indexes are volatile and may change after adding/removing a vertex.
Definition at line 333 of file PlannerData.cpp.
◆ getStartVertex() [1/2]
ompl::base::PlannerDataVertex & ompl::base::PlannerData::getStartVertex | ( | unsigned int | i | ) |
Retrieve a reference to the ith start vertex object. If i is greater than the number of start vertices, NO_VERTEX is returned.
Definition at line 367 of file PlannerData.cpp.
◆ getStartVertex() [2/2]
const ompl::base::PlannerDataVertex & ompl::base::PlannerData::getStartVertex | ( | unsigned int | i | ) | const |
Retrieve a reference to the ith start vertex object. If i is greater than the number of start vertices, NO_VERTEX is returned.
Definition at line 359 of file PlannerData.cpp.
◆ getVertex() [1/2]
ompl::base::PlannerDataVertex & ompl::base::PlannerData::getVertex | ( | unsigned int | index | ) |
Retrieve a reference to the vertex object with the given index. If this vertex does not exist, NO_VERTEX is returned.
Definition at line 221 of file PlannerData.cpp.
◆ getVertex() [2/2]
const ompl::base::PlannerDataVertex & ompl::base::PlannerData::getVertex | ( | unsigned int | index | ) | const |
Retrieve a reference to the vertex object with the given index. If this vertex does not exist, NO_VERTEX is returned.
Definition at line 212 of file PlannerData.cpp.
◆ hasControls()
|
virtual |
Indicate whether any information about controls (ompl::control::Control) is stored in this instance.
Reimplemented in ompl::control::PlannerData.
Definition at line 784 of file PlannerData.cpp.
◆ isGoalVertex()
bool ompl::base::PlannerData::isGoalVertex | ( | unsigned int | index | ) | const |
Returns true if the given vertex index is marked as a goal vertex.
Definition at line 354 of file PlannerData.cpp.
◆ isStartVertex()
bool ompl::base::PlannerData::isStartVertex | ( | unsigned int | index | ) | const |
Returns true if the given vertex index is marked as a start vertex.
Definition at line 349 of file PlannerData.cpp.
◆ markGoalState()
bool ompl::base::PlannerData::markGoalState | ( | const State * | st | ) |
Mark the given state as a goal vertex. If the given state does not exist in a vertex, false is returned.
Definition at line 597 of file PlannerData.cpp.
◆ markStartState()
bool ompl::base::PlannerData::markStartState | ( | const State * | st | ) |
Mark the given state as a start vertex. If the given state does not exist in a vertex, false is returned.
Definition at line 580 of file PlannerData.cpp.
◆ numEdges()
unsigned int ompl::base::PlannerData::numEdges | ( | ) | const |
Retrieve the number of edges in this structure.
Definition at line 207 of file PlannerData.cpp.
◆ numGoalVertices()
unsigned int ompl::base::PlannerData::numGoalVertices | ( | ) | const |
Returns the number of goal vertices.
Definition at line 328 of file PlannerData.cpp.
◆ numStartVertices()
unsigned int ompl::base::PlannerData::numStartVertices | ( | ) | const |
Returns the number of start vertices.
Definition at line 323 of file PlannerData.cpp.
◆ numVertices()
unsigned int ompl::base::PlannerData::numVertices | ( | ) | const |
Retrieve the number of vertices in this structure.
Definition at line 202 of file PlannerData.cpp.
◆ printGraphML()
void ompl::base::PlannerData::printGraphML | ( | std::ostream & | out = std::cout | ) | const |
Writes a GraphML file of this structure to the given stream.
Definition at line 284 of file PlannerData.cpp.
◆ printGraphviz()
void ompl::base::PlannerData::printGraphviz | ( | std::ostream & | out = std::cout | ) | const |
Writes a Graphviz dot file of this structure to the given stream.
Definition at line 260 of file PlannerData.cpp.
◆ printPLY()
void ompl::base::PlannerData::printPLY | ( | std::ostream & | out, |
bool | asIs = false |
||
) | const |
Write a mesh of the planner graph to a stream. Insert additional vertices if asIs == true.
Definition at line 789 of file PlannerData.cpp.
◆ removeEdge() [1/2]
|
virtual |
Removes the edge between the vertices associated with the given vertex data. Success is returned.
Reimplemented in ompl::control::PlannerData.
Definition at line 557 of file PlannerData.cpp.
◆ removeEdge() [2/2]
|
virtual |
Removes the edge between vertex indexes v1 and v2. Success is returned.
Reimplemented in ompl::control::PlannerData.
Definition at line 540 of file PlannerData.cpp.
◆ removeVertex() [1/2]
|
virtual |
Removes the vertex associated with the given data. If the vertex does not exist, false is returned. This method has O(n) complexity in the number of vertices.
Reimplemented in ompl::control::PlannerData.
Definition at line 473 of file PlannerData.cpp.
◆ removeVertex() [2/2]
|
virtual |
Removes the vertex with the given index. If the index is out of range, false is returned. This method has O(n) complexity in the number of vertices.
Reimplemented in ompl::control::PlannerData.
Definition at line 481 of file PlannerData.cpp.
◆ setEdgeWeight()
bool ompl::base::PlannerData::setEdgeWeight | ( | unsigned int | v1, |
unsigned int | v2, | ||
Cost | weight | ||
) |
Sets the weight of the edge between the given vertex indices. If an edge between v1 and v2 does not exist, this function returns false.
Definition at line 173 of file PlannerData.cpp.
◆ tagState()
bool ompl::base::PlannerData::tagState | ( | const State * | st, |
int | tag | ||
) |
Set the integer tag associated with the given state. If the given state does not exist in a vertex, false is returned.
Definition at line 569 of file PlannerData.cpp.
◆ toBoostGraph() [1/2]
ompl::base::PlannerData::Graph & ompl::base::PlannerData::toBoostGraph | ( | ) |
Extract a Boost.Graph object from this PlannerData.
- Remarks
- Use of this method requires inclusion of PlannerDataGraph.h The object returned can be used safely for all read-only purposes in Boost. Adding or removing vertices and edges should be performed by using the respective method in PlannerData to ensure proper memory management. Manipulating the graph directly will result in undefined behavior with this class.
Definition at line 744 of file PlannerData.cpp.
◆ toBoostGraph() [2/2]
const ompl::base::PlannerData::Graph & ompl::base::PlannerData::toBoostGraph | ( | ) | const |
Extract a Boost.Graph object from this PlannerData.
- Remarks
- Use of this method requires inclusion of PlannerDataGraph.h The object returned can be used safely for all read-only purposes in Boost. Adding or removing vertices and edges should be performed by using the respective method in PlannerData to ensure proper memory management. Manipulating the graph directly will result in undefined behavior with this class.
Definition at line 750 of file PlannerData.cpp.
◆ vertexExists()
bool ompl::base::PlannerData::vertexExists | ( | const PlannerDataVertex & | v | ) | const |
Check whether a vertex exists with the given vertex data.
Definition at line 197 of file PlannerData.cpp.
◆ vertexIndex()
unsigned int ompl::base::PlannerData::vertexIndex | ( | const PlannerDataVertex & | v | ) | const |
Return the index for the vertex associated with the given data. INVALID_INDEX is returned if this vertex does not exist. Indexes are volatile and may change after adding/removing a vertex.
Definition at line 315 of file PlannerData.cpp.
Member Data Documentation
◆ decoupledStates_
|
protected |
A list of states that are allocated during the decoupleFromPlanner method. These states are freed by PlannerData in the destructor.
Definition at line 424 of file PlannerData.h.
◆ goalVertexIndices_
|
protected |
A mutable listing of the vertices marked as goal states. Stored in sorted order.
Definition at line 418 of file PlannerData.h.
◆ INVALID_INDEX
|
static |
Representation of an invalid vertex index.
Definition at line 184 of file PlannerData.h.
◆ NO_EDGE
|
static |
Representation for a non-existant edge.
Definition at line 180 of file PlannerData.h.
◆ NO_VERTEX
|
static |
Representation for a non-existant vertex.
Definition at line 182 of file PlannerData.h.
◆ properties
std::map<std::string, std::string> ompl::base::PlannerData::properties |
Any extra properties (key-value pairs) the planner can set.
Definition at line 410 of file PlannerData.h.
◆ si_
|
protected |
The space information instance for this data.
Definition at line 421 of file PlannerData.h.
◆ startVertexIndices_
|
protected |
A mutable listing of the vertices marked as start states. Stored in sorted order.
Definition at line 416 of file PlannerData.h.
◆ stateIndexMap_
|
protected |
A mapping of states to vertex indexes. For fast lookup of vertex index.
Definition at line 414 of file PlannerData.h.
The documentation for this class was generated from the following files:
- ompl/base/PlannerData.h
- ompl/base/src/PlannerData.cpp