Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
a76c8d3b
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a76c8d3b
编写于
10月 15, 2018
作者:
J
jmtao
提交者:
Liangliang Zhang
10月 15, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: add a decider to add virtual stop fence for stop sign
上级
ddaeba9b
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
137 addition
and
399 deletion
+137
-399
modules/planning/conf/scenario_stop_sign_unprotected_config.pb.txt
...lanning/conf/scenario_stop_sign_unprotected_config.pb.txt
+4
-370
modules/planning/proto/decider_config.proto
modules/planning/proto/decider_config.proto
+5
-0
modules/planning/proto/planning_config.proto
modules/planning/proto/planning_config.proto
+2
-0
modules/planning/scenarios/lane_follow/lane_follow_scenario_test.cc
...anning/scenarios/lane_follow/lane_follow_scenario_test.cc
+1
-1
modules/planning/scenarios/side_pass/side_pass_scenario_test.cc
...s/planning/scenarios/side_pass/side_pass_scenario_test.cc
+1
-1
modules/planning/scenarios/stop_sign_unprotected/stop_sign_unprotected_test.cc
...arios/stop_sign_unprotected/stop_sign_unprotected_test.cc
+1
-1
modules/planning/toolkits/deciders/BUILD
modules/planning/toolkits/deciders/BUILD
+2
-2
modules/planning/toolkits/deciders/decider.h
modules/planning/toolkits/deciders/decider.h
+0
-3
modules/planning/toolkits/deciders/decider_creep.cc
modules/planning/toolkits/deciders/decider_creep.cc
+0
-3
modules/planning/toolkits/deciders/decider_stop_sign.cc
modules/planning/toolkits/deciders/decider_stop_sign.cc
+110
-0
modules/planning/toolkits/deciders/decider_stop_sign.h
modules/planning/toolkits/deciders/decider_stop_sign.h
+11
-18
未找到文件。
modules/planning/conf/scenario_stop_sign_unprotected_config.pb.txt
浏览文件 @
a76c8d3b
...
...
@@ -7,6 +7,7 @@ stage_type: STOP_SIGN_UNPROTECTED_INTERSECTION_CRUISE
stage_config: {
stage_type: STOP_SIGN_UNPROTECTED_PRE_STOP
enabled : true
task_type: DECIDER_STOP_SIGN
task_type: DP_POLY_PATH_OPTIMIZER
task_type: PATH_DECIDER
task_type: DP_ST_SPEED_OPTIMIZER
...
...
@@ -197,372 +198,14 @@ stage_config: {
stage_config: {
stage_type: STOP_SIGN_UNPROTECTED_STOP
enabled : true
task_type: DP_POLY_PATH_OPTIMIZER
task_type: PATH_DECIDER
task_type: DP_ST_SPEED_OPTIMIZER
task_type: SPEED_DECIDER
task_type: QP_SPLINE_ST_SPEED_OPTIMIZER
task_config : {
task_type : DP_POLY_PATH_OPTIMIZER
dp_poly_path_config {
waypoint_sampler_config {
sample_points_num_each_level: 7
step_length_max: 40.0
step_length_min: 20.0
lateral_sample_offset: 0.5
lateral_adjust_coeff: 0.5
sidepass_distance: 2.8
navigator_sample_num_each_level: 3
}
eval_time_interval: 0.1
path_resolution: 1.0
obstacle_ignore_distance: 20.0
obstacle_collision_distance: 0.5
obstacle_risk_distance: 2.0
obstacle_collision_cost: 1e8
path_l_cost: 6.5
path_dl_cost: 8e3
path_ddl_cost: 5e1
path_l_cost_param_l0: 1.50
path_l_cost_param_b: 0.40
path_l_cost_param_k: 1.5
path_out_lane_cost: 1e8
path_end_l_cost: 1.0e4
}
}
task_config : {
task_type : PATH_DECIDER
}
task_config : {
task_type : DP_ST_SPEED_OPTIMIZER
dp_st_speed_config {
total_path_length: 149
total_time: 7.0
matrix_dimension_s: 150
matrix_dimension_t: 8
speed_weight: 0.0
accel_weight: 10.0
jerk_weight: 10.0
obstacle_weight: 1.0
reference_weight: 0.0
go_down_buffer: 5.0
go_up_buffer: 5.0
default_obstacle_cost: 1e3
default_speed_cost: 1.0e3
exceed_speed_penalty: 10.0
low_speed_penalty: 10.0
keep_clear_low_speed_penalty: 10.0
accel_penalty: 1.0
decel_penalty: 1.0
positive_jerk_coeff: 1.0
negative_jerk_coeff: 1.0
max_acceleration: 3.0
max_deceleration: -4.0
st_boundary_config {
boundary_buffer: 0.1
high_speed_centric_acceleration_limit: 0.8
low_speed_centric_acceleration_limit: 1.2
high_speed_threshold: 12.58
low_speed_threshold: 7.5
minimal_kappa: 0.00001
point_extension: 1.0
lowest_speed: 2.5
num_points_to_avg_kappa: 2
static_obs_nudge_speed_ratio: 0.6
dynamic_obs_nudge_speed_ratio: 0.8
centri_jerk_speed_coeff: 1.0
}
}
}
task_config : {
task_type : SPEED_DECIDER
dp_st_speed_config {
total_path_length: 149
total_time: 7.0
matrix_dimension_s: 150
matrix_dimension_t: 8
speed_weight: 0.0
accel_weight: 10.0
jerk_weight: 10.0
obstacle_weight: 1.0
reference_weight: 0.0
go_down_buffer: 5.0
go_up_buffer: 5.0
default_obstacle_cost: 1e3
default_speed_cost: 1.0e3
exceed_speed_penalty: 10.0
low_speed_penalty: 10.0
keep_clear_low_speed_penalty: 10.0
accel_penalty: 1.0
decel_penalty: 1.0
positive_jerk_coeff: 1.0
negative_jerk_coeff: 1.0
max_acceleration: 3.0
max_deceleration: -4.0
st_boundary_config {
boundary_buffer: 0.1
high_speed_centric_acceleration_limit: 0.8
low_speed_centric_acceleration_limit: 1.2
high_speed_threshold: 12.58
low_speed_threshold: 7.5
minimal_kappa: 0.00001
point_extension: 1.0
lowest_speed: 2.5
num_points_to_avg_kappa: 2
static_obs_nudge_speed_ratio: 0.6
dynamic_obs_nudge_speed_ratio: 0.8
centri_jerk_speed_coeff: 1.0
}
}
}
task_config : {
task_type : QP_SPLINE_ST_SPEED_OPTIMIZER
qp_st_speed_config {
total_path_length: 250.0
total_time: 7.0
preferred_max_acceleration: 2.5
preferred_min_deceleration: -3.3
max_acceleration: 3.0
min_deceleration: -4.0
qp_spline_config {
number_of_discrete_graph_t: 4
spline_order: 5
speed_kernel_weight: 0.0
accel_kernel_weight: 1000.0
jerk_kernel_weight: 1000.0
follow_weight: 5.0
stop_weight: 0.2
cruise_weight: 0.3
regularization_weight: 0.1
follow_drag_distance: 17.0
dp_st_reference_weight: 0.0
init_jerk_kernel_weight: 5e4
yield_weight: 1e2
yield_drag_distance: 20.0
}
qp_piecewise_config {
number_of_evaluated_graph_t: 40
accel_kernel_weight: 1000.0
jerk_kernel_weight: 100.0
follow_weight: 5.0
stop_weight: 0.2
cruise_weight: 0.5
regularization_weight: 0.1
follow_drag_distance: 17.0
}
st_boundary_config {
boundary_buffer: 0.1
high_speed_centric_acceleration_limit: 0.8
low_speed_centric_acceleration_limit: 1.2
high_speed_threshold: 12.58
low_speed_threshold: 7.5
minimal_kappa: 0.00001
point_extension: 1.0
lowest_speed: 2.5
num_points_to_avg_kappa: 2
static_obs_nudge_speed_ratio: 0.6
dynamic_obs_nudge_speed_ratio: 0.8
centri_jerk_speed_coeff: 1.0
}
}
}
task_config : {
task_type : DECIDER_CREEP
decider_creep_config : {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
min_boundary_t: 6.0
}
}
task_type: DECIDER_STOP_SIGN
}
stage_config: {
stage_type: STOP_SIGN_UNPROTECTED_CREEP
enabled : true
task_type: DP_POLY_PATH_OPTIMIZER
task_type: PATH_DECIDER
task_type: DP_ST_SPEED_OPTIMIZER
task_type: SPEED_DECIDER
task_type: QP_SPLINE_ST_SPEED_OPTIMIZER
task_config : {
task_type : DP_POLY_PATH_OPTIMIZER
dp_poly_path_config {
waypoint_sampler_config {
sample_points_num_each_level: 7
step_length_max: 40.0
step_length_min: 20.0
lateral_sample_offset: 0.5
lateral_adjust_coeff: 0.5
sidepass_distance: 2.8
navigator_sample_num_each_level: 3
}
eval_time_interval: 0.1
path_resolution: 1.0
obstacle_ignore_distance: 20.0
obstacle_collision_distance: 0.5
obstacle_risk_distance: 2.0
obstacle_collision_cost: 1e8
path_l_cost: 6.5
path_dl_cost: 8e3
path_ddl_cost: 5e1
path_l_cost_param_l0: 1.50
path_l_cost_param_b: 0.40
path_l_cost_param_k: 1.5
path_out_lane_cost: 1e8
path_end_l_cost: 1.0e4
}
}
task_config : {
task_type : PATH_DECIDER
}
task_config : {
task_type : DP_ST_SPEED_OPTIMIZER
dp_st_speed_config {
total_path_length: 149
total_time: 7.0
matrix_dimension_s: 150
matrix_dimension_t: 8
speed_weight: 0.0
accel_weight: 10.0
jerk_weight: 10.0
obstacle_weight: 1.0
reference_weight: 0.0
go_down_buffer: 5.0
go_up_buffer: 5.0
default_obstacle_cost: 1e3
default_speed_cost: 1.0e3
exceed_speed_penalty: 10.0
low_speed_penalty: 10.0
keep_clear_low_speed_penalty: 10.0
accel_penalty: 1.0
decel_penalty: 1.0
positive_jerk_coeff: 1.0
negative_jerk_coeff: 1.0
max_acceleration: 3.0
max_deceleration: -4.0
st_boundary_config {
boundary_buffer: 0.1
high_speed_centric_acceleration_limit: 0.8
low_speed_centric_acceleration_limit: 1.2
high_speed_threshold: 12.58
low_speed_threshold: 7.5
minimal_kappa: 0.00001
point_extension: 1.0
lowest_speed: 2.5
num_points_to_avg_kappa: 2
static_obs_nudge_speed_ratio: 0.6
dynamic_obs_nudge_speed_ratio: 0.8
centri_jerk_speed_coeff: 1.0
}
}
}
task_config : {
task_type : SPEED_DECIDER
dp_st_speed_config {
total_path_length: 149
total_time: 7.0
matrix_dimension_s: 150
matrix_dimension_t: 8
speed_weight: 0.0
accel_weight: 10.0
jerk_weight: 10.0
obstacle_weight: 1.0
reference_weight: 0.0
go_down_buffer: 5.0
go_up_buffer: 5.0
default_obstacle_cost: 1e3
default_speed_cost: 1.0e3
exceed_speed_penalty: 10.0
low_speed_penalty: 10.0
keep_clear_low_speed_penalty: 10.0
accel_penalty: 1.0
decel_penalty: 1.0
positive_jerk_coeff: 1.0
negative_jerk_coeff: 1.0
max_acceleration: 3.0
max_deceleration: -4.0
st_boundary_config {
boundary_buffer: 0.1
high_speed_centric_acceleration_limit: 0.8
low_speed_centric_acceleration_limit: 1.2
high_speed_threshold: 12.58
low_speed_threshold: 7.5
minimal_kappa: 0.00001
point_extension: 1.0
lowest_speed: 2.5
num_points_to_avg_kappa: 2
static_obs_nudge_speed_ratio: 0.6
dynamic_obs_nudge_speed_ratio: 0.8
centri_jerk_speed_coeff: 1.0
}
}
}
task_config : {
task_type : QP_SPLINE_ST_SPEED_OPTIMIZER
qp_st_speed_config {
total_path_length: 250.0
total_time: 7.0
preferred_max_acceleration: 2.5
preferred_min_deceleration: -3.3
max_acceleration: 3.0
min_deceleration: -4.0
qp_spline_config {
number_of_discrete_graph_t: 4
spline_order: 5
speed_kernel_weight: 0.0
accel_kernel_weight: 1000.0
jerk_kernel_weight: 1000.0
follow_weight: 5.0
stop_weight: 0.2
cruise_weight: 0.3
regularization_weight: 0.1
follow_drag_distance: 17.0
dp_st_reference_weight: 0.0
init_jerk_kernel_weight: 5e4
yield_weight: 1e2
yield_drag_distance: 20.0
}
qp_piecewise_config {
number_of_evaluated_graph_t: 40
accel_kernel_weight: 1000.0
jerk_kernel_weight: 100.0
follow_weight: 5.0
stop_weight: 0.2
cruise_weight: 0.5
regularization_weight: 0.1
follow_drag_distance: 17.0
}
st_boundary_config {
boundary_buffer: 0.1
high_speed_centric_acceleration_limit: 0.8
low_speed_centric_acceleration_limit: 1.2
high_speed_threshold: 12.58
low_speed_threshold: 7.5
minimal_kappa: 0.00001
point_extension: 1.0
lowest_speed: 2.5
num_points_to_avg_kappa: 2
static_obs_nudge_speed_ratio: 0.6
dynamic_obs_nudge_speed_ratio: 0.8
centri_jerk_speed_coeff: 1.0
}
}
}
task_type: DECIDER_CREEP
# task_type: PROCEED_WITH_CAUTION
task_config : {
task_type : DECIDER_CREEP
decider_creep_config : {
...
...
@@ -753,13 +396,4 @@ stage_config: {
}
}
}
task_config : {
task_type : DECIDER_CREEP
decider_creep_config : {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
min_boundary_t: 6.0
}
}
}
modules/planning/proto/decider_config.proto
浏览文件 @
a76c8d3b
...
...
@@ -12,3 +12,8 @@ message DeciderCreepConfig {
// min boundary t to ignore obstacles while creeping
optional
double
min_boundary_t
=
4
[
default
=
6.0
];
// second
}
message
DeciderStopSignConfig
{
// stop distance(m) to the stop line of the stop sign
optional
double
stop_distance
=
1
[
default
=
1.0
];
// meter
}
\ No newline at end of file
modules/planning/proto/planning_config.proto
浏览文件 @
a76c8d3b
...
...
@@ -37,6 +37,7 @@ message TaskConfig {
NAVI_OBSTACLE_DECIDER
=
9
;
QP_PIECEWISE_JERK_PATH_OPTIMIZER
=
10
;
DECIDER_CREEP
=
11
;
DECIDER_STOP_SIGN
=
12
;
};
optional
TaskType
task_type
=
1
;
oneof
task_config
{
...
...
@@ -49,6 +50,7 @@ message TaskConfig {
ProceedWithCautionSpeedConfig
proceed_with_caution_speed_config
=
8
;
QpPiecewiseJerkPathConfig
qp_piecewise_jerk_path_config
=
9
;
DeciderCreepConfig
decider_creep_config
=
10
;
DeciderStopSignConfig
decider_stop_sign_config
=
11
;
}
}
...
...
modules/planning/scenarios/lane_follow/lane_follow_scenario_test.cc
浏览文件 @
a76c8d3b
...
...
@@ -50,7 +50,7 @@ TEST_F(LaneFollowScenarioTest, VerifyConf) {
FLAGS_scenario_side_pass_config_file
,
&
config
));
}
TEST_F
(
LaneFollowScenarioTest
,
Init
Tasks
)
{
TEST_F
(
LaneFollowScenarioTest
,
Init
)
{
FLAGS_scenario_lane_follow_config_file
=
"//apollo/modules/planning/testdata/conf/"
"scenario_lane_follow_config.pb.txt"
;
...
...
modules/planning/scenarios/side_pass/side_pass_scenario_test.cc
浏览文件 @
a76c8d3b
...
...
@@ -50,7 +50,7 @@ TEST_F(SidePassScenarioTest, VerifyConf) {
FLAGS_scenario_side_pass_config_file
,
&
config
));
}
TEST_F
(
SidePassScenarioTest
,
Init
Tasks
)
{
TEST_F
(
SidePassScenarioTest
,
Init
)
{
FLAGS_scenario_side_pass_config_file
=
"//apollo/modules/planning/testdata/conf/"
"scenario_side_pass_config.pb.txt"
;
...
...
modules/planning/scenarios/stop_sign_unprotected/stop_sign_unprotected_test.cc
浏览文件 @
a76c8d3b
...
...
@@ -51,7 +51,7 @@ TEST_F(StopSignUnprotectedScenarioTest, VerifyConf) {
FLAGS_scenario_side_pass_config_file
,
&
config
));
}
TEST_F
(
StopSignUnprotectedScenarioTest
,
Init
Tasks
)
{
TEST_F
(
StopSignUnprotectedScenarioTest
,
Init
)
{
FLAGS_scenario_stop_sign_unprotected_config_file
=
"//apollo/modules/planning/testdata/conf/"
"scenario_stop_sign_unprotected_config.pb.txt"
;
...
...
modules/planning/toolkits/deciders/BUILD
浏览文件 @
a76c8d3b
...
...
@@ -7,14 +7,14 @@ cc_library(
srcs
=
[
"decider.cc"
,
"decider_creep.cc"
,
"decider_stop_sign
_monitor
.cc"
,
"decider_stop_sign.cc"
,
"side_pass_path_decider.cc"
,
"side_pass_safety.cc"
,
],
hdrs
=
[
"decider.h"
,
"decider_creep.h"
,
"decider_stop_sign
_monitor
.h"
,
"decider_stop_sign.h"
,
"side_pass_path_decider.h"
,
"side_pass_safety.h"
,
],
...
...
modules/planning/toolkits/deciders/decider.h
浏览文件 @
a76c8d3b
...
...
@@ -20,9 +20,6 @@
#pragma once
#include <string>
#include <vector>
#include "modules/common/status/status.h"
#include "modules/planning/toolkits/task.h"
...
...
modules/planning/toolkits/deciders/decider_creep.cc
浏览文件 @
a76c8d3b
...
...
@@ -22,9 +22,6 @@
#include <string>
#include "modules/common/proto/pnc_point.pb.h"
#include "modules/planning/common/frame.h"
namespace
apollo
{
namespace
planning
{
...
...
modules/planning/toolkits/deciders/decider_stop_sign
_monitor
.cc
→
modules/planning/toolkits/deciders/decider_stop_sign.cc
浏览文件 @
a76c8d3b
...
...
@@ -18,41 +18,91 @@
* @file
**/
#include "modules/planning/toolkits/deciders/decider_stop_sign
_monitor
.h"
#include "modules/planning/toolkits/deciders/decider_stop_sign.h"
#include <string>
#include "modules/common/proto/pnc_point.pb.h"
#include "modules/planning/common/frame.h"
#include "modules/common/util/util.h"
namespace
apollo
{
namespace
planning
{
using
apollo
::
common
::
ErrorCode
;
using
apollo
::
common
::
Status
;
using
apollo
::
common
::
util
::
WithinBound
;
using
apollo
::
hdmap
::
PathOverlap
;
DeciderStopSignMonitor
::
DeciderStopSignMonitor
(
const
TaskConfig
&
config
)
:
Decider
(
config
)
{
SetName
(
"DeciderStopSignMonitor"
);
DeciderStopSign
::
DeciderStopSign
(
const
TaskConfig
&
config
)
:
Decider
(
config
)
{
CHECK
(
config
.
has_decider_stop_sign_config
());
config_
=
config
.
decider_stop_sign_config
();
SetName
(
"DeciderCreep"
);
}
Status
DeciderStopSign
Monitor
::
Process
(
Frame
*
frame
,
Status
DeciderStopSign
::
Process
(
Frame
*
frame
,
ReferenceLineInfo
*
reference_line_info
)
{
CHECK_NOTNULL
(
frame
);
CHECK_NOTNULL
(
reference_line_info
);
// TODO(all): to read from scenario context
const
std
::
string
stop_sign_id
=
"TEMP"
;
const
double
stop_line_s
=
100
;
const
double
stop_distance
=
config_
.
stop_distance
();
const
std
::
string
stop_wall_id
=
STOP_SIGN_VO_ID_PREFIX
+
stop_sign_id
;
BuildStopDecision
(
frame
,
reference_line_info
,
stop_wall_id
,
stop_line_s
,
stop_distance
);
return
Status
::
OK
();
}
void
DeciderStopSignMonitor
::
UpdateWatchVehicles
(
StopSignLaneVehicles
*
watch_vehicles
)
{
// TODo(all)
}
bool
DeciderStopSign
::
BuildStopDecision
(
Frame
*
const
frame
,
ReferenceLineInfo
*
const
reference_line_info
,
const
std
::
string
&
stop_wall_id
,
const
double
stop_line_s
,
const
double
stop_distance
)
{
CHECK_NOTNULL
(
frame
);
CHECK_NOTNULL
(
reference_line_info
);
// check
const
auto
&
reference_line
=
reference_line_info
->
reference_line
();
if
(
!
WithinBound
(
0.0
,
reference_line
.
Length
(),
stop_line_s
))
{
AERROR
<<
"stop_line_s["
<<
stop_line_s
<<
"] is not on reference line"
;
return
0
;
}
// create virtual stop wall
auto
*
obstacle
=
frame
->
CreateStopObstacle
(
reference_line_info
,
stop_wall_id
,
stop_line_s
);
if
(
!
obstacle
)
{
AERROR
<<
"Failed to create obstacle ["
<<
stop_wall_id
<<
"]"
;
return
-
1
;
}
PathObstacle
*
stop_wall
=
reference_line_info
->
AddObstacle
(
obstacle
);
if
(
!
stop_wall
)
{
AERROR
<<
"Failed to create path_obstacle for: "
<<
stop_wall_id
;
return
-
1
;
}
// build stop decision
const
double
stop_s
=
stop_line_s
-
stop_distance
;
auto
stop_point
=
reference_line
.
GetReferencePoint
(
stop_s
);
double
stop_heading
=
reference_line
.
GetReferencePoint
(
stop_s
).
heading
();
ObjectDecisionType
stop
;
auto
stop_decision
=
stop
.
mutable_stop
();
stop_decision
->
set_reason_code
(
StopReasonCode
::
STOP_REASON_STOP_SIGN
);
stop_decision
->
set_distance_s
(
-
stop_distance
);
stop_decision
->
set_stop_heading
(
stop_heading
);
stop_decision
->
mutable_stop_point
()
->
set_x
(
stop_point
.
x
());
stop_decision
->
mutable_stop_point
()
->
set_y
(
stop_point
.
y
());
stop_decision
->
mutable_stop_point
()
->
set_z
(
0.0
);
auto
*
path_decision
=
reference_line_info
->
path_decision
();
path_decision
->
AddLongitudinalDecision
(
"DeciderStopSign"
,
stop_wall
->
Id
(),
stop
);
int
DeciderStopSignMonitor
::
AddWatchVehicle
(
const
PathObstacle
&
path_obstacle
,
StopSignLaneVehicles
*
watch_vehicles
)
{
// TODo(all)
return
0
;
}
...
...
modules/planning/toolkits/deciders/decider_stop_sign
_monitor
.h
→
modules/planning/toolkits/deciders/decider_stop_sign.h
浏览文件 @
a76c8d3b
...
...
@@ -21,14 +21,11 @@
#pragma once
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include "modules/planning/proto/
planning_status
.pb.h"
#include "modules/planning/proto/
decider_config
.pb.h"
#include "cybertron/common/macros.h"
#include "modules/map/hdmap/hdmap.h"
#include "modules/planning/common/frame.h"
#include "modules/planning/common/reference_line_info.h"
#include "modules/planning/toolkits/deciders/decider.h"
...
...
@@ -36,27 +33,23 @@
namespace
apollo
{
namespace
planning
{
class
DeciderStopSignMonitor
:
public
Decider
{
typedef
std
::
unordered_map
<
std
::
string
,
std
::
vector
<
std
::
string
>>
StopSignLaneVehicles
;
class
DeciderStopSign
:
public
Decider
{
public:
explicit
DeciderStopSign
Monitor
(
const
TaskConfig
&
config
);
explicit
DeciderStopSign
(
const
TaskConfig
&
config
);
private:
apollo
::
common
::
Status
Process
(
Frame
*
frame
,
ReferenceLineInfo
*
reference_line_info
)
override
;
void
UpdateWatchVehicles
(
StopSignLaneVehicles
*
watch_vehicles
);
int
AddWatchVehicle
(
const
PathObstacle
&
path_obstacle
,
StopSignLaneVehicles
*
watch_vehicles
);
bool
BuildStopDecision
(
Frame
*
const
frame
,
ReferenceLineInfo
*
const
reference_line_info
,
const
std
::
string
&
stop_wall_id
,
const
double
stop_line_s
,
const
double
stop_distance
);
private:
hdmap
::
PathOverlap
next_stop_sign_overlap_
;
hdmap
::
StopSignInfoConstPtr
next_stop_sign_
=
nullptr
;
StopSignStatus
::
Status
stop_status_
;
std
::
vector
<
std
::
pair
<
hdmap
::
LaneInfoConstPtr
,
hdmap
::
OverlapInfoConstPtr
>>
associated_lanes_
;
static
constexpr
const
char
*
STOP_SIGN_VO_ID_PREFIX
=
"SS_"
;
DeciderStopSignConfig
config_
;
};
}
// namespace planning
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录