All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
ompl::control::GridDecomposition Class Reference

A GridDecomposition is a Decomposition implemented using a grid. More...

#include <GridDecomposition.h>

Inheritance diagram for ompl::control::GridDecomposition:

Public Member Functions

 GridDecomposition (const int len, const std::size_t dim, const base::RealVectorBounds &b)
 Constructor. Creates a GridDecomposition as a hypercube with a given dimension, side length, and bounds.
 
virtual double getRegionVolume (const int rid) const
 Returns the volume of a given region in this Decomposition.
 
virtual void getNeighbors (const int rid, std::vector< int > &neighbors) const
 Stores a given region's neighbors into a given vector.
 
virtual int locateRegion (const base::State *s) const
 Returns the index of the region containing a given State. Most often, this is obtained by first calling project().
 
virtual const
base::RealVectorBounds
getRegionBounds (const int rid)
 Returns the bounds of a given region in this Decomposition.
 
- Public Member Functions inherited from ompl::control::Decomposition
 Decomposition (const int n, const std::size_t dim, const base::RealVectorBounds &b)
 Constructor. Creates a Decomposition with a given number of regions, a given dimension, and a given set of bounds.
 
virtual int getNumRegions () const
 Returns the number of regions in this Decomposition.
 
virtual std::size_t getDimension () const
 Returns the dimension of this Decomposition.
 
virtual const
base::RealVectorBounds
getBounds () const
 Returns the bounds of this Decomposition.
 
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.
 
virtual void sampleFromRegion (const int rid, const base::StateSamplerPtr &sampler, base::State *s)=0
 Samples a State from a given region using a given StateSampler.
 

Protected Member Functions

void regionToCoord (int rid, std::vector< int > &coord) const
 Converts a given region to a coordinate in the grid.
 
int coordToRegion (const std::vector< int > &coord) const
 Converts the given coordinate to the region in the grid.
 
void computeGridNeighbors (int rid, std::vector< int > &neighbors) const
 Computes the neighbors of the given region in a n-dimensional grid.
 
void computeGridNeighborsSub (const std::vector< int > &coord, std::vector< int > &neighbors, unsigned int dim, std::vector< int > &candidate) const
 

Protected Attributes

const int length_
 
double cellVolume_
 
boost::unordered_map< int,
boost::shared_ptr
< base::RealVectorBounds > > 
regToBounds_
 
- Protected Attributes inherited from ompl::control::Decomposition
const int numRegions_
 
const std::size_t dimension_
 
const base::RealVectorBounds bounds_
 

Detailed Description

A GridDecomposition is a Decomposition implemented using a grid.

Definition at line 52 of file GridDecomposition.h.

Member Function Documentation

void ompl::control::GridDecomposition::computeGridNeighborsSub ( const std::vector< int > &  coord,
std::vector< int > &  neighbors,
unsigned int  dim,
std::vector< int > &  candidate 
) const
protected

Recursive subroutine for grid neighbor computation

Definition at line 159 of file GridDecomposition.cpp.


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