ceres_scan_matcher_2d.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_2D_SCAN_MATCHING_CERES_SCAN_MATCHER_2D_H_
00018 #define CARTOGRAPHER_MAPPING_INTERNAL_2D_SCAN_MATCHING_CERES_SCAN_MATCHER_2D_H_
00019 
00020 #include <memory>
00021 #include <vector>
00022 
00023 #include "Eigen/Core"
00024 #include "cartographer/common/lua_parameter_dictionary.h"
00025 #include "cartographer/mapping/2d/grid_2d.h"
00026 #include "cartographer/mapping/proto/scan_matching/ceres_scan_matcher_options_2d.pb.h"
00027 #include "cartographer/sensor/point_cloud.h"
00028 #include "ceres/ceres.h"
00029 
00030 namespace cartographer {
00031 namespace mapping {
00032 namespace scan_matching {
00033 
00034 proto::CeresScanMatcherOptions2D CreateCeresScanMatcherOptions2D(
00035     common::LuaParameterDictionary* parameter_dictionary);
00036 
00037 // Align scans with an existing map using Ceres.
00038 class CeresScanMatcher2D {
00039  public:
00040   explicit CeresScanMatcher2D(const proto::CeresScanMatcherOptions2D& options);
00041   virtual ~CeresScanMatcher2D();
00042 
00043   CeresScanMatcher2D(const CeresScanMatcher2D&) = delete;
00044   CeresScanMatcher2D& operator=(const CeresScanMatcher2D&) = delete;
00045 
00046   // Aligns 'point_cloud' within the 'grid' given an
00047   // 'initial_pose_estimate' and returns a 'pose_estimate' and the solver
00048   // 'summary'.
00049   void Match(const Eigen::Vector2d& target_translation,
00050              const transform::Rigid2d& initial_pose_estimate,
00051              const sensor::PointCloud& point_cloud, const Grid2D& grid,
00052              transform::Rigid2d* pose_estimate,
00053              ceres::Solver::Summary* summary) const;
00054 
00055  private:
00056   const proto::CeresScanMatcherOptions2D options_;
00057   ceres::Solver::Options ceres_solver_options_;
00058 };
00059 
00060 }  // namespace scan_matching
00061 }  // namespace mapping
00062 }  // namespace cartographer
00063 
00064 #endif  // CARTOGRAPHER_MAPPING_INTERNAL_2D_SCAN_MATCHING_CERES_SCAN_MATCHER_2D_H_


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