point_cloud.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_POINT_CLOUD_H_
18 #define CARTOGRAPHER_SENSOR_POINT_CLOUD_H_
19 
20 #include <vector>
21 
22 #include "Eigen/Core"
23 #include "cartographer/sensor/proto/sensor.pb.h"
25 #include "glog/logging.h"
26 
27 namespace cartographer {
28 namespace sensor {
29 
30 typedef std::vector<Eigen::Vector3f> PointCloud;
31 
33  PointCloud points;
34  std::vector<float> intensities;
35 };
36 
37 // Transforms 'point_cloud' according to 'transform'.
38 PointCloud TransformPointCloud(const PointCloud& point_cloud,
39  const transform::Rigid3f& transform);
40 
41 // Returns a new point cloud without points that fall outside the region defined
42 // by 'min_z' and 'max_z'.
43 PointCloud Crop(const PointCloud& point_cloud, float min_z, float max_z);
44 
45 // Converts 'point_cloud' to a proto::PointCloud.
46 proto::PointCloud ToProto(const PointCloud& point_cloud);
47 
48 // Converts 'proto' to a PointCloud.
49 PointCloud ToPointCloud(const proto::PointCloud& proto);
50 
51 } // namespace sensor
52 } // namespace cartographer
53 
54 #endif // CARTOGRAPHER_SENSOR_POINT_CLOUD_H_
PointCloud TransformPointCloud(const PointCloud &point_cloud, const transform::Rigid3f &transform)
Definition: point_cloud.cc:25
PointCloud Crop(const PointCloud &point_cloud, const float min_z, const float max_z)
Definition: point_cloud.cc:35
int max_z
Definition: 3d/submaps.cc:41
int min_z
Definition: 3d/submaps.cc:40
proto::PointCloud ToProto(const PointCloud &point_cloud)
Definition: point_cloud.cc:46
std::vector< Eigen::Vector3f > PointCloud
Definition: point_cloud.h:30
PointCloud ToPointCloud(const proto::PointCloud &proto)
Definition: point_cloud.cc:56


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