ompl::geometric::Discretization< Motion > Class Template Reference
One-level discretization used for KPIECE. More...
#include <ompl/geometric/planners/kpiece/Discretization.h>
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 | |
using | Grid = GridB< CellData *, OrderCellsByImportance > |
The datatype for the maintained grid datastructure. | |
using | Cell = typename Grid::Cell |
The datatype for the maintained grid cells. | |
using | Coord = typename Grid::Coord |
The datatype for the maintained grid coordinates. | |
using | FreeMotionFn = typename std::function< void(Motion *)> |
The signature of a function that frees the memory for a motion. | |
Public Member Functions | |
Discretization (FreeMotionFn freeMotion) | |
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%) | |
double | getBorderFraction () const |
Set the fraction of time for focusing on the border (between 0 and 1). | |
void | setDimension (unsigned int dim) |
Set the dimension of the grid to be maintained. | |
void | clear () |
Restore the discretization to its original form. | |
void | countIteration () |
std::size_t | getMotionCount () const |
std::size_t | getCellCount () const |
void | freeMemory () |
Free the memory for the motions contained in a grid. | |
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 | 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. | |
bool | removeMotion (Motion *motion, const Coord &coord) |
void | updateCell (Cell *cell) |
const Grid & | getGrid () const |
void | getPlannerData (base::PlannerData &data, int tag, bool start, const Motion *lastGoalMotion) const |
Detailed Description
template<typename Motion>
class ompl::geometric::Discretization< Motion >
One-level discretization used for KPIECE.
Definition at line 122 of file Discretization.h.
The documentation for this class was generated from the following file:
- ompl/geometric/planners/kpiece/Discretization.h