Skip to content

Commit a9f92d8

Browse files
Fix review items
1 parent 7a09944 commit a9f92d8

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

nav2_costmap_2d/src/clear_costmap_service.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,8 @@ void ClearCostmapService::clearRegion(const double reset_distance, bool invert)
113113
}
114114
}
115115

116-
layers = costmap_.getLayeredCostmap()->getFilters();
117-
118-
for (auto & layer : *layers) {
119-
if (layer->isClearable()) {
120-
auto costmap_layer = std::static_pointer_cast<CostmapLayer>(layer);
121-
clearLayerRegion(costmap_layer, x, y, reset_distance, invert);
122-
}
123-
}
116+
// AlexeyMerzlyakov: No need to clear layer region for costmap filters
117+
// as they are always supposed to be not clearable.
124118
}
125119

126120
void ClearCostmapService::clearLayerRegion(

nav2_costmap_2d/src/costmap_2d_ros.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ Costmap2DROS::on_configure(const rclcpp_lifecycle::State & /*state*/)
165165
std::shared_ptr<Layer> filter = plugin_loader_.createSharedInstance(filter_types_[i]);
166166
layered_costmap_->addFilter(filter);
167167

168-
// TODO(mjeronimo): instead of get(), use a shared ptr
169168
filter->initialize(
170169
layered_costmap_.get(), filter_names_[i], tf_buffer_.get(),
171170
shared_from_this(), client_node_, rclcpp_node_);

0 commit comments

Comments
 (0)