ceres_scan_matcher_3d.h
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 #ifndef CARTOGRAPHER_MAPPING_INTERNAL_3D_SCAN_MATCHING_CERES_SCAN_MATCHER_3D_H_
00018 #define CARTOGRAPHER_MAPPING_INTERNAL_3D_SCAN_MATCHING_CERES_SCAN_MATCHER_3D_H_
00019 
00020 #include <utility>
00021 #include <vector>
00022 
00023 #include "Eigen/Core"
00024 #include "cartographer/common/lua_parameter_dictionary.h"
00025 #include "cartographer/mapping/3d/hybrid_grid.h"
00026 #include "cartographer/mapping/proto/scan_matching/ceres_scan_matcher_options_3d.pb.h"
00027 #include "cartographer/sensor/point_cloud.h"
00028 #include "cartographer/transform/rigid_transform.h"
00029 
00030 namespace cartographer {
00031 namespace mapping {
00032 namespace scan_matching {
00033 
00034 proto::CeresScanMatcherOptions3D CreateCeresScanMatcherOptions3D(
00035     common::LuaParameterDictionary* parameter_dictionary);
00036 
00037 using PointCloudAndHybridGridPointers =
00038     std::pair<const sensor::PointCloud*, const HybridGrid*>;
00039 
00040 // This scan matcher uses Ceres to align scans with an existing map.
00041 class CeresScanMatcher3D {
00042  public:
00043   explicit CeresScanMatcher3D(const proto::CeresScanMatcherOptions3D& options);
00044 
00045   CeresScanMatcher3D(const CeresScanMatcher3D&) = delete;
00046   CeresScanMatcher3D& operator=(const CeresScanMatcher3D&) = delete;
00047 
00048   // Aligns 'point_clouds' within the 'hybrid_grids' given an
00049   // 'initial_pose_estimate' and returns a 'pose_estimate' and the solver
00050   // 'summary'.
00051   void Match(const Eigen::Vector3d& target_translation,
00052              const transform::Rigid3d& initial_pose_estimate,
00053              const std::vector<PointCloudAndHybridGridPointers>&
00054                  point_clouds_and_hybrid_grids,
00055              transform::Rigid3d* pose_estimate,
00056              ceres::Solver::Summary* summary);
00057 
00058  private:
00059   const proto::CeresScanMatcherOptions3D options_;
00060   ceres::Solver::Options ceres_solver_options_;
00061 };
00062 
00063 }  // namespace scan_matching
00064 }  // namespace mapping
00065 }  // namespace cartographer
00066 
00067 #endif  // CARTOGRAPHER_MAPPING_INTERNAL_3D_SCAN_MATCHING_CERES_SCAN_MATCHER_3D_H_


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