16 #include <gtest/gtest.h> 31 map.
add(
"layer", 0.0);
35 for (; !iterator.
isPastEnd(); ++iterator, ++i) {
36 map.
at(
"layer", *iterator) = 1.0;
42 EXPECT_TRUE((map[
"layer"].array() == 1.0f).all());
49 map.
add(
"layer", 0.0);
52 auto& data = map[
"layer"];
54 for (; !iterator.
isPastEnd(); ++iterator, ++i) {
62 EXPECT_TRUE((map[
"layer"].array() == 1.0f).all());
void setGeometry(const Length &length, const double resolution, const Position &position=Position::Zero())
TEST(GridMapIterator, Simple)
float & at(const std::string &layer, const Index &index)
void add(const std::string &layer, const double value=NAN)
const size_t & getLinearIndex() const