Apollo  6.0
Open source self driving car software
creep_decider.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 
25 #include "cyber/common/macros.h"
30 
31 namespace apollo {
32 namespace planning {
33 
34 class CreepDecider : public Decider {
35  public:
36  CreepDecider(const TaskConfig& config,
37  const std::shared_ptr<DependencyInjector>& injector);
38 
40  Frame* frame, ReferenceLineInfo* reference_line_info) override;
41 
42  bool CheckCreepDone(const Frame& frame,
43  const ReferenceLineInfo& reference_line_info,
44  const double stop_sign_overlap_end_s,
45  const double wait_time_sec, const double timeout_sec);
46 
47  double FindCreepDistance(const Frame& frame,
48  const ReferenceLineInfo& reference_line_info);
49 
50  private:
51  static constexpr const char* CREEP_VO_ID_PREFIX = "CREEP_";
52  common::TrajectoryPoint adc_planning_start_point_;
53  hdmap::Lane curr_lane_;
54 };
55 
56 } // namespace planning
57 } // namespace apollo
double FindCreepDistance(const Frame &frame, const ReferenceLineInfo &reference_line_info)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Planning module main class. It processes GPS and IMU as input, to generate planning info...
apollo::common::Status Process(Frame *frame, ReferenceLineInfo *reference_line_info) override
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
Definition: creep_decider.h:34
Definition: decider.h:32
bool CheckCreepDone(const Frame &frame, const ReferenceLineInfo &reference_line_info, const double stop_sign_overlap_end_s, const double wait_time_sec, const double timeout_sec)
CreepDecider(const TaskConfig &config, const std::shared_ptr< DependencyInjector > &injector)
A general class to denote the return status of an API call. It can either be an OK status for success...
Definition: status.h:43