ompl::geometric::Discretization< Motion > Class Template Reference

One-level discretization used for KPIECE. More...

#include <Discretization.h>

List of all members.

Classes

struct  CellData
 The data held by a cell in the grid of motions. More...
struct  OrderCellsByImportance
 Definintion of an operator passed to the Grid structure, to order cells by importance. More...

Public Types

typedef Grid::Cell Cell
 The datatype for the maintained grid cells.
typedef Grid::Coord Coord
 The datatype for the maintained grid coordinates.
typedef boost::function1< void,
Motion * > 
FreeMotionFn
 The signature of a function that frees the memory for a motion.
typedef GridB< CellData
*, OrderCellsByImportance
Grid
 The datatype for the maintained grid datastructure.

Public Member Functions

unsigned int addMotion (Motion *motion, const Coord &coord, double dist=0.0)
 Add a motion to the grid containing motions. As a hint, dist specifies the distance to the goal from the state of the motion being added. The function returns the number of cells created to accommodate the new motion (0 or 1). The discretization takes ownership of the motion passed as argument, and the memory for the motion is freed by calling the function passed to the constructor.
void clear (void)
 Restore the discretization to its original form.
void countIteration (void)
 Discretization (const FreeMotionFn &freeMotion)
void freeMemory (void)
 Free the memory for the motions contained in a grid.
double getBorderFraction (void) const
 Set the fraction of time for focusing on the border (between 0 and 1).
std::size_t getCellCount (void)
const GridgetGrid (void) const
std::size_t getMotionCount (void)
void getPlannerData (base::PlannerData &data, int tag) const
bool removeMotion (Motion *motion, const Coord &coord)
void selectMotion (Motion *&smotion, Cell *&scell)
 Select a motion and the cell it is part of from the grid of motions. This is where preference is given to cells on the boundary of the grid.
void setBorderFraction (double bp)
 Set the fraction of time for focusing on the border (between 0 and 1). This is the minimum fraction used to select cells that are exterior (minimum because if 95% of cells are on the border, they will be selected with 95% chance, even if this fraction is set to 90%).
void setDimension (unsigned int dim)
 Set the dimension of the grid to be maintained.
void updateCell (Cell *cell)
 ~Discretization (void)

Private Member Functions

void freeCellData (CellData *cdata)
 Free the memory for the data contained in a grid cell.

Static Private Member Functions

static void computeImportance (Cell *cell, void *)
 This function is provided as a callback to the grid datastructure to update the importance of a cell.

Private Attributes

FreeMotionFn freeMotion_
 Method that can free the memory for a stored motion.
Grid grid_
 A grid containing motions, imposed on a projection of the state space.
unsigned int iteration_
 The number of iterations performed on this tree.
CellrecentCell_
 The most recently created cell.
RNG rng_
 The random number generator.
double selectBorderFraction_
 The fraction of time to focus exploration on the border of the grid.
std::size_t size_
 The total number of motions (there can be multiple per cell) in the grid.

Detailed Description

template<typename Motion>
class ompl::geometric::Discretization< Motion >

One-level discretization used for KPIECE.

Definition at line 58 of file Discretization.h.


Member Typedef Documentation

template<typename Motion>
typedef Grid::Cell ompl::geometric::Discretization< Motion >::Cell

The datatype for the maintained grid cells.

Definition at line 113 of file Discretization.h.

template<typename Motion>
typedef Grid::Coord ompl::geometric::Discretization< Motion >::Coord

The datatype for the maintained grid coordinates.

Definition at line 116 of file Discretization.h.

template<typename Motion>
typedef boost::function1<void, Motion*> ompl::geometric::Discretization< Motion >::FreeMotionFn

The signature of a function that frees the memory for a motion.

Definition at line 119 of file Discretization.h.

template<typename Motion>
typedef GridB<CellData*, OrderCellsByImportance> ompl::geometric::Discretization< Motion >::Grid

The datatype for the maintained grid datastructure.

Definition at line 110 of file Discretization.h.


Constructor & Destructor Documentation

template<typename Motion>
ompl::geometric::Discretization< Motion >::Discretization ( const FreeMotionFn freeMotion  )  [inline]

Definition at line 121 of file Discretization.h.

template<typename Motion>
ompl::geometric::Discretization< Motion >::~Discretization ( void   )  [inline]

Definition at line 128 of file Discretization.h.


Member Function Documentation

template<typename Motion>
unsigned int ompl::geometric::Discretization< Motion >::addMotion ( Motion *  motion,
const Coord coord,
double  dist = 0.0 
) [inline]

Add a motion to the grid containing motions. As a hint, dist specifies the distance to the goal from the state of the motion being added. The function returns the number of cells created to accommodate the new motion (0 or 1). The discretization takes ownership of the motion passed as argument, and the memory for the motion is freed by calling the function passed to the constructor.

Definition at line 199 of file Discretization.h.

template<typename Motion>
void ompl::geometric::Discretization< Motion >::clear ( void   )  [inline]

Restore the discretization to its original form.

Definition at line 160 of file Discretization.h.

template<typename Motion>
static void ompl::geometric::Discretization< Motion >::computeImportance ( Cell cell,
void *   
) [inline, static, private]

This function is provided as a callback to the grid datastructure to update the importance of a cell.

Definition at line 313 of file Discretization.h.

template<typename Motion>
void ompl::geometric::Discretization< Motion >::countIteration ( void   )  [inline]

Definition at line 168 of file Discretization.h.

template<typename Motion>
void ompl::geometric::Discretization< Motion >::freeCellData ( CellData cdata  )  [inline, private]

Free the memory for the data contained in a grid cell.

Definition at line 303 of file Discretization.h.

template<typename Motion>
void ompl::geometric::Discretization< Motion >::freeMemory ( void   )  [inline]

Free the memory for the motions contained in a grid.

Definition at line 184 of file Discretization.h.

template<typename Motion>
double ompl::geometric::Discretization< Motion >::getBorderFraction ( void   )  const [inline]

Set the fraction of time for focusing on the border (between 0 and 1).

Definition at line 148 of file Discretization.h.

template<typename Motion>
std::size_t ompl::geometric::Discretization< Motion >::getCellCount ( void   )  [inline]

Definition at line 178 of file Discretization.h.

template<typename Motion>
const Grid& ompl::geometric::Discretization< Motion >::getGrid ( void   )  const [inline]

Definition at line 283 of file Discretization.h.

template<typename Motion>
std::size_t ompl::geometric::Discretization< Motion >::getMotionCount ( void   )  [inline]

Definition at line 173 of file Discretization.h.

template<typename Motion>
void ompl::geometric::Discretization< Motion >::getPlannerData ( base::PlannerData data,
int  tag 
) const [inline]

Definition at line 288 of file Discretization.h.

template<typename Motion>
bool ompl::geometric::Discretization< Motion >::removeMotion ( Motion *  motion,
const Coord coord 
) [inline]

Definition at line 253 of file Discretization.h.

template<typename Motion>
void ompl::geometric::Discretization< Motion >::selectMotion ( Motion *&  smotion,
Cell *&  scell 
) [inline]

Select a motion and the cell it is part of from the grid of motions. This is where preference is given to cells on the boundary of the grid.

Definition at line 230 of file Discretization.h.

template<typename Motion>
void ompl::geometric::Discretization< Motion >::setBorderFraction ( double  bp  )  [inline]

Set the fraction of time for focusing on the border (between 0 and 1). This is the minimum fraction used to select cells that are exterior (minimum because if 95% of cells are on the border, they will be selected with 95% chance, even if this fraction is set to 90%).

Definition at line 139 of file Discretization.h.

template<typename Motion>
void ompl::geometric::Discretization< Motion >::setDimension ( unsigned int  dim  )  [inline]

Set the dimension of the grid to be maintained.

Definition at line 154 of file Discretization.h.

template<typename Motion>
void ompl::geometric::Discretization< Motion >::updateCell ( Cell cell  )  [inline]

Definition at line 278 of file Discretization.h.


Member Data Documentation

template<typename Motion>
FreeMotionFn ompl::geometric::Discretization< Motion >::freeMotion_ [private]

Method that can free the memory for a stored motion.

Definition at line 334 of file Discretization.h.

template<typename Motion>
Grid ompl::geometric::Discretization< Motion >::grid_ [private]

A grid containing motions, imposed on a projection of the state space.

Definition at line 321 of file Discretization.h.

template<typename Motion>
unsigned int ompl::geometric::Discretization< Motion >::iteration_ [private]

The number of iterations performed on this tree.

Definition at line 328 of file Discretization.h.

template<typename Motion>
Cell* ompl::geometric::Discretization< Motion >::recentCell_ [private]

The most recently created cell.

Definition at line 331 of file Discretization.h.

template<typename Motion>
RNG ompl::geometric::Discretization< Motion >::rng_ [private]

The random number generator.

Definition at line 341 of file Discretization.h.

template<typename Motion>
double ompl::geometric::Discretization< Motion >::selectBorderFraction_ [private]

The fraction of time to focus exploration on the border of the grid.

Definition at line 338 of file Discretization.h.

template<typename Motion>
std::size_t ompl::geometric::Discretization< Motion >::size_ [private]

The total number of motions (there can be multiple per cell) in the grid.

Definition at line 325 of file Discretization.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


ompl
Author(s): Ioan Sucan/isucan@rice.edu, Mark Moll/mmoll@rice.edu, Lydia Kavraki/kavraki@rice.edu
autogenerated on Fri Jan 11 09:34:02 2013