Skip to content

Commit

Permalink
Remove unnecessary member
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatao committed Oct 31, 2023
1 parent 2d1fc0b commit 7840707
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ class Costmap3dLayerFootprint : public Costmap3dLayerBase
int x_min, x_max, y_min, y_max;
};
std::vector<Rect> template_ranges_;
Rect default_range_;

int range_max_;
std::vector<bool> unknown_buf_;

Expand Down Expand Up @@ -195,11 +193,11 @@ class Costmap3dLayerFootprint : public Costmap3dLayerBase
cs_template_.e(0, 0, yaw) = 100;
}

default_range_ = {-range_max_, range_max_, -range_max_, range_max_};
const Rect default_range = {-range_max_, range_max_, -range_max_, range_max_};
template_ranges_.resize(16);
for (size_t i = 0; i < template_ranges_.size(); i++)
{
template_ranges_[i] = default_range_;
template_ranges_[i] = default_range;
if (i & 1)
{
template_ranges_[i].x_min = 0;
Expand Down Expand Up @@ -299,7 +297,7 @@ class Costmap3dLayerFootprint : public Costmap3dLayerBase

const Rect& getDefaultRange(const nav_msgs::OccupancyGrid::ConstPtr&, const int) const
{
return default_range_;
return template_ranges_[0];
}
const Rect& getMaskedRange(const nav_msgs::OccupancyGrid::ConstPtr& msg, const int pos) const
{
Expand Down

0 comments on commit 7840707

Please sign in to comment.