optimization_problem_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 
20 
21 namespace cartographer {
22 namespace mapping {
23 namespace sparse_pose_graph {
24 
25 proto::OptimizationProblemOptions CreateOptimizationProblemOptions(
26  common::LuaParameterDictionary* const parameter_dictionary) {
27  proto::OptimizationProblemOptions options;
28  options.set_huber_scale(parameter_dictionary->GetDouble("huber_scale"));
29  options.set_acceleration_weight(
30  parameter_dictionary->GetDouble("acceleration_weight"));
31  options.set_rotation_weight(
32  parameter_dictionary->GetDouble("rotation_weight"));
33  options.set_consecutive_scan_translation_penalty_factor(
34  parameter_dictionary->GetDouble(
35  "consecutive_scan_translation_penalty_factor"));
36  options.set_consecutive_scan_rotation_penalty_factor(
37  parameter_dictionary->GetDouble(
38  "consecutive_scan_rotation_penalty_factor"));
39  options.set_log_solver_summary(
40  parameter_dictionary->GetBool("log_solver_summary"));
41  *options.mutable_ceres_solver_options() =
43  parameter_dictionary->GetDictionary("ceres_solver_options").get());
44  return options;
45 }
46 
47 } // namespace sparse_pose_graph
48 } // namespace mapping
49 } // namespace cartographer
proto::OptimizationProblemOptions CreateOptimizationProblemOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::CeresSolverOptions CreateCeresSolverOptionsProto(common::LuaParameterDictionary *parameter_dictionary)
std::unique_ptr< LuaParameterDictionary > GetDictionary(const string &key)


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