#include namespace robot_costmap_2d { void CostmapLayer::touch(double x, double y, double* min_x, double* min_y, double* max_x, double* max_y) { *min_x = std::min(x, *min_x); *min_y = std::min(y, *min_y); *max_x = std::max(x, *max_x); *max_y = std::max(y, *max_y); } void CostmapLayer::matchSize() { Costmap2D* master = layered_costmap_->getCostmap(); resizeMap(master->getSizeInCellsX(), master->getSizeInCellsY(), master->getResolution(), master->getOriginX(), master->getOriginY()); } void CostmapLayer::clearArea(int start_x, int start_y, int end_x, int end_y, bool invert_area) { unsigned char* grid = getCharMap(); for(int x=0; x<(int)getSizeInCellsX(); x++){ bool xrange = x>start_x && xstart_y && y= robot_costmap_2d::INSCRIBED_INFLATED_OBSTACLE) master_array[it] = robot_costmap_2d::INSCRIBED_INFLATED_OBSTACLE - 1; else master_array[it] = sum; } it++; } } } } // namespace robot_costmap_2d