Apollo 10.0
自动驾驶开放平台
point.h
浏览该文件的文档.
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 <vector>
22
23namespace apollo {
24namespace perception {
25namespace base {
26
27template <typename T>
28struct alignas(16) Point {
29 T x = 0;
30 T y = 0;
31 T z = 0;
32 T intensity = 0;
33 typedef T Type;
34};
35
36template <typename T>
37struct PointXYZIT : public Point<T> {
38 double timestamp = 0.0;
39};
40
41template <typename T>
42struct PointXYZITH : public PointXYZIT<T> {
43 float height = std::numeric_limits<float>::max();
44};
45
46template <typename T>
47struct PointXYZITHB : public PointXYZITH<T> {
48 int32_t beam_id = -1;
49};
50
51template <typename T>
52struct PointXYZITHBL : public PointXYZITHB<T> {
53 uint8_t label = 0;
54};
55
58
69
70const std::size_t kDefaultReservePointNum = 50000;
71
74
75 std::vector<int> indices;
76
77 typedef std::shared_ptr<PointIndices> Ptr;
78 typedef std::shared_ptr<const PointIndices> ConstPtr;
79};
80
81template <typename T>
82struct Point2D {
83 T x = 0;
84 T y = 0;
85};
86
90
91template <typename T>
92struct Point3D {
93 T x = 0;
94 T y = 0;
95 T z = 0;
96};
97
101
102template <typename T>
103struct alignas(16) RadarPoint {
104 T x = 0;
105 T y = 0;
106 T z = 0;
107 T velocity = 0;
108 T comp_vel = 0;
109 T rcs = 0;
110 typedef T Type;
111};
112
117
118} // namespace base
119} // namespace perception
120} // namespace apollo
PointXYZITH< double > PointXYZITHD
Definition point.h:64
PointXYZITHBL< double > PointXYZITHBLD
Definition point.h:68
PointXYZIT< double > PointXYZITD
Definition point.h:62
Point3D< double > Point3DD
Definition point.h:100
PointXYZITHBL< float > PointXYZITHBLF
Definition point.h:67
PointXYZITHB< double > PointXYZITHBD
Definition point.h:66
RadarPoint< double > RadarPointXYZVRD
Definition point.h:116
PointXYZITH< float > PointXYZITHF
Definition point.h:63
PointXYZIT< float > PointXYZITF
Definition point.h:61
RadarPoint< double > RadarPointD
Definition point.h:114
PointXYZITHB< float > PointXYZITHBF
Definition point.h:65
Point3D< float > Point3DF
Definition point.h:98
Point3D< int > Point3DI
Definition point.h:99
const std::size_t kDefaultReservePointNum
Definition point.h:70
Point2D< double > Point2DD
Definition point.h:89
class register implement
Definition arena_queue.h:37
std::shared_ptr< PointIndices > Ptr
Definition point.h:77
std::shared_ptr< const PointIndices > ConstPtr
Definition point.h:78