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 optimization {
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_odometry_translation_weight(
34  parameter_dictionary->GetDouble("odometry_translation_weight"));
35  options.set_odometry_rotation_weight(
36  parameter_dictionary->GetDouble("odometry_rotation_weight"));
37  options.set_local_slam_pose_translation_weight(
38  parameter_dictionary->GetDouble("local_slam_pose_translation_weight"));
39  options.set_local_slam_pose_rotation_weight(
40  parameter_dictionary->GetDouble("local_slam_pose_rotation_weight"));
41  options.set_fixed_frame_pose_translation_weight(
42  parameter_dictionary->GetDouble("fixed_frame_pose_translation_weight"));
43  options.set_fixed_frame_pose_rotation_weight(
44  parameter_dictionary->GetDouble("fixed_frame_pose_rotation_weight"));
45  options.set_log_solver_summary(
46  parameter_dictionary->GetBool("log_solver_summary"));
47  *options.mutable_ceres_solver_options() =
49  parameter_dictionary->GetDictionary("ceres_solver_options").get());
50  return options;
51 }
52 
53 } // namespace optimization
54 } // namespace mapping
55 } // namespace cartographer
proto::OptimizationProblemOptions CreateOptimizationProblemOptions(common::LuaParameterDictionary *const parameter_dictionary)
std::unique_ptr< LuaParameterDictionary > GetDictionary(const std::string &key)
proto::CeresSolverOptions CreateCeresSolverOptionsProto(common::LuaParameterDictionary *parameter_dictionary)


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