voxel_filter.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_SENSOR_VOXEL_FILTER_H_
18 #define CARTOGRAPHER_SENSOR_VOXEL_FILTER_H_
19 
23 #include "cartographer/sensor/proto/adaptive_voxel_filter_options.pb.h"
24 
25 namespace cartographer {
26 namespace sensor {
27 
28 // Returns a voxel filtered copy of 'point_cloud' where 'size' is the length
29 // a voxel edge.
30 PointCloud VoxelFiltered(const PointCloud& point_cloud, float size);
31 
32 // Voxel filter for point clouds. For each voxel, the assembled point cloud
33 // contains the first point that fell into it from any of the inserted point
34 // clouds.
35 class VoxelFilter {
36  public:
37  // 'size' is the length of a voxel edge.
38  explicit VoxelFilter(float size);
39 
40  VoxelFilter(const VoxelFilter&) = delete;
41  VoxelFilter& operator=(const VoxelFilter&) = delete;
42 
43  // Inserts a point cloud into the voxel filter.
45 
46  // Returns the filtered point cloud representing the occupied voxels.
47  const PointCloud& point_cloud() const;
48 
49  private:
52 };
53 
54 proto::AdaptiveVoxelFilterOptions CreateAdaptiveVoxelFilterOptions(
55  common::LuaParameterDictionary* const parameter_dictionary);
56 
58  public:
59  explicit AdaptiveVoxelFilter(
60  const proto::AdaptiveVoxelFilterOptions& options);
61 
64 
65  PointCloud Filter(const PointCloud& point_cloud) const;
66 
67  private:
68  const proto::AdaptiveVoxelFilterOptions options_;
69 };
70 
71 } // namespace sensor
72 } // namespace cartographer
73 
74 #endif // CARTOGRAPHER_SENSOR_VOXEL_FILTER_H_
const PointCloud & point_cloud() const
Definition: voxel_filter.cc:98
PointCloud VoxelFiltered(const PointCloud &point_cloud, const float size)
Definition: voxel_filter.cc:80
void InsertPointCloud(const PointCloud &point_cloud)
Definition: voxel_filter.cc:88
std::vector< Eigen::Vector3f > PointCloud
Definition: point_cloud.h:30
VoxelFilter & operator=(const VoxelFilter &)=delete
proto::AdaptiveVoxelFilterOptions CreateAdaptiveVoxelFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)
const proto::AdaptiveVoxelFilterOptions options_
Definition: voxel_filter.h:68
mapping_3d::HybridGridBase< uint8 > voxels_
Definition: voxel_filter.h:50


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