local_trajectory_builder_options_2d.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 
25 namespace cartographer {
26 namespace mapping {
27 
28 proto::LocalTrajectoryBuilderOptions2D CreateLocalTrajectoryBuilderOptions2D(
29  common::LuaParameterDictionary* const parameter_dictionary) {
30  proto::LocalTrajectoryBuilderOptions2D options;
31  options.set_min_range(parameter_dictionary->GetDouble("min_range"));
32  options.set_max_range(parameter_dictionary->GetDouble("max_range"));
33  options.set_min_z(parameter_dictionary->GetDouble("min_z"));
34  options.set_max_z(parameter_dictionary->GetDouble("max_z"));
35  options.set_missing_data_ray_length(
36  parameter_dictionary->GetDouble("missing_data_ray_length"));
37  options.set_num_accumulated_range_data(
38  parameter_dictionary->GetInt("num_accumulated_range_data"));
39  options.set_voxel_filter_size(
40  parameter_dictionary->GetDouble("voxel_filter_size"));
41  options.set_use_online_correlative_scan_matching(
42  parameter_dictionary->GetBool("use_online_correlative_scan_matching"));
43  *options.mutable_adaptive_voxel_filter_options() =
45  parameter_dictionary->GetDictionary("adaptive_voxel_filter").get());
46  *options.mutable_loop_closure_adaptive_voxel_filter_options() =
48  parameter_dictionary
49  ->GetDictionary("loop_closure_adaptive_voxel_filter")
50  .get());
51  *options.mutable_real_time_correlative_scan_matcher_options() =
53  parameter_dictionary
54  ->GetDictionary("real_time_correlative_scan_matcher")
55  .get());
56  *options.mutable_ceres_scan_matcher_options() =
58  parameter_dictionary->GetDictionary("ceres_scan_matcher").get());
59  *options.mutable_motion_filter_options() = mapping::CreateMotionFilterOptions(
60  parameter_dictionary->GetDictionary("motion_filter").get());
61  options.set_imu_gravity_time_constant(
62  parameter_dictionary->GetDouble("imu_gravity_time_constant"));
63  *options.mutable_submaps_options() = CreateSubmapsOptions2D(
64  parameter_dictionary->GetDictionary("submaps").get());
65  options.set_use_imu_data(parameter_dictionary->GetBool("use_imu_data"));
66  return options;
67 }
68 
69 } // namespace mapping
70 } // namespace cartographer
proto::LocalTrajectoryBuilderOptions2D CreateLocalTrajectoryBuilderOptions2D(common::LuaParameterDictionary *const parameter_dictionary)
proto::SubmapsOptions2D CreateSubmapsOptions2D(common::LuaParameterDictionary *const parameter_dictionary)
Definition: submap_2d.cc:35
proto::CeresScanMatcherOptions2D CreateCeresScanMatcherOptions2D(common::LuaParameterDictionary *const parameter_dictionary)
proto::MotionFilterOptions CreateMotionFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)
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)


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