optimization_problem_options.cc
Go to the documentation of this file.
00001 /*
00002  * Copyright 2016 The Cartographer Authors
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #include "cartographer/mapping/internal/optimization/optimization_problem_options.h"
00018 
00019 #include "cartographer/common/ceres_solver_options.h"
00020 
00021 namespace cartographer {
00022 namespace mapping {
00023 namespace optimization {
00024 
00025 proto::OptimizationProblemOptions CreateOptimizationProblemOptions(
00026     common::LuaParameterDictionary* const parameter_dictionary) {
00027   proto::OptimizationProblemOptions options;
00028   options.set_huber_scale(parameter_dictionary->GetDouble("huber_scale"));
00029   options.set_acceleration_weight(
00030       parameter_dictionary->GetDouble("acceleration_weight"));
00031   options.set_rotation_weight(
00032       parameter_dictionary->GetDouble("rotation_weight"));
00033   options.set_odometry_translation_weight(
00034       parameter_dictionary->GetDouble("odometry_translation_weight"));
00035   options.set_odometry_rotation_weight(
00036       parameter_dictionary->GetDouble("odometry_rotation_weight"));
00037   options.set_local_slam_pose_translation_weight(
00038       parameter_dictionary->GetDouble("local_slam_pose_translation_weight"));
00039   options.set_local_slam_pose_rotation_weight(
00040       parameter_dictionary->GetDouble("local_slam_pose_rotation_weight"));
00041   options.set_fixed_frame_pose_translation_weight(
00042       parameter_dictionary->GetDouble("fixed_frame_pose_translation_weight"));
00043   options.set_fixed_frame_pose_rotation_weight(
00044       parameter_dictionary->GetDouble("fixed_frame_pose_rotation_weight"));
00045   options.set_log_solver_summary(
00046       parameter_dictionary->GetBool("log_solver_summary"));
00047   options.set_use_online_imu_extrinsics_in_3d(
00048       parameter_dictionary->GetBool("use_online_imu_extrinsics_in_3d"));
00049   options.set_fix_z_in_3d(parameter_dictionary->GetBool("fix_z_in_3d"));
00050   *options.mutable_ceres_solver_options() =
00051       common::CreateCeresSolverOptionsProto(
00052           parameter_dictionary->GetDictionary("ceres_solver_options").get());
00053   return options;
00054 }
00055 
00056 }  // namespace optimization
00057 }  // namespace mapping
00058 }  // namespace cartographer


cartographer
Author(s): The Cartographer Authors
autogenerated on Thu May 9 2019 02:27:35