ompl::control::GridDecomposition Class Reference
A GridDecomposition is a Decomposition implemented using a grid. More...
#include <ompl/control/planners/syclop/GridDecomposition.h>
Inheritance diagram for ompl::control::GridDecomposition:

Public Member Functions | |
GridDecomposition (int len, int dim, const base::RealVectorBounds &b) | |
Constructor. Creates a GridDecomposition as a hypercube with a given dimension, side length, and bounds. The cells of the hypercube are referenced by integer coordinates of the form ![]() ![]() | |
virtual int | getNumRegions (void) const |
Returns the number of regions in this Decomposition. | |
virtual double | getRegionVolume (int) |
Returns the volume of a given region in this Decomposition. | |
virtual void | getNeighbors (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(). Returns -1 if no region contains the State. | |
virtual void | sampleFromRegion (int rid, RNG &rng, std::vector< double > &coord) const |
Samples a projected coordinate from a given region. | |
Protected Member Functions | |
virtual const base::RealVectorBounds & | getRegionBounds (int rid) const |
Helper method to return the bounds of a given region. | |
void | regionToGridCoord (int rid, std::vector< int > &coord) const |
Converts a given region to a coordinate in the grid. | |
int | gridCoordToRegion (const std::vector< int > &coord) const |
Converts the given grid coordinate to its corresponding region ID. | |
int | coordToRegion (const std::vector< double > &coord) const |
Converts a decomposition space coordinate to the ID of the region that contains iit. | |
void | coordToGridCoord (const std::vector< double > &coord, std::vector< int > &gridCoord) const |
Converts a decomposition space coordinate to a grid coordinate. | |
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, int dim, std::vector< int > &candidate) const |
Protected Attributes | |
int | length_ |
double | cellVolume_ |
boost::unordered_map< int, boost::shared_ptr < base::RealVectorBounds > > | regToBounds_ |
Detailed Description
A GridDecomposition is a Decomposition implemented using a grid.
Definition at line 53 of file GridDecomposition.h.
Member Function Documentation
void ompl::control::GridDecomposition::computeGridNeighborsSub | ( | const std::vector< int > & | coord, |
std::vector< int > & | neighbors, | ||
int | dim, | ||
std::vector< int > & | candidate | ||
) | const [protected] |
Recursive subroutine for grid neighbor computation
Definition at line 161 of file GridDecomposition.cpp.
The documentation for this class was generated from the following files:
- ompl/control/planners/syclop/GridDecomposition.h
- ompl/control/planners/syclop/src/GridDecomposition.cpp