Repository navigation
Conversation
| @@ -0,0 +1,135 @@ | |||
| /* | |||
| * LineIterator.hpp | |||
There was a problem hiding this comment.
TraverslGridLineIterator and author etc
| * Iterator class to iterate over a line in the map. | ||
| * Based on Bresenham Line Drawing algorithm. | ||
| */ | ||
| class TraversalGridLineIterator |
There was a problem hiding this comment.
why not deriving the class from the LineIterator Class? i guess most of the member functions are the same?
| #include "grid_map_core/iterators/EllipseIterator.hpp" | ||
| #include "grid_map_core/iterators/SpiralIterator.hpp" | ||
| #include "grid_map_core/iterators/LineIterator.hpp" | ||
| #include "grid_map_core/iterators/TraversalGridLineIterator.hpp" |
There was a problem hiding this comment.
maybe a different name? pretty unclear what this iterator is by that name...
| const double eps = 1e-9; | ||
| Vector direction = (end - start).normalized(); | ||
| Position newStart = start + eps * direction; |
|
|
||
| /*! | ||
| * Iterator class to iterate over a line in the map. | ||
| * Based on Bresenham Line Drawing algorithm. |
There was a problem hiding this comment.
Is this still based on the Bresenham Line algo? Probably not.
| return index_; | ||
| } | ||
|
|
||
| TraversalGridLineIterator & TraversalGridLineIterator::operator++() |
There was a problem hiding this comment.
How does this differ from the normal iterator? We check here based on the world coordinates and not on the indexes, but how does this effect the line? Do we now skip small intersections of cells due to this sampling based approach?
There was a problem hiding this comment.
may show/test here the difference between normal line and this line iterator. Not to clear to me where the difference lies.
|
Also, need to update the inputs of the iterator such that it matches the format of other iterators, i.e. it must use the index instead of the position. |
Add COLCON_IGNORE file to grid_map_demos to not build it by default
remove grid_map_demos from metapackage
6c4545f to
900fe1e
Compare
Add slightly modified LineIterator for maxheight calculation in vis cleanup