Apollo  6.0
Open source self driving car software
object_supplement.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2019 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 
20 #include "Eigen/Core"
21 
22 namespace apollo {
23 namespace perception {
24 namespace benchmark {
25 
26 struct alignas(16) LidarSupplement {
29  LidarSupplement(const LidarSupplement& rhs);
31  void clone(const LidarSupplement& rhs);
32 };
33 
34 typedef std::shared_ptr<LidarSupplement> LidarSupplementPtr;
35 typedef std::shared_ptr<const LidarSupplement> LidarSupplementConstPtr;
36 
37 struct alignas(16) RadarSupplement {
39  ~RadarSupplement();
40  RadarSupplement(const RadarSupplement& rhs);
42  void clone(const RadarSupplement& rhs);
43 
44  // distance
45  float range = 0.0f;
46  // x -> forward, y -> left
47  float angle = 0.0f;
48  float relative_radial_velocity = 0.0f;
49  float relative_tangential_velocity = 0.0f;
50 };
51 
52 typedef std::shared_ptr<RadarSupplement> RadarSupplementPtr;
53 typedef std::shared_ptr<const RadarSupplement> RadarSupplementConstPtr;
54 
55 struct alignas(16) CameraSupplement {
60  void clone(const CameraSupplement& rhs);
61 
62  // upper-left corner: x1, y1
64  // lower-right corner: x2, y2
66 };
67 
68 typedef std::shared_ptr<CameraSupplement> CameraSupplementPtr;
69 typedef std::shared_ptr<const CameraSupplement> CameraSupplementConstPtr;
70 
71 } // namespace benchmark
72 } // namespace perception
73 } // namespace apollo
void clone(const LidarSupplement &rhs)
Definition: object_supplement.h:26
std::shared_ptr< RadarSupplement > RadarSupplementPtr
Definition: object_supplement.h:52
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::shared_ptr< CameraSupplement > CameraSupplementPtr
Definition: object_supplement.h:68
Eigen::Vector2d Vector2d
Definition: base_map_fwd.h:36
Eigen::Vector2d lower_right
Definition: object_supplement.h:65
std::shared_ptr< const LidarSupplement > LidarSupplementConstPtr
Definition: object_supplement.h:35
LidarSupplement & operator=(const LidarSupplement &rhs)
std::shared_ptr< LidarSupplement > LidarSupplementPtr
Definition: object_supplement.h:34
Definition: object_supplement.h:37
Eigen::Vector2d upper_left
Definition: object_supplement.h:63
std::shared_ptr< const CameraSupplement > CameraSupplementConstPtr
Definition: object_supplement.h:69
Definition: object_supplement.h:55
std::shared_ptr< const RadarSupplement > RadarSupplementConstPtr
Definition: object_supplement.h:53