Apollo  6.0
Open source self driving car software
st_guide_line.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 
21 #pragma once
22 
23 #include <vector>
24 
25 #include "modules/common/configs/proto/vehicle_config.pb.h"
26 #include "modules/common/proto/pnc_point.pb.h"
36 
37 namespace apollo {
38 namespace planning {
39 
40 // TODO(jiacheng): currently implemented a constant velocity model for
41 // guide-line. Upgrade it to a constant acceleration model.
42 class STGuideLine {
43  public:
45 
46  void Init(double desired_v);
47 
48  void Init(double desired_v,
49  const std::vector<common::TrajectoryPoint> &speed_reference);
50 
51  virtual ~STGuideLine() = default;
52 
53  double GetGuideSFromT(double t);
54 
55  void UpdateBlockingInfo(const double t, const double s_block,
56  const bool is_lower_block);
57 
58  private:
59  // Variables for simple guide-line calculation.
60  double t0_;
61  double s0_;
62  double v0_;
63  // St guideline from upstream modules
64  SpeedData guideline_speed_data_;
65 };
66 
67 } // namespace planning
68 } // namespace apollo
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...
STGuideLine()
Definition: st_guide_line.h:44
virtual ~STGuideLine()=default
Definition: st_guide_line.h:42
void UpdateBlockingInfo(const double t, const double s_block, const bool is_lower_block)
double GetGuideSFromT(double t)
void Init(double desired_v)
Definition: speed_data.h:30