Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 }
00057 }
00058 }