MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / setup

Method setup

grid_map_core/src/iterators/SlidingWindowIterator.cpp:84–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void SlidingWindowIterator::setup(const GridMap& gridMap)
85{
86 if (!gridMap.isDefaultStartIndex()) throw std::runtime_error(
87 "SlidingWindowIterator cannot be used with grid maps that don't have a default buffer start index.");
88 if (windowSize_ % 2 == 0) throw std::runtime_error(
89 "SlidingWindowIterator has a wrong window size!");
90 windowMargin_ = (windowSize_ - 1) / 2;
91
92 if (edgeHandling_ == EdgeHandling::INSIDE) {
93 if (!dataInsideMap()) {
94 operator++();
95 }
96 }
97}
98
99bool SlidingWindowIterator::dataInsideMap() const
100{

Callers

nothing calls this directly

Calls 1

isDefaultStartIndexMethod · 0.80

Tested by

no test coverage detected