PlannerDataStorage.h
171 virtual void loadVertices(PlannerData &pd, unsigned int numVertices, boost::archive::binary_iarchive &ia)
242 virtual void loadEdges(PlannerData &pd, unsigned int numEdges, boost::archive::binary_iarchive &ia)
248 pd.addEdge(edgeData.endpoints_.first, edgeData.endpoints_.second, *edgeData.e_, Cost(edgeData.weight_));
Object that handles loading/storing a PlannerData object to/from a binary stream. Serialization of ve...
Definition: PlannerDataStorage.h:79
The object containing all edge data that will be stored.
Definition: PlannerDataStorage.h:155
virtual void decoupleFromPlanner()
Creates a deep copy of the states contained in the vertices of this PlannerData structure so that whe...
Definition: PlannerData.cpp:84
A boost shared pointer wrapper for ompl::base::StateSpace.
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:434
virtual void storeEdges(const PlannerData &pd, boost::archive::binary_oarchive &oa)
Serialize and store all edges in pd to the binary archive.
Definition: PlannerDataStorage.h:257
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:404
Definition: PlannerData.py:1
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:158
virtual void load(const char *filename, PlannerData &pd)
Load the PlannerData structure from the given stream. The StateSpace that was used to store the data ...
Definition: PlannerDataStorage.cpp:91
Base class for a vertex in the PlannerData structure. All derived classes must implement the clone an...
Definition: PlannerData.h:60
bool isGoalVertex(unsigned int index) const
Returns true if the given vertex index is marked as a goal vertex.
Definition: PlannerData.cpp:367
void serialize(Archive &ar, const unsigned int)
boost::serialization routine
Definition: PlannerDataStorage.h:122
virtual void loadVertices(PlannerData &pd, unsigned int numVertices, boost::archive::binary_iarchive &ia)
Read numVertices from the binary input ia and store them as PlannerData.
Definition: PlannerDataStorage.h:171
unsigned int numVertices() const
Retrieve the number of vertices in this structure.
Definition: PlannerData.cpp:203
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:444
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:213
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:425
Information stored at the beginning of the PlannerData archive.
Definition: PlannerDataStorage.h:106
bool edgeExists(unsigned int v1, unsigned int v2) const
Check whether an edge between vertex index v1 and index v2 exists.
Definition: PlannerData.cpp:189
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.
Definition: PlannerData.cpp:231
virtual void storeVertices(const PlannerData &pd, boost::archive::binary_oarchive &oa)
Serialize and store all vertices in pd to the binary archive.
Definition: PlannerDataStorage.h:214
std::size_t vertex_count
Number of vertices stored in the archive.
Definition: PlannerDataStorage.h:112
bool isStartVertex(unsigned int index) const
Returns true if the given vertex index is marked as a start vertex.
Definition: PlannerData.cpp:362
The object containing all vertex data that will be stored.
Definition: PlannerDataStorage.h:132
boost::uint32_t marker
OMPL PlannerData specific marker (fixed value)
Definition: PlannerDataStorage.h:109
const SpaceInformationPtr & getSpaceInformation() const
Return the instance of SpaceInformation used in this PlannerData.
Definition: PlannerData.cpp:773
std::vector< int > signature
Signature of state space that allocated the saved states in the vertices (see ompl::base::StateSpace:...
Definition: PlannerDataStorage.h:118
virtual void loadEdges(PlannerData &pd, unsigned int numEdges, boost::archive::binary_iarchive &ia)
Read numEdges from the binary input ia and store them as PlannerData.
Definition: PlannerDataStorage.h:242
virtual const State * getState() const
Retrieve the state associated with this vertex.
Definition: PlannerData.h:74
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:47
virtual void store(const PlannerData &pd, const char *filename)
Store (serialize) the PlannerData structure to the given filename.
Definition: PlannerDataStorage.cpp:50