Apollo  6.0
Open source self driving car software
lane_struct.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 <vector>
19 
21 
22 namespace apollo {
23 namespace perception {
24 namespace base {
25 
26 enum class LaneLineType {
27  WHITE_DASHED = 0,
31 };
32 
35  CURB_LEFT = -5,
36  FOURTH_LEFT = -4,
37  THIRD_LEFT = -3,
38  ADJACENT_LEFT = -2,
39  EGO_LEFT = -1,
40  EGO_CENTER = 0,
41  EGO_RIGHT = 1,
42  ADJACENT_RIGHT = 2,
43  THIRD_RIGHT = 3,
44  FOURTH_RIGHT = 4,
45  CURB_RIGHT = 5,
46  OTHER = 6,
47  UNKNOWN = 7
48 };
49 
50 // Definition of the use type of a lane mark in lane adjustment
51 enum class LaneLineUseType { REAL = 0, VIRTUAL };
52 
53 // y = a*x^3 + b*x^2 + c*x + d
55  float x_start;
56  float x_end;
57  float a;
58  float b;
59  float c;
60  float d;
61 };
62 
63 // end points for localization
64 struct EndPoints {
67 };
68 
69 struct LaneLine {
72  // @brief image coordinate system
74  // @brief camera coordinate system
76  // @brief image coordinate system
78  // @brief curve image point set
79  std::vector<Point2DF> curve_image_point_set;
80  // @brief curve camera point set
81  std::vector<Point3DF> curve_camera_point_set;
82  // @brief curve car coord point set, only on XY plane
83  std::vector<Point2DF> curve_car_coord_point_set;
84  // @brief image end point set
85  std::vector<EndPoints> image_end_point_set;
86  // @brief track id
87  int track_id = -1;
88  // @brief confidence for lane line
89  float confidence = 1.0f;
90 
92 };
93 
94 } // namespace base
95 } // namespace perception
96 } // namespace apollo
Definition: lane_struct.h:69
LaneLineUseType use_type
Definition: lane_struct.h:91
float b
Definition: lane_struct.h:58
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::vector< EndPoints > image_end_point_set
Definition: lane_struct.h:85
float x_start
Definition: lane_struct.h:55
Point2DF end
Definition: lane_struct.h:66
LaneLineType
Definition: lane_struct.h:26
std::vector< Point2DF > curve_image_point_set
Definition: lane_struct.h:79
float d
Definition: lane_struct.h:60
LaneLinePositionType
Definition of the position of a lane marking in respect to the ego lane.
Definition: lane_struct.h:34
Point2DF start
Definition: lane_struct.h:65
float x_end
Definition: lane_struct.h:56
lane marking on the left side next to ego lane
float c
Definition: lane_struct.h:59
std::vector< Point3DF > curve_camera_point_set
Definition: lane_struct.h:81
LaneLineCubicCurve curve_camera_coord
Definition: lane_struct.h:75
LaneLineCubicCurve curve_car_coord
Definition: lane_struct.h:73
std::vector< Point2DF > curve_car_coord_point_set
Definition: lane_struct.h:83
LaneLineType type
Definition: lane_struct.h:70
Definition: lane_struct.h:64
float a
Definition: lane_struct.h:57
LaneLineCubicCurve curve_image_coord
Definition: lane_struct.h:77
LaneLineUseType
Definition: lane_struct.h:51
center lane marking of the ego lane, changing lane
LaneLinePositionType pos_type
Definition: lane_struct.h:71
lane marking on the right side next to ego lane