Class TriangularDecomposition
Defined in File TriangularDecomposition.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public ompl::control::Decomposition
(Class Decomposition)
Class Documentation
-
class TriangularDecomposition : public ompl::control::Decomposition
A TriangularDecomposition is a triangulation that ignores obstacles.
Public Functions
-
TriangularDecomposition(const base::RealVectorBounds &bounds, std::vector<Polygon> holes = std::vector<Polygon>(), std::vector<Polygon> intRegs = std::vector<Polygon>())
Creates a TriangularDecomposition over the given bounds, which must be 2-dimensional. The underlying mesh will be a conforming Delaunay triangulation. The triangulation will ignore any obstacles, given as a list of polygons. The triangulation will respect the boundaries of any regions of interest, given as a list of polygons. No two obstacles may overlap, and no two regions of interest may overlap.
-
~TriangularDecomposition() override
-
inline virtual int getNumRegions() const override
Returns the number of regions in this Decomposition.
-
virtual double getRegionVolume(int triID) override
Returns the volume of a given region in this Decomposition.
-
virtual void getNeighbors(int triID, std::vector<int> &neighbors) const override
Stores a given region’s neighbors into a given vector.
-
virtual int locateRegion(const base::State *s) const override
Returns the index of the region containing a given State. Most often, this is obtained by first calling project(). Returns -1 if no region contains the State.
-
virtual void sampleFromRegion(int triID, RNG &rng, std::vector<double> &coord) const override
Samples a projected coordinate from a given region.
-
void setup()
-
int getNumHoles() const
-
int getNumRegionsOfInterest() const
-
int getRegionOfInterestAt(int triID) const
Returns the region of interest that contains the given triangle ID. Returns -1 if the triangle ID is not within a region of interest.
-
void print(std::ostream &out) const
Protected Functions
-
virtual int createTriangles()
Helper method to triangulate the space and return the number of triangles.
Protected Attributes
-
std::vector<int> intRegInfo_
Maps from triangle ID to index of Polygon in intReg_ that contains the triangle ID. Maps to -1 if the triangle ID is not in a region of interest.
-
double triAreaPct_
-
struct Polygon
Subclassed by ompl::control::TriangularDecomposition::Triangle
-
struct Triangle : public ompl::control::TriangularDecomposition::Polygon
-
TriangularDecomposition(const base::RealVectorBounds &bounds, std::vector<Polygon> holes = std::vector<Polygon>(), std::vector<Polygon> intRegs = std::vector<Polygon>())