Apollo  6.0
Open source self driving car software
speed_limit_decider.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 <string>
24 #include <vector>
25 
26 #include "modules/common/configs/proto/vehicle_config.pb.h"
31 #include "modules/planning/proto/task_config.pb.h"
33 
34 namespace apollo {
35 namespace planning {
36 
38  public:
39  SpeedLimitDecider(const SpeedBoundsDeciderConfig& config,
40  const ReferenceLine& reference_line,
41  const PathData& path_data);
42 
43  virtual ~SpeedLimitDecider() = default;
44 
46  const IndexedList<std::string, Obstacle>& obstacles,
47  SpeedLimit* const speed_limit_data) const;
48 
49  private:
50  FRIEND_TEST(SpeedLimitDeciderTest, get_centric_acc_limit);
51  double GetCentricAccLimit(const double kappa) const;
52 
53  void GetAvgKappa(const std::vector<common::PathPoint>& path_points,
54  std::vector<double>* kappa) const;
55 
56  private:
57  const SpeedBoundsDeciderConfig& speed_bounds_config_;
58  const ReferenceLine& reference_line_;
59  const PathData& path_data_;
60  const apollo::common::VehicleParam& vehicle_param_;
61 };
62 
63 } // namespace planning
64 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
virtual common::Status GetSpeedLimits(const IndexedList< std::string, Obstacle > &obstacles, SpeedLimit *const speed_limit_data) const
Definition: speed_limit_decider.h:37
Planning module main class. It processes GPS and IMU as input, to generate planning info...
Definition: path_data.h:36
Definition: speed_limit.h:29
Definition: reference_line.h:39
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
SpeedLimitDecider(const SpeedBoundsDeciderConfig &config, const ReferenceLine &reference_line, const PathData &path_data)