Class SlidingWindowIterator
Defined in File SlidingWindowIterator.hpp
Inheritance Relationships
Base Type
public grid_map::GridMapIterator
(Class GridMapIterator)
Class Documentation
-
class SlidingWindowIterator : public grid_map::GridMapIterator
Iterator class to iterate trough the entire grid map with access to a layer’s data through a sliding window. Note: This iterator only works with maps with zero start index.
Public Types
Public Functions
-
SlidingWindowIterator(const GridMap &gridMap, const std::string &layer, const EdgeHandling &edgeHandling = EdgeHandling::CROP, const size_t windowSize = 3)
Constructor.
- Parameters:
gridMap – the grid map to iterate on.
layer – the layer on which the data is accessed.
edgeHandling – the method to handle edges of the map.
windowSize – the size of the moving window in number of cells (has to be an odd number!).
-
explicit SlidingWindowIterator(const SlidingWindowIterator *other)
Copy constructor.
- Parameters:
other – the object to copy.
-
void setWindowLength(const GridMap &gridMap, const double windowLength)
Set the side length of the moving window (in m).
- Parameters:
gridMap – the grid map to iterate on.
windowLength – the side length of the window (in m).
-
virtual SlidingWindowIterator &operator++()
Increase the iterator to the next element.
- Returns:
a reference to the updated iterator.
-
SlidingWindowIterator(const GridMap &gridMap, const std::string &layer, const EdgeHandling &edgeHandling = EdgeHandling::CROP, const size_t windowSize = 3)