mapping_3d/local_trajectory_builder_options.cc
Go to the documentation of this file.
1 /*
2  * Copyright 2016 The Cartographer Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
25 #include "glog/logging.h"
26 
27 namespace cartographer {
28 namespace mapping_3d {
29 
30 proto::LocalTrajectoryBuilderOptions CreateLocalTrajectoryBuilderOptions(
31  common::LuaParameterDictionary* const parameter_dictionary) {
32  proto::LocalTrajectoryBuilderOptions options;
33  options.set_min_range(parameter_dictionary->GetDouble("min_range"));
34  options.set_max_range(parameter_dictionary->GetDouble("max_range"));
35  options.set_scans_per_accumulation(
36  parameter_dictionary->GetInt("scans_per_accumulation"));
37  options.set_voxel_filter_size(
38  parameter_dictionary->GetDouble("voxel_filter_size"));
39  *options.mutable_high_resolution_adaptive_voxel_filter_options() =
41  parameter_dictionary
42  ->GetDictionary("high_resolution_adaptive_voxel_filter")
43  .get());
44  *options.mutable_low_resolution_adaptive_voxel_filter_options() =
46  parameter_dictionary
47  ->GetDictionary("low_resolution_adaptive_voxel_filter")
48  .get());
49  *options.mutable_ceres_scan_matcher_options() =
51  parameter_dictionary->GetDictionary("ceres_scan_matcher").get());
52  *options.mutable_motion_filter_options() = CreateMotionFilterOptions(
53  parameter_dictionary->GetDictionary("motion_filter").get());
54  *options.mutable_submaps_options() = mapping_3d::CreateSubmapsOptions(
55  parameter_dictionary->GetDictionary("submaps").get());
56  *options.mutable_kalman_local_trajectory_builder_options() =
58  parameter_dictionary->GetDictionary("kalman_local_trajectory_builder")
59  .get());
60  *options.mutable_optimizing_local_trajectory_builder_options() =
62  parameter_dictionary
63  ->GetDictionary("optimizing_local_trajectory_builder")
64  .get());
65  const string use_string = parameter_dictionary->GetString("use");
66  proto::LocalTrajectoryBuilderOptions::Use use;
67  CHECK(proto::LocalTrajectoryBuilderOptions::Use_Parse(use_string, &use))
68  << "Unknown local_trajectory_builder kind: " << use_string;
69  options.set_use(use);
70  return options;
71 }
72 
73 } // namespace mapping_3d
74 } // namespace cartographer
proto::KalmanLocalTrajectoryBuilderOptions CreateKalmanLocalTrajectoryBuilderOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::SubmapsOptions CreateSubmapsOptions(common::LuaParameterDictionary *parameter_dictionary)
Definition: 3d/submaps.cc:306
proto::CeresScanMatcherOptions CreateCeresScanMatcherOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::LocalTrajectoryBuilderOptions CreateLocalTrajectoryBuilderOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::AdaptiveVoxelFilterOptions CreateAdaptiveVoxelFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)
std::unique_ptr< LuaParameterDictionary > GetDictionary(const string &key)
proto::MotionFilterOptions CreateMotionFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::OptimizingLocalTrajectoryBuilderOptions CreateOptimizingLocalTrajectoryBuilderOptions(common::LuaParameterDictionary *const parameter_dictionary)


cartographer
Author(s):
autogenerated on Mon Jun 10 2019 12:51:38