From 3b941ee126b20b0fcd5c2d973f96729b3c49b3bb Mon Sep 17 00:00:00 2001 From: damienrg Date: Fri, 8 Mar 2019 15:36:30 +0100 Subject: [PATCH] Add `collate_by_trajectory` support in lua config (#1334) This commit add support of specifying the option to collate data by trajectory introduced in #828 in the lua configuration files. The value is set to false as when a boolean option is not specified it is initialized to false. --- cartographer/mapping/map_builder.cc | 2 ++ configuration_files/map_builder.lua | 1 + 2 files changed, 3 insertions(+) diff --git a/cartographer/mapping/map_builder.cc b/cartographer/mapping/map_builder.cc index 895b453..331ee6e 100644 --- a/cartographer/mapping/map_builder.cc +++ b/cartographer/mapping/map_builder.cc @@ -82,6 +82,8 @@ proto::MapBuilderOptions CreateMapBuilderOptions( parameter_dictionary->GetBool("use_trajectory_builder_3d")); options.set_num_background_threads( parameter_dictionary->GetNonNegativeInt("num_background_threads")); + options.set_collate_by_trajectory( + parameter_dictionary->GetBool("collate_by_trajectory")); *options.mutable_pose_graph_options() = CreatePoseGraphOptions( parameter_dictionary->GetDictionary("pose_graph").get()); CHECK_NE(options.use_trajectory_builder_2d(), diff --git a/configuration_files/map_builder.lua b/configuration_files/map_builder.lua index 8a4a6c0..3f5479c 100644 --- a/configuration_files/map_builder.lua +++ b/configuration_files/map_builder.lua @@ -19,4 +19,5 @@ MAP_BUILDER = { use_trajectory_builder_3d = false, num_background_threads = 4, pose_graph = POSE_GRAPH, + collate_by_trajectory = false, }