local_trajectory_builder_options_3d.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/3d/local_trajectory_builder_options_3d.h"
00018 
00019 #include "cartographer/mapping/3d/submap_3d.h"
00020 #include "cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.h"
00021 #include "cartographer/mapping/internal/motion_filter.h"
00022 #include "cartographer/mapping/internal/scan_matching/real_time_correlative_scan_matcher.h"
00023 #include "cartographer/sensor/internal/voxel_filter.h"
00024 #include "glog/logging.h"
00025 
00026 namespace cartographer {
00027 namespace mapping {
00028 
00029 proto::LocalTrajectoryBuilderOptions3D CreateLocalTrajectoryBuilderOptions3D(
00030     common::LuaParameterDictionary* parameter_dictionary) {
00031   proto::LocalTrajectoryBuilderOptions3D options;
00032   options.set_min_range(parameter_dictionary->GetDouble("min_range"));
00033   options.set_max_range(parameter_dictionary->GetDouble("max_range"));
00034   options.set_num_accumulated_range_data(
00035       parameter_dictionary->GetInt("num_accumulated_range_data"));
00036   options.set_voxel_filter_size(
00037       parameter_dictionary->GetDouble("voxel_filter_size"));
00038   *options.mutable_high_resolution_adaptive_voxel_filter_options() =
00039       sensor::CreateAdaptiveVoxelFilterOptions(
00040           parameter_dictionary
00041               ->GetDictionary("high_resolution_adaptive_voxel_filter")
00042               .get());
00043   *options.mutable_low_resolution_adaptive_voxel_filter_options() =
00044       sensor::CreateAdaptiveVoxelFilterOptions(
00045           parameter_dictionary
00046               ->GetDictionary("low_resolution_adaptive_voxel_filter")
00047               .get());
00048   options.set_use_online_correlative_scan_matching(
00049       parameter_dictionary->GetBool("use_online_correlative_scan_matching"));
00050   *options.mutable_real_time_correlative_scan_matcher_options() =
00051       mapping::scan_matching::CreateRealTimeCorrelativeScanMatcherOptions(
00052           parameter_dictionary
00053               ->GetDictionary("real_time_correlative_scan_matcher")
00054               .get());
00055   *options.mutable_ceres_scan_matcher_options() =
00056       mapping::scan_matching::CreateCeresScanMatcherOptions3D(
00057           parameter_dictionary->GetDictionary("ceres_scan_matcher").get());
00058   *options.mutable_motion_filter_options() = CreateMotionFilterOptions(
00059       parameter_dictionary->GetDictionary("motion_filter").get());
00060   options.set_imu_gravity_time_constant(
00061       parameter_dictionary->GetDouble("imu_gravity_time_constant"));
00062   options.set_rotational_histogram_size(
00063       parameter_dictionary->GetInt("rotational_histogram_size"));
00064   *options.mutable_submaps_options() = CreateSubmapsOptions3D(
00065       parameter_dictionary->GetDictionary("submaps").get());
00066   return options;
00067 }
00068 
00069 }  // namespace mapping
00070 }  // namespace cartographer


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