Apollo  v5.5.0
Open source self driving car software
impending_collision_edge.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 #pragma once
17 
18 #include <memory>
19 #include <vector>
20 
21 #include "Eigen/Core"
22 
23 namespace apollo {
24 namespace perception {
25 namespace base {
26 
27 struct alignas(16) ImpendingCollisionEdge {
28  // edge id per frame
29  int id = 0;
30 
31  // age of the tracked object
32  double tracking_time = 0.0;
33 
34  // points of the edge
35  std::vector<Eigen::Vector3d> points;
36 };
37 
38 // TODO(all): to remove
39 // typedef std::shared_ptr<ImpendingCollisionEdge> ImpendingCollisionEdgePtr;
40 // typedef std::shared_ptr<const ImpendingCollisionEdge>
41 // ImpendingCollisionEdgeConstPtr;
42 
43 // Sensor single frame objects.
45  double timestamp = 0.0;
46 
47  // edges
48  std::vector<std::shared_ptr<ImpendingCollisionEdge>>
50 
51  // sensor to world position
52  Eigen::Matrix4d sensor2world_pose = Eigen::Matrix4d::Zero();
53 };
54 
55 // TODO(all): to remove
56 // typedef std::shared_ptr<ImpendingCollisionEdges> ImpendingCollisionEdgesPtr;
57 // typedef std::shared_ptr<const ImpendingCollisionEdges>
58 // ImpendingCollisionEdgesConstPtr;
59 
60 } // namespace base
61 } // namespace perception
62 } // namespace apollo
Definition: blob.h:72
std::vector< Eigen::Vector3d > points
Definition: impending_collision_edge.h:35
Definition: impending_collision_edge.h:27
double tracking_time
Definition: impending_collision_edge.h:32
Definition: impending_collision_edge.h:44
std::vector< std::shared_ptr< ImpendingCollisionEdge > > impending_collision_edges
Definition: impending_collision_edge.h:49