Apollo  6.0
Open source self driving car software
util.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 
17 #pragma once
18 
19 #include <string>
20 
24 
25 namespace apollo {
26 namespace planning {
27 namespace scenario {
28 namespace util {
29 
31  UNKNOWN = 0,
34  PARK_FAIL = 3,
36 };
37 
39  const ReferenceLineInfo& reference_line_info, const std::string& overlap_id,
40  const ReferenceLineInfo::OverlapType& overlap_type);
41 
43  const common::VehicleStateProvider* vehicle_state_provider,
44  const ReferenceLineInfo& reference_line_info,
45  const ScenarioPullOverConfig& scenario_config,
46  const PlanningContext* planning_context);
47 
49  const ReferenceLineInfo& reference_line_info,
50  const ScenarioPullOverConfig& scenario_config,
51  const common::PathPoint& path_point,
52  const PlanningContext* planning_context);
53 
54 bool CheckPullOverPositionBySL(const ReferenceLineInfo& reference_line_info,
55  const ScenarioPullOverConfig& scenario_config,
56  const common::math::Vec2d& adc_position,
57  const double adc_theta,
58  const common::math::Vec2d& target_position,
59  const double target_theta, const bool check_s);
60 
62  const common::VehicleStateProvider* vehicle_state_provider, Frame* frame,
63  const ScenarioParkAndGoConfig& scenario_config);
64 
65 bool CheckADCSurroundObstacles(const common::math::Vec2d adc_position,
66  const double adc_heading, Frame* frame,
67  const double front_obstacle_buffer);
68 
69 bool CheckADCHeading(const common::math::Vec2d adc_position,
70  const double adc_heading,
71  const ReferenceLineInfo& reference_line_info,
72  const double heading_buffer);
73 
74 } // namespace util
75 } // namespace scenario
76 } // namespace planning
77 } // namespace apollo
Definition: path.h:91
hdmap::PathOverlap * GetOverlapOnReferenceLine(const ReferenceLineInfo &reference_line_info, const std::string &overlap_id, const ReferenceLineInfo::OverlapType &overlap_type)
Definition: planning_context.h:33
The class of vehicle state. It includes basic information and computation about the state of the vehi...
Definition: vehicle_state_provider.h:46
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
PullOverStatus
Definition: util.h:30
Planning module main class. It processes GPS and IMU as input, to generate planning info...
Frame holds all data for one planning cycle.
Definition: frame.h:61
ReferenceLineInfo holds all data for one reference line.
Definition: reference_line_info.h:54
bool CheckADCHeading(const common::math::Vec2d adc_position, const double adc_heading, const ReferenceLineInfo &reference_line_info, const double heading_buffer)
Implements a class of 2-dimensional vectors.
Definition: vec2d.h:42
PullOverStatus CheckADCPullOver(const common::VehicleStateProvider *vehicle_state_provider, const ReferenceLineInfo &reference_line_info, const ScenarioPullOverConfig &scenario_config, const PlanningContext *planning_context)
bool CheckADCSurroundObstacles(const common::math::Vec2d adc_position, const double adc_heading, Frame *frame, const double front_obstacle_buffer)
PullOverStatus CheckADCPullOverPathPoint(const ReferenceLineInfo &reference_line_info, const ScenarioPullOverConfig &scenario_config, const common::PathPoint &path_point, const PlanningContext *planning_context)
bool CheckADCReadyToCruise(const common::VehicleStateProvider *vehicle_state_provider, Frame *frame, const ScenarioParkAndGoConfig &scenario_config)
bool CheckPullOverPositionBySL(const ReferenceLineInfo &reference_line_info, const ScenarioPullOverConfig &scenario_config, const common::math::Vec2d &adc_position, const double adc_theta, const common::math::Vec2d &target_position, const double target_theta, const bool check_s)
OverlapType
Definition: reference_line_info.h:222