mapping_2d/local_trajectory_builder_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 
24 
25 namespace cartographer {
26 namespace mapping_2d {
27 
28 proto::LocalTrajectoryBuilderOptions CreateLocalTrajectoryBuilderOptions(
29  common::LuaParameterDictionary* const parameter_dictionary) {
30  proto::LocalTrajectoryBuilderOptions 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_voxel_filter_size(
38  parameter_dictionary->GetDouble("voxel_filter_size"));
39  options.set_use_online_correlative_scan_matching(
40  parameter_dictionary->GetBool("use_online_correlative_scan_matching"));
41  *options.mutable_adaptive_voxel_filter_options() =
43  parameter_dictionary->GetDictionary("adaptive_voxel_filter").get());
44  *options.mutable_real_time_correlative_scan_matcher_options() =
46  parameter_dictionary
47  ->GetDictionary("real_time_correlative_scan_matcher")
48  .get());
49  *options.mutable_ceres_scan_matcher_options() =
51  parameter_dictionary->GetDictionary("ceres_scan_matcher").get());
52  *options.mutable_motion_filter_options() =
54  parameter_dictionary->GetDictionary("motion_filter").get());
55  options.set_imu_gravity_time_constant(
56  parameter_dictionary->GetDouble("imu_gravity_time_constant"));
57  options.set_num_odometry_states(
58  parameter_dictionary->GetNonNegativeInt("num_odometry_states"));
59  CHECK_GT(options.num_odometry_states(), 0);
60  *options.mutable_submaps_options() = CreateSubmapsOptions(
61  parameter_dictionary->GetDictionary("submaps").get());
62  options.set_use_imu_data(parameter_dictionary->GetBool("use_imu_data"));
63  return options;
64 }
65 
66 } // namespace mapping_2d
67 } // namespace cartographer
proto::SubmapsOptions CreateSubmapsOptions(common::LuaParameterDictionary *const parameter_dictionary)
Definition: 2d/submaps.cc:87
proto::RealTimeCorrelativeScanMatcherOptions CreateRealTimeCorrelativeScanMatcherOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::CeresScanMatcherOptions CreateCeresScanMatcherOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::LocalTrajectoryBuilderOptions CreateLocalTrajectoryBuilderOptions(common::LuaParameterDictionary *const parameter_dictionary)
proto::AdaptiveVoxelFilterOptions CreateAdaptiveVoxelFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)
std::unique_ptr< LuaParameterDictionary > GetDictionary(const string &key)
proto::MotionFilterOptions CreateMotionFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)


cartographer
Author(s):
autogenerated on Wed Jun 5 2019 21:57:58