Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
3d4943b1
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,发现更多精彩内容 >>
提交
3d4943b1
编写于
1月 30, 2018
作者:
J
jmtao
提交者:
Jiangtao Hu
1月 30, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: crosswalk changes
上级
6dfc42be
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
21 deletion
+26
-21
modules/planning/common/planning_gflags.cc
modules/planning/common/planning_gflags.cc
+5
-2
modules/planning/common/planning_gflags.h
modules/planning/common/planning_gflags.h
+3
-2
modules/planning/tasks/traffic_decider/crosswalk.cc
modules/planning/tasks/traffic_decider/crosswalk.cc
+15
-14
modules/planning/tasks/traffic_decider/stop_sign.cc
modules/planning/tasks/traffic_decider/stop_sign.cc
+3
-3
未找到文件。
modules/planning/common/planning_gflags.cc
浏览文件 @
3d4943b1
...
...
@@ -282,13 +282,16 @@ DEFINE_double(crosswalk_strick_l_distance, 4.0,
"strick stop rule within this l_distance"
);
DEFINE_double
(
crosswalk_loose_l_distance
,
5.0
,
"loose stop rule beyond this l_distance"
);
DEFINE_double
(
crosswalk_min_pass_distance
,
1.0
,
"valid min distance(m) for vehicles to be considered as "
"have passed crosswalk (stop_line_end_s)"
);
/// stop_sign
DEFINE_bool
(
enable_stop_sign
,
true
,
"enable stop_sign"
);
DEFINE_string
(
stop_sign_virtual_object_id_prefix
,
"SS_"
,
"prefix for converting stop_sign id to virtual object id"
);
DEFINE_double
(
stop_
duration_for_stop_sig
n
,
3.0
,
DEFINE_double
(
stop_
sign_stop_duratio
n
,
3.0
,
"min time(second) to stop at stop sign"
);
DEFINE_double
(
min_pass_stop_sign
_distance
,
3.0
,
DEFINE_double
(
stop_sign_min_pass
_distance
,
3.0
,
"valid min distance(m) for vehicles to be considered as "
"have passed stop sign (stop_line_end_s)"
);
...
...
modules/planning/common/planning_gflags.h
浏览文件 @
3d4943b1
...
...
@@ -169,11 +169,12 @@ DECLARE_string(crosswalk_virtual_object_id_prefix);
DECLARE_double
(
crosswalk_expand_distance
);
DECLARE_double
(
crosswalk_strick_l_distance
);
DECLARE_double
(
crosswalk_loose_l_distance
);
DECLARE_double
(
crosswalk_min_pass_distance
);
/// stop_sign
DECLARE_bool
(
enable_stop_sign
);
DECLARE_string
(
stop_sign_virtual_object_id_prefix
);
DECLARE_double
(
stop_
duration_for_stop_sig
n
);
DECLARE_double
(
min_pass_stop_sign
_distance
);
DECLARE_double
(
stop_
sign_stop_duratio
n
);
DECLARE_double
(
stop_sign_min_pass
_distance
);
DECLARE_bool
(
enable_sqp_solver
);
...
...
modules/planning/tasks/traffic_decider/crosswalk.cc
浏览文件 @
3d4943b1
...
...
@@ -60,6 +60,8 @@ bool Crosswalk::ApplyRule(Frame* frame,
void
Crosswalk
::
MakeDecisions
(
Frame
*
frame
,
ReferenceLineInfo
*
const
reference_line_info
)
{
auto
*
path_decision
=
reference_line_info
->
path_decision
();
double
adc_front_edge_s
=
reference_line_info
->
AdcSlBoundary
().
end_s
();
for
(
const
auto
*
path_obstacle
:
path_decision
->
path_obstacles
().
Items
())
{
const
PerceptionObstacle
&
perception_obstacle
=
path_obstacle
->
obstacle
()
->
Perception
();
...
...
@@ -84,6 +86,17 @@ void Crosswalk::MakeDecisions(Frame* frame,
auto
crosswalk_info
=
crosswalk_ptr
.
get
();
std
::
string
crosswalk_id
=
crosswalk_info
->
id
().
id
();
// skip crosswalk if master vehicle body already passes the stop line
double
stop_line_end_s
=
crosswalk_overlap
->
end_s
;
if
(
adc_front_edge_s
-
stop_line_end_s
>
FLAGS_crosswalk_min_pass_distance
)
{
ADEBUG
<<
"skip: crosswalk_id["
<<
crosswalk_id
<<
"]; stop_line_end_s["
<<
stop_line_end_s
<<
"]; adc_front_edge_s["
<<
adc_front_edge_s
<<
"]. adc_front_edge passes stop_line_end_s + buffer."
;
continue
;
}
// expand crosswalk polygon
// note: crosswalk expanded area will include sideway area
Vec2d
point
(
perception_obstacle
.
position
().
x
(),
...
...
@@ -96,8 +109,8 @@ void Crosswalk::MakeDecisions(Frame* frame,
if
(
!
in_expanded_crosswalk
)
{
ADEBUG
<<
"skip: not in crosswalk expanded area. "
<<
"obstacle_id["
<<
obstacle_id
<<
"]; crosswalk_id["
<<
crosswalk_id
<<
"]"
;
<<
"obstacle_id["
<<
obstacle_id
<<
"]; crosswalk_id["
<<
crosswalk_id
<<
"]"
;
continue
;
}
...
...
@@ -154,18 +167,6 @@ void Crosswalk::MakeDecisions(Frame* frame,
continue
;
}
// skip crosswalk if master vehicle body already passes the stop line
double
stop_line_start_s
=
crosswalk_overlap
->
start_s
;
double
adc_front_edge_s
=
reference_line_info
->
AdcSlBoundary
().
end_s
();
if
(
stop_line_start_s
+
FLAGS_stop_max_distance_buffer
<=
adc_front_edge_s
)
{
ADEBUG
<<
"skip: adc_front_edge passes stop_line+buffer. "
<<
"obstacle_id["
<<
obstacle_id
<<
"]; crosswalk_id["
<<
crosswalk_id
<<
"]; crosswalk_start_s["
<<
stop_line_start_s
<<
"]; adc_front_edge_s["
<<
adc_front_edge_s
<<
"]"
;
continue
;
}
double
stop_deceleration
=
GetStopDeceleration
(
reference_line_info
,
crosswalk_overlap
);
if
(
stop_deceleration
<
FLAGS_stop_max_deceleration
)
{
...
...
modules/planning/tasks/traffic_decider/stop_sign.cc
浏览文件 @
3d4943b1
...
...
@@ -113,7 +113,7 @@ void StopSign::MakeDecisions(Frame* frame,
double
adc_front_edge_s
=
reference_line_info
->
AdcSlBoundary
().
end_s
();
if
(
adc_front_edge_s
-
stop_line_end_s
>
FLAGS_
min_pass_stop_sign
_distance
)
{
FLAGS_
stop_sign_min_pass
_distance
)
{
ClearDropbox
(
stop_sign_id
);
ADEBUG
<<
"skip stop_sign_id["
<<
stop_sign_id
<<
"]; stop_line_end_s["
<<
stop_line_end_s
...
...
@@ -260,7 +260,7 @@ int StopSign::ProcessStopStatus(ReferenceLineInfo* const reference_line_info,
if
(
!
CheckADCkStop
(
reference_line_info
))
{
stop_status_
=
StopSignStopStatus
::
TO_STOP
;
}
else
{
if
(
wait_time
>=
FLAGS_stop_
duration_for_stop_sig
n
)
{
if
(
wait_time
>=
FLAGS_stop_
sign_stop_duratio
n
)
{
stop_status_
=
StopSignStopStatus
::
STOP_DONE
;
}
}
...
...
@@ -546,7 +546,7 @@ int StopSign::RemoveWatchVehicle(
double
stop_line_end_s
=
over_lap_info
->
lane_overlap_info
().
end_s
();
double
obstacle_end_s
=
obstacle_s
+
perception_obstacle
.
length
()
/
2
;
double
distance_pass_stop_line
=
obstacle_end_s
-
stop_line_end_s
;
if
(
distance_pass_stop_line
>
FLAGS_
min_pass_stop_sign
_distance
)
{
if
(
distance_pass_stop_line
>
FLAGS_
stop_sign_min_pass
_distance
)
{
ADEBUG
<<
"obstacle_id["
<<
obstacle_id
<<
"] type["
<<
obstacle_type_name
<<
"] distance_pass_stop_line["
<<
distance_pass_stop_line
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录