Apollo 10.0
自动驾驶开放平台
frame_supplement.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#pragma once
17
18#include <memory>
19
24
25namespace apollo {
26namespace perception {
27namespace base {
28// sensor-specific frame supplements: Lidar, Radar, Camera
29struct alignas(16) LidarFrameSupplement {
30 // @brief valid only when on_use = true
31 bool on_use = false;
32
33 // @brief only reference of the original cloud in lidar coordinate system
34 std::shared_ptr<AttributePointCloud<PointF>> cloud_ptr;
35
36 void Reset() {
37 on_use = false;
38 cloud_ptr = nullptr;
39 }
40};
41
42typedef std::shared_ptr<LidarFrameSupplement> LidarFrameSupplementPtr;
43typedef std::shared_ptr<const LidarFrameSupplement>
45
46struct alignas(16) RadarFrameSupplement {
47 // @brief valid only when on_use = true
48 bool on_use = false;
49 void Reset() { on_use = false; }
50};
51typedef std::shared_ptr<RadarFrameSupplement> RadarFrameSupplementPtr;
52typedef std::shared_ptr<const RadarFrameSupplement>
54
55struct alignas(16) CameraFrameSupplement {
56 // @brief valid only when on_use = true
57 bool on_use = false;
58
59 // @brief only reference of the image data
61
62 // TODO(guiyilin): modify interfaces of visualizer, use Image8U
63 std::shared_ptr<Blob<uint8_t>> image_blob = nullptr;
64
65 void Reset() {
66 on_use = false;
67 image_ptr = nullptr;
68 image_blob = nullptr;
69 }
70};
71
72typedef std::shared_ptr<CameraFrameSupplement> CameraFrameSupplementPtr;
73typedef std::shared_ptr<const CameraFrameSupplement>
75
76struct alignas(16) UltrasonicFrameSupplement {
77 // @brief valid only when on_use = true
78 bool on_use = false;
79
80 // @brief only reference of the image data
81 std::shared_ptr<ImpendingCollisionEdges> impending_collision_edges_ptr;
82
83 void Reset() {
84 on_use = false;
86 }
87};
88
89typedef std::shared_ptr<UltrasonicFrameSupplement> UltrasonicFrameSupplementPtr;
90typedef std::shared_ptr<const UltrasonicFrameSupplement>
92
93} // namespace base
94} // namespace perception
95} // namespace apollo
std::shared_ptr< LidarFrameSupplement > LidarFrameSupplementPtr
std::shared_ptr< const RadarFrameSupplement > RadarFrameSupplementConstPtr
std::shared_ptr< Image8U > Image8UPtr
Definition image_8u.h:148
std::shared_ptr< const LidarFrameSupplement > LidarFrameSupplementConstPtr
std::shared_ptr< const CameraFrameSupplement > CameraFrameSupplementConstPtr
std::shared_ptr< const UltrasonicFrameSupplement > UltrasonicFrameSupplementConstPtr
std::shared_ptr< UltrasonicFrameSupplement > UltrasonicFrameSupplementPtr
std::shared_ptr< RadarFrameSupplement > RadarFrameSupplementPtr
std::shared_ptr< CameraFrameSupplement > CameraFrameSupplementPtr
class register implement
Definition arena_queue.h:37
std::shared_ptr< Blob< uint8_t > > image_blob
std::shared_ptr< AttributePointCloud< PointF > > cloud_ptr
std::shared_ptr< ImpendingCollisionEdges > impending_collision_edges_ptr