6 void CostmapLayer::touch(
double x,
double y,
double* min_x,
double* min_y,
double* max_x,
double* max_y)
8 *min_x = std::min(x, *min_x);
9 *min_y = std::min(y, *min_y);
10 *max_x = std::max(x, *max_x);
11 *max_y = std::max(y, *max_y);
51 unsigned char* master_array = master_grid.
getCharMap();
54 for (
int j = min_j; j < max_j; j++)
56 unsigned int it = j * span + min_i;
57 for (
int i = min_i; i < max_i; i++)
64 unsigned char old_cost = master_array[it];
77 unsigned char* master = master_grid.
getCharMap();
80 for (
int j = min_j; j < max_j; j++)
82 unsigned int it = span*j+min_i;
83 for (
int i = min_i; i < max_i; i++)
95 unsigned char* master = master_grid.
getCharMap();
98 for (
int j = min_j; j < max_j; j++)
100 unsigned int it = span*j+min_i;
101 for (
int i = min_i; i < max_i; i++)
114 unsigned char* master_array = master_grid.
getCharMap();
117 for (
int j = min_j; j < max_j; j++)
119 unsigned int it = j * span + min_i;
120 for (
int i = min_i; i < max_i; i++)
127 unsigned char old_cost = master_array[it];
136 master_array[it] = sum;
LayeredCostmap * layered_costmap_
void resizeMap(unsigned int size_x, unsigned int size_y, double resolution, double origin_x, double origin_y)
void updateWithOverwrite(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
double getOriginX() const
Accessor for the x origin of the costmap.
void useExtraBounds(double *min_x, double *min_y, double *max_x, double *max_y)
unsigned char * getCharMap() const
Will return a pointer to the underlying unsigned char array used as the costmap.
static const unsigned char INSCRIBED_INFLATED_OBSTACLE
void updateWithTrueOverwrite(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
void updateWithAddition(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
virtual void matchSize()
Implement this to make this layer match the size of the parent costmap.
double getOriginY() const
Accessor for the y origin of the costmap.
unsigned int getSizeInCellsY() const
Accessor for the y size of the costmap in cells.
bool enabled_
Currently this var is managed by subclasses. TODO: make this managed by this class and/or container c...
unsigned int getSizeInCellsX() const
Accessor for the x size of the costmap in cells.
static const unsigned char NO_INFORMATION
void addExtraBounds(double mx0, double my0, double mx1, double my1)
void updateWithMax(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
A 2D costmap provides a mapping between points in the world and their associated "costs".
double getResolution() const
Accessor for the resolution of the costmap.
void touch(double x, double y, double *min_x, double *min_y, double *max_x, double *max_y)