Apollo
11.0
自动驾驶开放平台
speed_limit_decider.h
浏览该文件的文档.
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_msgs/config_msgs/vehicle_config.pb.h"
27
#include "modules/planning/tasks/speed_bounds_decider/proto/speed_bounds_decider.pb.h"
28
#include "
modules/common/status/status.h
"
29
#include "
modules/planning/planning_base/common/obstacle.h
"
30
#include "
modules/planning/planning_base/common/path/path_data.h
"
31
#include "
modules/planning/planning_base/common/speed_limit.h
"
32
#include "
modules/planning/planning_base/reference_line/reference_line.h
"
33
34
namespace
apollo
{
35
namespace
planning
{
36
37
class
SpeedLimitDecider
{
38
public
:
39
SpeedLimitDecider
(
const
SpeedBoundsDeciderConfig
& config,
40
const
ReferenceLine
& reference_line,
41
const
PathData
& path_data);
42
43
virtual
~SpeedLimitDecider
() =
default
;
44
45
virtual
common::Status
GetSpeedLimits
(
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
apollo::common::Status
A general class to denote the return status of an API call.
Definition
status.h:43
apollo::planning::IndexedList
Definition
indexed_list.h:35
apollo::planning::PathData
Definition
path_data.h:36
apollo::planning::ReferenceLine
Definition
reference_line.h:40
apollo::planning::SpeedLimitDecider
Definition
speed_limit_decider.h:37
apollo::planning::SpeedLimitDecider::~SpeedLimitDecider
virtual ~SpeedLimitDecider()=default
apollo::planning::SpeedLimitDecider::GetSpeedLimits
virtual common::Status GetSpeedLimits(const IndexedList< std::string, Obstacle > &obstacles, SpeedLimit *const speed_limit_data) const
Definition
speed_limit_decider.cc:45
apollo::planning::SpeedLimit
Definition
speed_limit.h:29
planning
Planning module main class.
status.h
apollo
class register implement
Definition
arena_queue.h:37
path_data.h
obstacle.h
reference_line.h
speed_limit.h
apollo::common::VehicleParam
Definition
vehicle_config.proto:50
apollo::planning::SpeedBoundsDeciderConfig
Definition
speed_bounds_decider.proto:8
modules
planning
tasks
speed_bounds_decider
speed_limit_decider.h