Apollo 11.0
自动驾驶开放平台
path_assessment_decider_util.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 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#include <limits>
18#include <string>
19#include <tuple>
20#include <utility>
21#include <vector>
22
25
26namespace apollo {
27namespace planning {
28
29// PointDecision contains (s, PathPointType, distance to closest obstacle).
30using PathPointDecision = std::tuple<double, PathData::PathPointType, double>;
31constexpr double kMinObstacleArea = 1e-4;
32
34 public:
40 static bool IsValidRegularPath(const ReferenceLineInfo& reference_line_info,
41 const PathData& path_data);
42
43 static bool IsGreatlyOffReferenceLine(const PathData& path_data);
44
45 static bool IsGreatlyOffRoad(const ReferenceLineInfo& reference_line_info,
46 const PathData& path_data);
47
49 const ReferenceLineInfo& reference_line_info, const PathData& path_data);
50
52 const ReferenceLineInfo& reference_line_info, const PathData& path_data);
53
61 static void InitPathPointDecision(
62 const PathData& path_data, const PathData::PathPointType type,
63 std::vector<PathPointDecision>* const path_point_decision);
64
72 static void TrimTailingOutLanePoints(PathData* const path_data);
73};
74
75} // namespace planning
76} // namespace apollo
static bool IsGreatlyOffReferenceLine(const PathData &path_data)
static void InitPathPointDecision(const PathData &path_data, const PathData::PathPointType type, std::vector< PathPointDecision > *const path_point_decision)
Init path_point_decision as type
static bool IsGreatlyOffRoad(const ReferenceLineInfo &reference_line_info, const PathData &path_data)
static bool IsCollidingWithStaticObstacles(const ReferenceLineInfo &reference_line_info, const PathData &path_data)
static void TrimTailingOutLanePoints(PathData *const path_data)
Trim the points at tail of path which away from lane
static bool IsStopOnReverseNeighborLane(const ReferenceLineInfo &reference_line_info, const PathData &path_data)
static bool IsValidRegularPath(const ReferenceLineInfo &reference_line_info, const PathData &path_data)
Check if the generated path is valid
ReferenceLineInfo holds all data for one reference line.
Planning module main class.
std::tuple< double, PathData::PathPointType, double > PathPointDecision
class register implement
Definition arena_queue.h:37