Go to the documentation of this file.
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);
25 bool xrange = x>start_x && x<end_x;
28 if((xrange && y>start_y && y<end_y)!=invert_area)
68 unsigned char* master_array = master_grid.
getCharMap();
71 for (
int j = min_j; j < max_j; j++)
73 unsigned int it = j * span + min_i;
74 for (
int i = min_i; i < max_i; i++)
81 unsigned char old_cost = master_array[it];
94 unsigned char* master = master_grid.
getCharMap();
97 for (
int j = min_j; j < max_j; j++)
99 unsigned int it = span*j+min_i;
100 for (
int i = min_i; i < max_i; i++)
112 unsigned char* master = master_grid.
getCharMap();
115 for (
int j = min_j; j < max_j; j++)
117 unsigned int it = span*j+min_i;
118 for (
int i = min_i; i < max_i; i++)
131 unsigned char* master_array = master_grid.
getCharMap();
134 for (
int j = min_j; j < max_j; j++)
136 unsigned int it = j * span + min_i;
137 for (
int i = min_i; i < max_i; i++)
144 unsigned char old_cost = master_array[it];
153 master_array[it] = sum;
void updateWithAddition(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
virtual void clearArea(int start_x, int start_y, int end_x, int end_y, bool invert_area=false)
void updateWithMax(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
static const unsigned char INSCRIBED_INFLATED_OBSTACLE
static const unsigned char NO_INFORMATION
virtual void matchSize()
Implement this to make this layer match the size of the parent costmap.
A 2D costmap provides a mapping between points in the world and their associated "costs".
unsigned char * getCharMap() const
Will return a pointer to the underlying unsigned char array used as the costmap.
double getOriginX() const
Accessor for the x origin of the costmap.
void updateWithOverwrite(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
LayeredCostmap * layered_costmap_
void resizeMap(unsigned int size_x, unsigned int size_y, double resolution, double origin_x, double origin_y)
unsigned int getSizeInCellsY() const
Accessor for the y size of the costmap in cells.
void useExtraBounds(double *min_x, double *min_y, double *max_x, double *max_y)
void touch(double x, double y, double *min_x, double *min_y, double *max_x, double *max_y)
void updateWithTrueOverwrite(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
double getOriginY() const
Accessor for the y origin of the costmap.
double getResolution() const
Accessor for the resolution of the costmap.
unsigned int getIndex(unsigned int mx, unsigned int my) const
Given two map coordinates... compute the associated index.
unsigned int getSizeInCellsX() const
Accessor for the x size of the costmap in cells.
void addExtraBounds(double mx0, double my0, double mx1, double my1)
costmap_2d
Author(s): Eitan Marder-Eppstein, David V. Lu!!, Dave Hershberger, contradict@gmail.com
autogenerated on Mon Mar 6 2023 03:50:17