23 #ifndef __PLUGINS_COLLI_UTILS_OCCUPANCYGRID_OCCUPANCYGRID_H_ 24 #define __PLUGINS_COLLI_UTILS_OCCUPANCYGRID_OCCUPANCYGRID_H_ 26 #include "probability.h" 42 OccupancyGrid(
int width,
int height,
int cell_width=5,
int cell_height=5);
void fill(Probability prob)
Resets all occupancy probabilities.
float Probability
A probability type.
int get_width()
Get the width of the grid.
int get_height()
Get the height of the grid.
Probability & operator()(const int x, const int y)
Get the occupancy probability of a cell.
int get_cell_width()
Get the cell width (in cm)
Fawkes library namespace.
void set_cell_height(int cell_height)
Resets the cell height (in cm)
int get_cell_height()
Get the cell height (in cm)
Probability get_prob(int x, int y)
Get the occupancy probability of a cell.
const float OCCUPANCY_THRESHOLD
Occupancy threshold.
int cell_height_
Cell height in cm.
int width_
Width of the grid in # cells.
virtual ~OccupancyGrid()
Destructor.
int cell_width_
Cell width in cm.
int height_
Height of the grid in # cells.
void set_width(int width)
Resets the width of the grid and constructs a new empty grid.
Occupancy Grid class for general use.
virtual void set_prob(int x, int y, Probability prob)
Reset the occupancy probability of a cell.
void set_height(int height)
Resets the height of the grid and constructs a new empty grid.
void init_grid()
Init a new empty grid with the predefined parameters */.
std::vector< std::vector< Probability > > occupancy_probs_
The occupancy probability of the cells in a 2D array.
OccupancyGrid(int width, int height, int cell_width=5, int cell_height=5)
Constructs an empty occupancy grid.
void set_cell_width(int cell_width)
Resets the cell width (in cm)