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 constraints {
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.set_min_score(parameter_dictionary->GetDouble("min_score"));
36  options.set_global_localization_min_score(
37  parameter_dictionary->GetDouble("global_localization_min_score"));
38  options.set_loop_closure_translation_weight(
39  parameter_dictionary->GetDouble("loop_closure_translation_weight"));
40  options.set_loop_closure_rotation_weight(
41  parameter_dictionary->GetDouble("loop_closure_rotation_weight"));
42  options.set_log_matches(parameter_dictionary->GetBool("log_matches"));
43  *options.mutable_fast_correlative_scan_matcher_options() =
45  parameter_dictionary->GetDictionary("fast_correlative_scan_matcher")
46  .get());
47  *options.mutable_ceres_scan_matcher_options() =
49  parameter_dictionary->GetDictionary("ceres_scan_matcher").get());
50  *options.mutable_fast_correlative_scan_matcher_options_3d() =
52  parameter_dictionary
53  ->GetDictionary("fast_correlative_scan_matcher_3d")
54  .get());
55  *options.mutable_ceres_scan_matcher_options_3d() =
57  parameter_dictionary->GetDictionary("ceres_scan_matcher_3d").get());
58  return options;
59 }
60 
61 } // namespace constraints
62 } // namespace mapping
63 } // namespace cartographer
proto::FastCorrelativeScanMatcherOptions2D CreateFastCorrelativeScanMatcherOptions2D(common::LuaParameterDictionary *const parameter_dictionary)
proto::CeresScanMatcherOptions3D CreateCeresScanMatcherOptions3D(common::LuaParameterDictionary *const parameter_dictionary)
proto::CeresScanMatcherOptions2D CreateCeresScanMatcherOptions2D(common::LuaParameterDictionary *const parameter_dictionary)
proto::ConstraintBuilderOptions CreateConstraintBuilderOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::FastCorrelativeScanMatcherOptions3D CreateFastCorrelativeScanMatcherOptions3D(common::LuaParameterDictionary *const parameter_dictionary)
std::unique_ptr< LuaParameterDictionary > GetDictionary(const std::string &key)


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:58