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
class ompl::geometric::Discretization< Motion >
One-level discretization used for KPIECE.
Definition at line 58 of file Discretization.h.
Member Typedef Documentation
◆ Cell
using ompl::geometric::Discretization< Motion >::Cell = typename Grid::Cell |
The datatype for the maintained grid cells.
Definition at line 107 of file Discretization.h.
◆ Coord
using ompl::geometric::Discretization< Motion >::Coord = typename Grid::Coord |
The datatype for the maintained grid coordinates.
Definition at line 110 of file Discretization.h.
◆ FreeMotionFn
using ompl::geometric::Discretization< Motion >::FreeMotionFn = typename std::function<void(Motion *)> |
The signature of a function that frees the memory for a motion.
Definition at line 113 of file Discretization.h.
◆ Grid
using ompl::geometric::Discretization< Motion >::Grid = GridB<CellData *, OrderCellsByImportance> |
The datatype for the maintained grid datastructure.
Definition at line 104 of file Discretization.h.
Constructor & Destructor Documentation
◆ Discretization()
|
inline |
Definition at line 115 of file Discretization.h.
◆ ~Discretization()
|
inline |
Definition at line 122 of file Discretization.h.
Member Function Documentation
◆ addMotion()
|
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 193 of file Discretization.h.
◆ clear()
|
inline |
Restore the discretization to its original form.
Definition at line 154 of file Discretization.h.
◆ countIteration()
|
inline |
Definition at line 162 of file Discretization.h.
◆ freeMemory()
|
inline |
Free the memory for the motions contained in a grid.
Definition at line 178 of file Discretization.h.
◆ getBorderFraction()
|
inline |
Set the fraction of time for focusing on the border (between 0 and 1).
Definition at line 142 of file Discretization.h.
◆ getCellCount()
|
inline |
Definition at line 172 of file Discretization.h.
◆ getGrid()
|
inline |
Definition at line 277 of file Discretization.h.
◆ getMotionCount()
|
inline |
Definition at line 167 of file Discretization.h.
◆ getPlannerData()
|
inline |
Definition at line 282 of file Discretization.h.
◆ removeMotion()
|
inline |
Definition at line 247 of file Discretization.h.
◆ selectMotion()
|
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 224 of file Discretization.h.
◆ setBorderFraction()
|
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 133 of file Discretization.h.
◆ setDimension()
|
inline |
Set the dimension of the grid to be maintained.
Definition at line 148 of file Discretization.h.
◆ updateCell()
|
inline |
Definition at line 272 of file Discretization.h.
The documentation for this class was generated from the following file:
- ompl/geometric/planners/kpiece/Discretization.h