Apollo  6.0
Open source self driving car software
reference_line_smoother.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2017 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/planning/proto/reference_line_smoother_config.pb.h"
27 
28 namespace apollo {
29 namespace planning {
30 
31 struct AnchorPoint {
32  common::PathPoint path_point;
33  double lateral_bound = 0.0;
34  double longitudinal_bound = 0.0;
35  // enforce smoother to strictly follow this reference point
36  bool enforced = false;
37 };
38 
40  public:
41  explicit ReferenceLineSmoother(const ReferenceLineSmootherConfig& config)
42  : config_(config) {}
43 
47  virtual void SetAnchorPoints(
48  const std::vector<AnchorPoint>& achor_points) = 0;
49 
53  virtual bool Smooth(const ReferenceLine&, ReferenceLine* const) = 0;
54 
55  virtual ~ReferenceLineSmoother() = default;
56 
57  protected:
58  ReferenceLineSmootherConfig config_;
59 };
60 
61 } // namespace planning
62 } // namespace apollo
bool enforced
Definition: reference_line_smoother.h:36
ReferenceLineSmoother(const ReferenceLineSmootherConfig &config)
Definition: reference_line_smoother.h:41
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...
common::PathPoint path_point
Definition: reference_line_smoother.h:32
Definition: reference_line_smoother.h:31
ReferenceLineSmootherConfig config_
Definition: reference_line_smoother.h:58
double longitudinal_bound
Definition: reference_line_smoother.h:34
Definition: reference_line.h:39
Definition: reference_line_smoother.h:39
double lateral_bound
Definition: reference_line_smoother.h:33