Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "grid_map_core/iterators/SpiralIterator.hpp"
00010 #include "grid_map_core/GridMap.hpp"
00011
00012
00013 #include <Eigen/Core>
00014
00015
00016 #include <gtest/gtest.h>
00017
00018
00019 #include <cfloat>
00020
00021
00022 #include <vector>
00023
00024 using namespace std;
00025 using namespace Eigen;
00026 using namespace grid_map;
00027
00028 TEST(SpiralIterator, CenterOutOfMap)
00029 {
00030 GridMap map( { "types" });
00031 map.setGeometry(Length(8.0, 5.0), 1.0, Position(0.0, 0.0));
00032 Position center(8.0, 0.0);
00033 double radius = 5.0;
00034
00035 SpiralIterator iterator(map, center, radius);
00036
00037 Position iterator_position;
00038 map.getPosition(*iterator, iterator_position);
00039
00040 EXPECT_TRUE(map.isInside(iterator_position));
00041 }