45 for (p[0] = 0; p[0] < size_[0]; p[0]++)
54 const float remember_hit_odds,
const float remember_miss_odds,
55 const int range_min,
const int range_max)
57 const size_t width =
size_[0];
58 const size_t height =
size_[1];
59 const int range_min_sq = range_min * range_min;
60 const int range_max_sq = range_max * range_max;
61 for (
VecInternal p(-range_max, 0); p[0] <= range_max; p[0]++)
63 for (p[1] = -range_max; p[1] <= range_max; p[1]++)
66 if (static_cast<size_t>(gp[0]) >= width ||
67 static_cast<size_t>(gp[1]) >= height)
70 const float r_sq = p.sqlen();
71 if (r_sq > range_max_sq)
74 const int c = (*costmap)[
Vec(gp[0], gp[1], 0)];
81 if (r_sq >= range_min_sq)
95 for (
Vec p(0, 0, 0); p[1] <
size_[1]; p[1]++)
97 for (p[0] = 0; p[0] < size_[0]; p[0]++)
void remember(const BlockMemGridmapBase< char, 3, 2 > *const costmap, const Vec ¢er, const float remember_hit_odds, const float remember_miss_odds, const int range_min, const int range_max)
BlockMemGridmap< bbf::BinaryBayesFilter, 2, 2, 0x20 > cm_hist_bbf_
BlockMemGridmap< char, 2, 2, 0x80 > cm_hist_
CyclicVecInt< 2, 2 > VecInternal
void forEach(const std::function< void(const Vec &, bbf::BinaryBayesFilter &)> cb)