local_trajectory_builder_options_3d.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 #include "glog/logging.h"
25 
26 namespace cartographer {
27 namespace mapping {
28 
29 proto::LocalTrajectoryBuilderOptions3D CreateLocalTrajectoryBuilderOptions3D(
30  common::LuaParameterDictionary* parameter_dictionary) {
31  proto::LocalTrajectoryBuilderOptions3D options;
32  options.set_min_range(parameter_dictionary->GetDouble("min_range"));
33  options.set_max_range(parameter_dictionary->GetDouble("max_range"));
34  options.set_num_accumulated_range_data(
35  parameter_dictionary->GetInt("num_accumulated_range_data"));
36  options.set_voxel_filter_size(
37  parameter_dictionary->GetDouble("voxel_filter_size"));
38  *options.mutable_high_resolution_adaptive_voxel_filter_options() =
40  parameter_dictionary
41  ->GetDictionary("high_resolution_adaptive_voxel_filter")
42  .get());
43  *options.mutable_low_resolution_adaptive_voxel_filter_options() =
45  parameter_dictionary
46  ->GetDictionary("low_resolution_adaptive_voxel_filter")
47  .get());
48  options.set_use_online_correlative_scan_matching(
49  parameter_dictionary->GetBool("use_online_correlative_scan_matching"));
50  *options.mutable_real_time_correlative_scan_matcher_options() =
52  parameter_dictionary
53  ->GetDictionary("real_time_correlative_scan_matcher")
54  .get());
55  *options.mutable_ceres_scan_matcher_options() =
57  parameter_dictionary->GetDictionary("ceres_scan_matcher").get());
58  *options.mutable_motion_filter_options() = CreateMotionFilterOptions(
59  parameter_dictionary->GetDictionary("motion_filter").get());
60  options.set_imu_gravity_time_constant(
61  parameter_dictionary->GetDouble("imu_gravity_time_constant"));
62  options.set_rotational_histogram_size(
63  parameter_dictionary->GetInt("rotational_histogram_size"));
64  *options.mutable_submaps_options() = CreateSubmapsOptions3D(
65  parameter_dictionary->GetDictionary("submaps").get());
66  return options;
67 }
68 
69 } // namespace mapping
70 } // namespace cartographer
proto::CeresScanMatcherOptions3D CreateCeresScanMatcherOptions3D(common::LuaParameterDictionary *const parameter_dictionary)
proto::MotionFilterOptions CreateMotionFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::SubmapsOptions3D CreateSubmapsOptions3D(common::LuaParameterDictionary *parameter_dictionary)
Definition: submap_3d.cc:181
proto::AdaptiveVoxelFilterOptions CreateAdaptiveVoxelFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::RealTimeCorrelativeScanMatcherOptions CreateRealTimeCorrelativeScanMatcherOptions(common::LuaParameterDictionary *const parameter_dictionary)
std::unique_ptr< LuaParameterDictionary > GetDictionary(const std::string &key)
proto::LocalTrajectoryBuilderOptions3D CreateLocalTrajectoryBuilderOptions3D(common::LuaParameterDictionary *parameter_dictionary)


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