Fawkes API
Fawkes Development Version
|
23 #include "occupancygrid.h"
149 if ((
isProb(prob)) || (prob == -1.f)) {
150 for (
int x = 0; x <
width_; x++) {
151 for (
int y = 0; y <
height_; y++) {
189 std::vector<Probability> column;
void set_cell_width(int cell_width)
Resets the cell width (in cm)
virtual ~OccupancyGrid()
Destructor.
int get_width()
Get the width of the grid.
int height_
Height of the grid in # cells.
int width_
Width of the grid in # cells.
void fill(Probability prob)
Resets all occupancy probabilities.
bool isProb(Probability p)
Check if the probability value is valid.
Probability & operator()(const int x, const int y)
Get the occupancy probability of a cell.
int cell_width_
Cell width in cm.
virtual void set_prob(int x, int y, Probability prob)
Reset the occupancy probability of a cell.
void set_cell_height(int cell_height)
Resets the cell height (in cm)
Probability get_prob(int x, int y)
Get the occupancy probability of a cell.
int cell_height_
Cell height in cm.
Fawkes library namespace.
float Probability
A probability type.
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_width(int width)
Resets the width of the grid and constructs a new empty grid.
void set_height(int height)
Resets the height of the grid and constructs a new empty grid.
int get_cell_width()
Get the cell width (in cm)
int get_height()
Get the height of the grid.
int get_cell_height()
Get the cell height (in cm)