SpiralIteratorTest.cpp
Go to the documentation of this file.
00001 /*
00002  * SpiralIteratorTest.cpp
00003  *
00004  *  Created on: Jul 26, 2017
00005  *      Author: Benjamin Scholz
00006  *       Institute: University of Hamburg, TAMS
00007  */
00008 
00009 #include "grid_map_core/iterators/SpiralIterator.hpp"
00010 #include "grid_map_core/GridMap.hpp"
00011 
00012 // Eigen
00013 #include <Eigen/Core>
00014 
00015 // gtest
00016 #include <gtest/gtest.h>
00017 
00018 // Limits
00019 #include <cfloat>
00020 
00021 // Vector
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 }


grid_map_core
Author(s): P├ęter Fankhauser
autogenerated on Mon Oct 9 2017 03:09:16