26 #include "gmock/gmock.h" 29 namespace mapping_2d {
32 TEST(SubmapsTest, TheRightNumberOfScansAreInserted) {
33 constexpr
int kNumRangeData = 10;
39 std::to_string(kNumRangeData) +
41 "output_debug_images = false, " 42 "range_data_inserter = {" 43 "insert_free_space = true, " 44 "hit_probability = 0.53, " 45 "miss_probability = 0.495, " 49 for (
int i = 0; i != 1000; ++i) {
50 submaps.InsertRangeData({Eigen::Vector3f::Zero(), {}, {}});
51 const int matching = submaps.matching_index();
54 EXPECT_LE(kNumRangeData, submaps.Get(matching)->num_range_data());
57 for (
int i = 0; i != submaps.size() - 2; ++i) {
59 EXPECT_EQ(kNumRangeData * 2, submaps.Get(i)->num_range_data());
std::unique_ptr< LuaParameterDictionary > MakeDictionary(const string &code)
proto::SubmapsOptions CreateSubmapsOptions(common::LuaParameterDictionary *const parameter_dictionary)