rotational_scan_matcher.h
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 
17 #ifndef CARTOGRAPHER_MAPPING_3D_SCAN_MATCHING_ROTATIONAL_SCAN_MATCHER_H_
18 #define CARTOGRAPHER_MAPPING_3D_SCAN_MATCHING_ROTATIONAL_SCAN_MATCHER_H_
19 
20 #include <vector>
21 
22 #include "Eigen/Geometry"
25 
26 namespace cartographer {
27 namespace mapping_3d {
28 namespace scan_matching {
29 
31  public:
32  explicit RotationalScanMatcher(
33  const std::vector<mapping::TrajectoryNode>& nodes, int histogram_size);
34 
37 
38  // Scores how well a 'point_cloud' can be understood as rotated by certain
39  // 'angles' relative to the 'nodes'. Each angle results in a score between
40  // 0 (worst) and 1 (best).
41  std::vector<float> Match(const sensor::PointCloud& point_cloud,
42  const std::vector<float>& angles) const;
43 
44  private:
45  float MatchHistogram(const Eigen::VectorXf& scan_histogram) const;
46 
47  Eigen::VectorXf histogram_;
48 };
49 
50 } // namespace scan_matching
51 } // namespace mapping_3d
52 } // namespace cartographer
53 
54 #endif // CARTOGRAPHER_MAPPING_3D_SCAN_MATCHING_ROTATIONAL_SCAN_MATCHER_H_
RotationalScanMatcher(const std::vector< mapping::TrajectoryNode > &nodes, int histogram_size)
RotationalScanMatcher & operator=(const RotationalScanMatcher &)=delete
std::vector< Eigen::Vector3f > PointCloud
Definition: point_cloud.h:30
float MatchHistogram(const Eigen::VectorXf &scan_histogram) const
std::vector< float > Match(const sensor::PointCloud &point_cloud, const std::vector< float > &angles) const


cartographer
Author(s):
autogenerated on Mon Jun 10 2019 12:51:39