Apollo 10.0
自动驾驶开放平台
lane_object.h
浏览该文件的文档.
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
17#pragma once
18
19#include <limits>
20#include <vector>
21
22#include "Eigen/Eigen"
23
25
26namespace apollo {
27namespace perception {
28
29constexpr float kMaxFloat = std::numeric_limits<float>::max();
30constexpr float kLowestFloat = -std::numeric_limits<float>::max();
31constexpr float kMinAngle = kLowestFloat / 180.0f;
32constexpr float kFloatEpsilon = 0.000001f; // should be changed
33
34constexpr float k45DegreeInRadian = static_cast<float>(45.0f * M_PI) / 180.0f;
35
36// required number of points for lane line to determine the CIPV
37constexpr uint32_t kMinLaneLineLengthForCIPV = 2;
38// Average width of lane
39constexpr float kAverageLaneWidthInMeter = 3.7f;
40// Maximum vehicle width
41constexpr float kMaxVehicleWidthInMeter = 1.87f;
42// Margin from a virtual car lane to actual lane
43constexpr float kMarginVehicleToLane =
45// The width of virtual egolane when there is only one lane line
48
49// The width of virtual egolane when there is only one lane line
51
52typedef Eigen::Vector2i Point2Di;
53typedef Eigen::Vector2f Point2Df;
54typedef Eigen::Vector2d Point2Dd;
55
56// This should be from lane detector
58 LaneLineSimple() { line_point.reserve(100); }
59 int type; // solid, broken, double, zigzag, boundary, implicit
60 int color; // yellow, white
61 // eastl::fixed_vector<Point2Df, MAX_LANE_LINE_POINT> line_point;
63};
64
65// Line segment by two points
69
70 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
71};
72
76
77 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
78};
79
80// two lane lines used for camera calibration
85
86} // namespace perception
87} // namespace apollo
std::vector< EigenType, Eigen::aligned_allocator< EigenType > > EigenVector
Definition eigen_defs.h:33
constexpr float kMinAngle
Definition lane_object.h:31
constexpr float kMaxVehicleWidthInMeter
Definition lane_object.h:41
constexpr float kMaxFloat
Definition lane_object.h:29
constexpr float kFloatEpsilon
Definition lane_object.h:32
constexpr float k45DegreeInRadian
Definition lane_object.h:34
Eigen::Vector2d Point2Dd
Definition lane_object.h:54
constexpr float kLowestFloat
Definition lane_object.h:30
constexpr float kAverageLaneWidthInMeter
Definition lane_object.h:39
constexpr float kHalfVehicleWidthInMeter
Definition lane_object.h:50
Eigen::Vector2f Point2Df
Definition lane_object.h:53
constexpr uint32_t kMinLaneLineLengthForCIPV
Definition lane_object.h:37
constexpr float kSingleVirtualEgolaneWidthInMeter
Definition lane_object.h:46
constexpr float kMarginVehicleToLane
Definition lane_object.h:43
Eigen::Vector2i Point2Di
Definition lane_object.h:52
class register implement
Definition arena_queue.h:37
apollo::common::EigenVector< Point2Df > line_point
Definition lane_object.h:62