SpiralIteratorTest.cpp
Go to the documentation of this file.
1 /*
2  * SpiralIteratorTest.cpp
3  *
4  * Created on: Jul 26, 2017
5  * Author: Benjamin Scholz
6  * Institute: University of Hamburg, TAMS
7  */
8 
11 
12 // Eigen
13 #include <Eigen/Core>
14 
15 // gtest
16 #include <gtest/gtest.h>
17 
18 // Limits
19 #include <cfloat>
20 
21 // Vector
22 #include <vector>
23 
24 using namespace std;
25 using namespace Eigen;
26 using namespace grid_map;
27 
28 TEST(SpiralIterator, CenterOutOfMap)
29 {
30  GridMap map( { "types" });
31  map.setGeometry(Length(8.0, 5.0), 1.0, Position(0.0, 0.0));
32  Position center(8.0, 0.0);
33  double radius = 5.0;
34 
35  SpiralIterator iterator(map, center, radius);
36 
37  Position iterator_position;
38  map.getPosition(*iterator, iterator_position);
39 
40  EXPECT_TRUE(map.isInside(iterator_position));
41 }
void setGeometry(const Length &length, const double resolution, const Position &position=Position::Zero())
Definition: GridMap.cpp:51
Eigen::Vector2d Position
Definition: TypeDefs.hpp:18
TEST(SpiralIterator, CenterOutOfMap)
Eigen::Array2d Length
Definition: TypeDefs.hpp:24


grid_map_core
Author(s): Péter Fankhauser
autogenerated on Tue Jun 25 2019 20:02:08