sparse_pose_graph/constraint_builder.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 
24 
25 namespace cartographer {
26 namespace mapping {
27 namespace sparse_pose_graph {
28 
29 proto::ConstraintBuilderOptions CreateConstraintBuilderOptions(
30  common::LuaParameterDictionary* const parameter_dictionary) {
31  proto::ConstraintBuilderOptions options;
32  options.set_sampling_ratio(parameter_dictionary->GetDouble("sampling_ratio"));
33  options.set_max_constraint_distance(
34  parameter_dictionary->GetDouble("max_constraint_distance"));
35  *options.mutable_adaptive_voxel_filter_options() =
37  parameter_dictionary->GetDictionary("adaptive_voxel_filter").get());
38  options.set_min_score(parameter_dictionary->GetDouble("min_score"));
39  options.set_global_localization_min_score(
40  parameter_dictionary->GetDouble("global_localization_min_score"));
41  options.set_loop_closure_translation_weight(
42  parameter_dictionary->GetDouble("loop_closure_translation_weight"));
43  options.set_loop_closure_rotation_weight(
44  parameter_dictionary->GetDouble("loop_closure_rotation_weight"));
45  options.set_log_matches(parameter_dictionary->GetBool("log_matches"));
46  *options.mutable_fast_correlative_scan_matcher_options() =
48  parameter_dictionary->GetDictionary("fast_correlative_scan_matcher")
49  .get());
50  *options.mutable_ceres_scan_matcher_options() =
52  parameter_dictionary->GetDictionary("ceres_scan_matcher").get());
53  *options.mutable_fast_correlative_scan_matcher_options_3d() =
55  parameter_dictionary
56  ->GetDictionary("fast_correlative_scan_matcher_3d")
57  .get());
58  *options.mutable_ceres_scan_matcher_options_3d() =
60  parameter_dictionary->GetDictionary("ceres_scan_matcher_3d").get());
61  return options;
62 }
63 
64 } // namespace sparse_pose_graph
65 } // namespace mapping
66 } // namespace cartographer
proto::FastCorrelativeScanMatcherOptions CreateFastCorrelativeScanMatcherOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::CeresScanMatcherOptions CreateCeresScanMatcherOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::CeresScanMatcherOptions CreateCeresScanMatcherOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::AdaptiveVoxelFilterOptions CreateAdaptiveVoxelFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::FastCorrelativeScanMatcherOptions CreateFastCorrelativeScanMatcherOptions(common::LuaParameterDictionary *const parameter_dictionary)
std::unique_ptr< LuaParameterDictionary > GetDictionary(const string &key)
proto::ConstraintBuilderOptions CreateConstraintBuilderOptions(common::LuaParameterDictionary *const parameter_dictionary)


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