ompl::control::PropositionalTriangularDecomposition Class Reference

A PropositionalTriangularDecomposition is a triangulation that ignores obstacles and respects propositional regions of interest. Practically speaking, it is both a TriangularDecomposition and a PropositionalDecomposition, but it is implemented without using multiple inheritance. More...

#include <ompl/extensions/triangle/PropositionalTriangularDecomposition.h>

Inheritance diagram for ompl::control::PropositionalTriangularDecomposition:

Public Types

using Polygon = TriangularDecomposition::Polygon
 
using Vertex = TriangularDecomposition::Vertex
 

Public Member Functions

 PropositionalTriangularDecomposition (const base::RealVectorBounds &bounds, const std::vector< Polygon > &holes=std::vector< Polygon >(), const std::vector< Polygon > &props=std::vector< Polygon >())
 Creates a PropositionalTriangularDecomposition 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 propositional regions of interest, given as a list of polygons. More...
 
int getNumProps () const override
 Returns the number of propositions in this propositional decomposition. More...
 
World worldAtRegion (int triID) override
 Returns the World corresponding to a given region. More...
 
void setup ()
 
void addHole (const Polygon &hole)
 
void addProposition (const Polygon &prop)
 
const std::vector< Polygon > & getHoles () const
 
const std::vector< Polygon > & getPropositions () const
 
void print (std::ostream &out) const
 
- Public Member Functions inherited from ompl::control::PropositionalDecomposition
 PropositionalDecomposition (const DecompositionPtr &decomp)
 Creates a propositional decomposition wrapped around a given decomposition with a given number of propositions. More...
 
 ~PropositionalDecomposition () override
 Clears all memory belonging to this propositional decomposition.
 
virtual World worldAtRegion (int rid)=0
 Returns the World corresponding to a given region. More...
 
int getNumRegions () const override
 Returns the number of regions in this propositional decomposition's underlying decomposition. More...
 
virtual int getNumProps () const =0
 Returns the number of propositions in this propositional decomposition. More...
 
double getRegionVolume (int rid) override
 Returns the volume of a given region. More...
 
int locateRegion (const base::State *s) const override
 Returns the region of the underlying decomposition that contains a given State. More...
 
void project (const base::State *s, std::vector< double > &coord) const override
 Project a given State to a set of coordinates in R^k, where k is the dimension of this Decomposition. More...
 
void getNeighbors (int rid, std::vector< int > &neighbors) const override
 Stores a given region's neighbors into a given vector. More...
 
void sampleFromRegion (int rid, RNG &rng, std::vector< double > &coord) const override
 Samples a projected coordinate from a given region. More...
 
void sampleFullState (const base::StateSamplerPtr &sampler, const std::vector< double > &coord, base::State *s) const override
 Samples a State using a projected coordinate and a StateSampler. More...
 
- Public Member Functions inherited from ompl::control::Decomposition
 Decomposition (int dim, const base::RealVectorBounds &b)
 Constructor. Creates a Decomposition with a given dimension and a given set of bounds. Accepts as an optional argument a given number of regions. More...
 
virtual int getNumRegions () const =0
 Returns the number of regions in this Decomposition. More...
 
virtual int getDimension () const
 Returns the dimension of this Decomposition. More...
 
virtual const base::RealVectorBoundsgetBounds () const
 Returns the bounds of this Decomposition. More...
 
virtual double getRegionVolume (int rid)=0
 Returns the volume of a given region in this Decomposition. More...
 
virtual int locateRegion (const base::State *s) const =0
 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. More...
 
virtual void project (const base::State *s, std::vector< double > &coord) const =0
 Project a given State to a set of coordinates in R^k, where k is the dimension of this Decomposition. More...
 
virtual void getNeighbors (int rid, std::vector< int > &neighbors) const =0
 Stores a given region's neighbors into a given vector. More...
 
virtual void sampleFromRegion (int rid, RNG &rng, std::vector< double > &coord) const =0
 Samples a projected coordinate from a given region. More...
 
virtual void sampleFullState (const base::StateSamplerPtr &sampler, const std::vector< double > &coord, base::State *s) const =0
 Samples a State using a projected coordinate and a StateSampler. More...
 

Protected Attributes

TriangularDecompositiontriDecomp_
 
- Protected Attributes inherited from ompl::control::PropositionalDecomposition
DecompositionPtr decomp_
 
- Protected Attributes inherited from ompl::control::Decomposition
int dimension_
 
base::RealVectorBounds bounds_
 

Detailed Description

A PropositionalTriangularDecomposition is a triangulation that ignores obstacles and respects propositional regions of interest. Practically speaking, it is both a TriangularDecomposition and a PropositionalDecomposition, but it is implemented without using multiple inheritance.

Definition at line 58 of file PropositionalTriangularDecomposition.h.

Member Typedef Documentation

◆ Polygon

◆ Vertex

Constructor & Destructor Documentation

◆ PropositionalTriangularDecomposition()

ompl::control::PropositionalTriangularDecomposition::PropositionalTriangularDecomposition ( const base::RealVectorBounds bounds,
const std::vector< Polygon > &  holes = std::vector<Polygon>(),
const std::vector< Polygon > &  props = std::vector<Polygon>() 
)

Creates a PropositionalTriangularDecomposition 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 propositional regions of interest, given as a list of polygons.

Definition at line 76 of file PropositionalTriangularDecomposition.cpp.

Member Function Documentation

◆ addHole()

void ompl::control::PropositionalTriangularDecomposition::addHole ( const Polygon hole)

Definition at line 108 of file PropositionalTriangularDecomposition.cpp.

◆ addProposition()

void ompl::control::PropositionalTriangularDecomposition::addProposition ( const Polygon prop)

Definition at line 113 of file PropositionalTriangularDecomposition.cpp.

◆ getHoles()

const std::vector< oc::PropositionalTriangularDecomposition::Polygon > & ompl::control::PropositionalTriangularDecomposition::getHoles ( ) const

Definition at line 119 of file PropositionalTriangularDecomposition.cpp.

◆ getNumProps()

int ompl::control::PropositionalTriangularDecomposition::getNumProps ( ) const
overridevirtual

Returns the number of propositions in this propositional decomposition.

Implements ompl::control::PropositionalDecomposition.

Definition at line 84 of file PropositionalTriangularDecomposition.cpp.

◆ getPropositions()

const std::vector< oc::PropositionalTriangularDecomposition::Polygon > & ompl::control::PropositionalTriangularDecomposition::getPropositions ( ) const

Definition at line 125 of file PropositionalTriangularDecomposition.cpp.

◆ print()

void ompl::control::PropositionalTriangularDecomposition::print ( std::ostream &  out) const

Definition at line 130 of file PropositionalTriangularDecomposition.cpp.

◆ setup()

void ompl::control::PropositionalTriangularDecomposition::setup ( )

Definition at line 103 of file PropositionalTriangularDecomposition.cpp.

◆ worldAtRegion()

oc::World ompl::control::PropositionalTriangularDecomposition::worldAtRegion ( int  rid)
overridevirtual

Returns the World corresponding to a given region.

Implements ompl::control::PropositionalDecomposition.

Definition at line 89 of file PropositionalTriangularDecomposition.cpp.

Member Data Documentation

◆ triDecomp_

TriangularDecomposition* ompl::control::PropositionalTriangularDecomposition::triDecomp_
protected

Definition at line 94 of file PropositionalTriangularDecomposition.h.


The documentation for this class was generated from the following files: