Class PlannerData
Defined in File PlannerData.h
Inheritance Relationships
Base Type
public ompl::base::PlannerData
(Class PlannerData)
Class Documentation
-
class PlannerData : public ompl::base::PlannerData
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.
This class assumes edges are derived from PlannerDataEdgeControl. If this is not the case, see base::PlannerData.
Note
The storage for states this class maintains belongs to the planner instance that filled the data (by default; see PlannerData::decoupleFromPlanner())
Public Functions
-
PlannerData(const SpaceInformationPtr &siC)
Constructor. Accepts a SpaceInformationPtr for the space planned in.
-
virtual ~PlannerData() override
Destructor.
-
virtual bool removeVertex(const base::PlannerDataVertex &st) override
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.
-
virtual bool removeVertex(unsigned int vIndex) override
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.
-
virtual bool removeEdge(unsigned int v1, unsigned int v2) override
Removes the edge between vertex indexes v1 and v2. Success is returned.
-
virtual bool removeEdge(const base::PlannerDataVertex &v1, const base::PlannerDataVertex &v2) override
Removes the edge between the vertices associated with the given vertex data. Success is returned.
-
virtual void clear() override
Clears the entire data structure.
-
virtual void decoupleFromPlanner() override
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.
Remark
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.
-
const SpaceInformationPtr &getSpaceInformation() const
Return the instance of SpaceInformation used in this PlannerData.
-
virtual bool hasControls() const override
Returns true if this PlannerData instance has controls associated with it.
Protected Attributes
-
SpaceInformationPtr siC_
The instance of control::SpaceInformation associated with this data.
-
std::set<Control*> decoupledControls_
A list of controls that are allocated during the decoupleFromPlanner method. These controls are freed by PlannerData in the destructor.
-
PlannerData(const SpaceInformationPtr &siC)