Loading...
Searching...
No Matches
PlannerData.h
232 virtual bool addEdge(unsigned int v1, unsigned int v2, const PlannerDataEdge &edge = PlannerDataEdge(),
328 unsigned int getEdges(unsigned int v, std::map<unsigned int, const PlannerDataEdge *> &edgeMap) const;
375 void extractMinimumSpanningTree(unsigned int v, const OptimizationObjective &opt, PlannerData &mst) const;
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition Cost.h:48
Abstract definition of optimization objectives.
Definition OptimizationObjective.h:75
virtual PlannerDataEdge * clone() const
Return a clone of this object, allocated from the heap.
Definition PlannerData.h:132
bool operator!=(const PlannerDataEdge &rhs) const
Returns true if the edges do not point to the same memory. This is the complement of the == operator.
Definition PlannerData.h:145
virtual bool operator==(const PlannerDataEdge &rhs) const
Returns true if the edges point to the same memory.
Definition PlannerData.h:138
Base class for a vertex in the PlannerData structure. All derived classes must implement the clone an...
Definition PlannerData.h:59
bool operator!=(const PlannerDataVertex &rhs) const
Returns true if this vertex is not equal to the argument. This is the complement of the == operator.
Definition PlannerData.h:100
virtual int getTag() const
Returns the integer tag associated with this vertex.
Definition PlannerData.h:70
virtual void setTag(int tag)
Set the integer tag associated with this vertex.
Definition PlannerData.h:75
PlannerDataVertex(const State *st, int tag=0)
Constructor. Takes a state pointer and an optional integer tag.
Definition PlannerData.h:62
virtual PlannerDataVertex * clone() const
Return a clone of this object, allocated from the heap.
Definition PlannerData.h:86
PlannerDataVertex(const PlannerDataVertex &rhs)=default
Copy constructor.
virtual const State * getState() const
Retrieve the state associated with this vertex.
Definition PlannerData.h:80
int tag_
A generic integer tag for this state. Not used for equivalence checking.
Definition PlannerData.h:119
virtual bool operator==(const PlannerDataVertex &rhs) const
Equivalence operator. Return true if the state pointers are equal.
Definition PlannerData.h:92
Wrapper class for the Boost.Graph representation of the PlannerData. This class inherits from a boost...
Definition PlannerDataGraph.h:73
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
unsigned int vertexIndex(const PlannerDataVertex &v) const
Return the index for the vertex associated with the given data. INVALID_INDEX is returned if this ver...
Definition PlannerData.cpp:315
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 e...
Definition PlannerData.cpp:173
bool edgeExists(unsigned int v1, unsigned int v2) const
Check whether an edge between vertex index v1 and index v2 exists.
Definition PlannerData.cpp:188
bool isGoalVertex(unsigned int index) const
Returns true if the given vertex index is marked as a goal vertex.
Definition PlannerData.cpp:354
void printGraphviz(std::ostream &out=std::cout) const
Writes a Graphviz dot file of this structure to the given stream.
Definition PlannerData.cpp:260
std::map< const State *, unsigned int > stateIndexMap_
A mapping of states to vertex indexes. For fast lookup of vertex index.
Definition PlannerData.h:414
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....
Definition PlannerData.cpp:333
void computeEdgeWeights()
Computes all edge weights using state space distance (i.e. getSpaceInformation()->distance())
Definition PlannerData.cpp:630
const SpaceInformationPtr & getSpaceInformation() const
Return the instance of SpaceInformation used in this PlannerData.
Definition PlannerData.cpp:757
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,...
Definition PlannerData.cpp:569
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...
Definition PlannerData.cpp:413
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...
Definition PlannerData.cpp:422
unsigned int numEdges() const
Retrieve the number of edges in this structure.
Definition PlannerData.cpp:207
StateStoragePtr extractStateStorage() const
Extract a ompl::base::GraphStateStorage object from this PlannerData. Memory for states is copied (th...
Definition PlannerData.cpp:716
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
static const PlannerDataVertex NO_VERTEX
Representation for a non-existant vertex.
Definition PlannerData.h:182
std::vector< unsigned int > startVertexIndices_
A mutable listing of the vertices marked as start states. Stored in sorted order.
Definition PlannerData.h:416
static const PlannerDataEdge NO_EDGE
Representation for a non-existant edge.
Definition PlannerData.h:180
virtual bool removeVertex(const PlannerDataVertex &st)
Removes the vertex associated with the given data. If the vertex does not exist, false is returned....
Definition PlannerData.cpp:473
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
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
unsigned int numVertices() const
Retrieve the number of vertices in this structure.
Definition PlannerData.cpp:202
std::set< State * > decoupledStates_
A list of states that are allocated during the decoupleFromPlanner method. These states are freed by ...
Definition PlannerData.h:424
Graph & toBoostGraph()
Extract a Boost.Graph object from this PlannerData.
Definition PlannerData.cpp:744
virtual bool removeEdge(unsigned int v1, unsigned int v2)
Removes the edge between vertex indexes v1 and v2. Success is returned.
Definition PlannerData.cpp:540
unsigned int numStartVertices() const
Returns the number of start vertices.
Definition PlannerData.cpp:323
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)....
Definition PlannerData.cpp:104
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 spannin...
Definition PlannerData.cpp:638
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
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.
Definition PlannerData.cpp:789
static const unsigned int INVALID_INDEX
Representation of an invalid vertex index.
Definition PlannerData.h:184
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
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 v...
Definition PlannerData.cpp:341
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
std::vector< unsigned int > goalVertexIndices_
A mutable listing of the vertices marked as goal states. Stored in sorted order.
Definition PlannerData.h:418
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
virtual bool hasControls() const
Indicate whether any information about controls (ompl::control::Control) is stored in this instance.
Definition PlannerData.cpp:784
void extractReachable(unsigned int v, PlannerData &data) const
Extracts the subset of PlannerData reachable from the vertex with index v. For tree structures,...
Definition PlannerData.cpp:685
unsigned int addVertex(const PlannerDataVertex &st)
Adds the given vertex to the graph data. The vertex index is returned. Duplicates are not added....
Definition PlannerData.cpp:391
std::map< std::string, std::string > properties
Any extra properties (key-value pairs) the planner can set.
Definition PlannerData.h:410
bool vertexExists(const PlannerDataVertex &v) const
Check whether a vertex exists with the given vertex data.
Definition PlannerData.cpp:197
unsigned int numGoalVertices() const
Returns the number of goal vertices.
Definition PlannerData.cpp:328
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
void printGraphML(std::ostream &out=std::cout) const
Writes a GraphML file of this structure to the given stream.
Definition PlannerData.cpp:284
bool isStartVertex(unsigned int index) const
Returns true if the given vertex index is marked as a start vertex.
Definition PlannerData.cpp:349
virtual void decoupleFromPlanner()
Creates a deep copy of the states contained in the vertices of this PlannerData structure so that whe...
Definition PlannerData.cpp:80
A shared pointer wrapper for ompl::base::SpaceInformation.
This namespace contains sampling based planning routines shared by both planning under geometric cons...
Definition ConstrainedSpaceInformation.h:55
Main namespace. Contains everything in this library.
Definition MultiLevelPlanarManipulatorDemo.cpp:66