MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / DeleteKernels

Method DeleteKernels

roborts_costmap/src/inflation_layer.cpp:294–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294void InflationLayer::DeleteKernels() {
295 if (cached_distances_ != NULL) {
296 for (unsigned int i = 0; i <= cached_cell_inflation_radius_ + 1; ++i) {
297 if (cached_distances_[i])
298 delete[] cached_distances_[i];
299 }
300 if (cached_distances_)
301 delete[] cached_distances_;
302 cached_distances_ = NULL;
303 }
304
305 if (cached_costs_ != NULL) {
306 for (unsigned int i = 0; i <= cached_cell_inflation_radius_ + 1; ++i) {
307 if (cached_costs_[i])
308 delete[] cached_costs_[i];
309 }
310 delete[] cached_costs_;
311 cached_costs_ = NULL;
312 }
313}
314
315void InflationLayer::SetInflationParameters(double inflation_radius, double cost_scaling_factor) {
316 if (weight_ != cost_scaling_factor || inflation_radius_ != inflation_radius) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected