ellipse_iterator.hpp
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include <Eigen/Core>
8 
9 // unique_ptr
10 #include <memory>
11 #include "../iterators/submap_iterator.hpp"
12 #include "../cost_map.hpp"
13 
14 namespace cost_map {
15 
21 {
22 public:
23 
31  EllipseIterator(const CostMap& gridMap, const Position& center, const Length& length, const double rotation = 0.0);
32 
39 
44  bool operator !=(const EllipseIterator& other) const;
45 
50  const Index& operator *() const;
51 
57 
62  bool isPastEnd() const;
63 
64 private:
65 
70  bool isInside() const;
71 
80  void findSubmapParameters(const Position& center, const Length& length, const double rotation,
81  Index& startIndex, Size& bufferSize) const;
82 
85 
87  Eigen::Array2d semiAxisSquare_;
88 
90  Eigen::Matrix2d transformMatrix_;
91 
93  std::shared_ptr<SubmapIterator> internalIterator_;
94 
98  double resolution_;
101 };
102 
103 } /* namespace */
void findSubmapParameters(const Position &center, const Length &length, const double rotation, Index &startIndex, Size &bufferSize) const
EllipseIterator(const CostMap &gridMap, const Position &center, const Length &length, const double rotation=0.0)
Position center_
Position of the circle center;.
Length mapLength_
Map information needed to get position from iterator.
grid_map::Size Size
Definition: common.hpp:46
Eigen::Matrix2d transformMatrix_
Sine and cosine values of the rotation angle as transformation matrix.
Eigen::Array2d semiAxisSquare_
Square length of the semi axis.
grid_map::Index Index
Definition: common.hpp:45
std::shared_ptr< SubmapIterator > internalIterator_
Grid submap iterator. // TODO Think of using unique_ptr instead.
grid_map::Position Position
Definition: common.hpp:41
grid_map::Length Length
Definition: common.hpp:47
bool operator!=(const EllipseIterator &other) const
EllipseIterator & operator=(const EllipseIterator &other)


cost_map_core
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:03:41