Apollo  6.0
Open source self driving car software
stage_pre_stop.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 
21 #pragma once
22 
23 #include <memory>
24 #include <string>
25 #include <unordered_map>
26 #include <vector>
27 
28 #include "modules/planning/proto/planning_config.pb.h"
31 
32 namespace apollo {
33 namespace planning {
34 namespace scenario {
35 namespace stop_sign {
36 
37 struct StopSignUnprotectedContext;
38 
40  public:
42  const ScenarioConfig::StageConfig& config,
43  const std::shared_ptr<DependencyInjector>& injector)
44  : Stage(config, injector) {}
45 
46  private:
47  Stage::StageStatus Process(const common::TrajectoryPoint& planning_init_point,
48  Frame* frame) override;
49 
50  StopSignUnprotectedContext* GetContext() {
51  return GetContextAs<StopSignUnprotectedContext>();
52  }
53 
54  int AddWatchVehicle(const Obstacle& obstacle,
55  std::unordered_map<std::string, std::vector<std::string>>*
56  watch_vehicles);
57 
58  bool CheckADCStop(const double adc_front_edge_s, const double stop_line_s);
59 
60  private:
61  Stage::StageStatus FinishStage();
62 
63  private:
64  ScenarioStopSignUnprotectedConfig scenario_config_;
65 };
66 
67 } // namespace stop_sign
68 } // namespace scenario
69 } // namespace planning
70 } // namespace apollo
This is the class that associates an Obstacle with its path properties. An obstacle&#39;s path properties...
Definition: obstacle.h:60
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
StopSignUnprotectedStagePreStop(const ScenarioConfig::StageConfig &config, const std::shared_ptr< DependencyInjector > &injector)
Definition: stage_pre_stop.h:41
Planning module main class. It processes GPS and IMU as input, to generate planning info...
const ScenarioConfig::StageConfig & config() const
Definition: stage.h:52
Definition: stop_sign_unprotected_scenario.h:40
Frame holds all data for one planning cycle.
Definition: frame.h:61
StageStatus
Definition: stage.h:40
Definition: stage.h:38