Apollo  6.0
Open source self driving car software
point_cloud_util.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 The Apollo Authors. All Rights Reserved.
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 #pragma once
18 
19 #include <limits>
20 #include <memory>
21 #include <utility>
22 #include <vector>
23 
24 #include "Eigen/Dense"
25 
28 
29 namespace apollo {
30 namespace perception {
31 namespace base {
32 
33 struct BoundingCube {
34  float x; // center of box
35  float y; // center of box
36  float z; // center of box
37  float length;
38  float width;
39  float height;
40  float yaw;
41  float trans_x; // center of points
42  float trans_y; // center of points
43  float trans_z; // center of points
44 };
45 
47  base::PointFCloudPtr out_cloud_ptr,
48  int downsample_factor);
49 
51  const int& min_num_points = 5,
52  const bool& verbose = false);
53 
55 
57 
58 double OrientCloud(const PointFCloud& pc, PointFCloud* pc_out, bool demean);
59 
60 } // namespace base
61 } // namespace perception
62 } // namespace apollo
bool GetPointCloudMinareaBbox(const base::PointFCloud &pc, BoundingCube *box, const int &min_num_points=5, const bool &verbose=false)
float trans_y
Definition: point_cloud_util.h:42
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: point.h:28
double OrientCloud(const PointFCloud &pc, PointFCloud *pc_out, bool demean)
bool DownSamplePointCloudBeams(base::PointFCloudPtr cloud_ptr, base::PointFCloudPtr out_cloud_ptr, int downsample_factor)
float x
Definition: point_cloud_util.h:34
float height
Definition: point_cloud_util.h:39
void CloudDemean(base::PointFCloudPtr cloud)
std::shared_ptr< const PointFCloud > PointFCloudConstPtr
Definition: point_cloud.h:483
void GetPointCloudCentroid(base::PointFCloudConstPtr cloud, PointF *centroid)
float y
Definition: point_cloud_util.h:35
float width
Definition: point_cloud_util.h:38
std::shared_ptr< PointFCloud > PointFCloudPtr
Definition: point_cloud.h:482
float trans_x
Definition: point_cloud_util.h:41
float z
Definition: point_cloud_util.h:36
float yaw
Definition: point_cloud_util.h:40
float trans_z
Definition: point_cloud_util.h:43
float length
Definition: point_cloud_util.h:37
Definition: point_cloud_util.h:33