Skip to content

Commit

Permalink
Update obstacle_layer.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Nisarg236 authored Dec 7, 2024
1 parent c6e0e3d commit 25d5e00
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions costmap_2d/plugins/obstacle_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ void ObstacleLayer::reconfigureCB(costmap_2d::ObstaclePluginConfig &config, uint
reduced_footprint_enabled_ = config.reduced_footprint_enabled;
footprint_reduction_size_ = config.footprint_reduction_size;
}
else{
reduced_footprint_enabled_ = false;
footprint_reduction_size_ = 0.0;
}
max_obstacle_height_ = config.max_obstacle_height;
combination_method_ = config.combination_method;
raytrace_outside_map_ = config.raytrace_outside_map;
Expand Down Expand Up @@ -511,10 +515,7 @@ void ObstacleLayer::updateCosts(costmap_2d::Costmap2D& master_grid, int min_i, i
{
if (footprint_clearing_enabled_)
{
const std::vector<geometry_msgs::Point>& footprint_to_use = (reduced_footprint_enabled_)
? reduced_footprint_
: transformed_footprint_;
setConvexPolygonCost(footprint_to_use, costmap_2d::FREE_SPACE);
setConvexPolygonCost(transformed_footprint_, costmap_2d::FREE_SPACE);
}

switch (combination_method_)
Expand Down

0 comments on commit 25d5e00

Please sign in to comment.