Apollo  6.0
Open source self driving car software
preprocess_points.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 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 /*
18  * Copyright 2018-2019 Autoware Foundation. All rights reserved.
19  *
20  * Licensed under the Apache License, Version 2.0 (the "License");
21  * you may not use this file except in compliance with the License.
22  * You may obtain a copy of the License at
23  *
24  * http://www.apache.org/licenses/LICENSE-2.0
25  *
26  * Unless required by applicable law or agreed to in writing, software
27  * distributed under the License is distributed on an "AS IS" BASIS,
28  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29  * See the License for the specific language governing permissions and
30  * limitations under the License.
31  */
32 
40 #pragma once
41 
42 namespace apollo {
43 namespace perception {
44 namespace lidar {
45 
47  private:
48  friend class TestClass;
49  const int max_num_pillars_;
50  const int max_num_points_per_pillar_;
51  const int num_point_feature_;
52  const int grid_x_size_;
53  const int grid_y_size_;
54  const int grid_z_size_;
55  const float pillar_x_size_;
56  const float pillar_y_size_;
57  const float pillar_z_size_;
58  const float min_x_range_;
59  const float min_y_range_;
60  const float min_z_range_;
61  const int num_inds_for_scan_;
62 
63  public:
81  PreprocessPoints(const int max_num_pillars, const int max_points_per_pillar,
82  const int num_point_feature, const int grid_x_size,
83  const int grid_y_size, const int grid_z_size,
84  const float pillar_x_size, const float pillar_y_size,
85  const float pillar_z_size, const float min_x_range,
86  const float min_y_range, const float min_z_range,
87  const int num_inds_for_scan);
88 
104  void Preprocess(const float* in_points_array, int in_num_points, int* x_coors,
105  int* y_coors, float* num_points_per_pillar,
106  float* pillar_point_feature, float* pillar_coors,
107  float* sparse_pillar_map, int* host_pillar_count);
108 
119  void InitializeVariables(int* coor_to_pillaridx, float* sparse_pillar_map,
120  float* pillar_point_feature, float* pillar_coors);
121 };
122 
123 } // namespace lidar
124 } // namespace perception
125 } // namespace apollo
PreprocessPoints(const int max_num_pillars, const int max_points_per_pillar, const int num_point_feature, const int grid_x_size, const int grid_y_size, const int grid_z_size, const float pillar_x_size, const float pillar_y_size, const float pillar_z_size, const float min_x_range, const float min_y_range, const float min_z_range, const int num_inds_for_scan)
Constructor.
Definition: preprocess_points.h:46
void InitializeVariables(int *coor_to_pillaridx, float *sparse_pillar_map, float *pillar_point_feature, float *pillar_coors)
Initializing variables for preprocessing.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
friend class TestClass
Definition: preprocess_points.h:48
void Preprocess(const float *in_points_array, int in_num_points, int *x_coors, int *y_coors, float *num_points_per_pillar, float *pillar_point_feature, float *pillar_coors, float *sparse_pillar_map, int *host_pillar_count)
CPU preprocessing for input pointcloud.