Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
044fcd4c
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,发现更多精彩内容 >>
提交
044fcd4c
编写于
8月 23, 2017
作者:
T
Tao Jiaming
提交者:
Dong Li
8月 23, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update nudge decision; also add a gflag
上级
6de6dc9a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
44 addition
and
9 deletion
+44
-9
modules/planning/common/planning_gflags.cc
modules/planning/common/planning_gflags.cc
+3
-0
modules/planning/common/planning_gflags.h
modules/planning/common/planning_gflags.h
+2
-0
modules/planning/tasks/path_decider/path_decider.cc
modules/planning/tasks/path_decider/path_decider.cc
+39
-9
未找到文件。
modules/planning/common/planning_gflags.cc
浏览文件 @
044fcd4c
...
...
@@ -103,6 +103,7 @@ DEFINE_double(stgraph_max_deceleration_divide_factor_level_2, 2.0,
"The divide factor for max deceleration at level 2."
);
// Decision Part
DEFINE_bool
(
enable_nudge_decision
,
true
,
"enable nudge decision"
);
DEFINE_double
(
static_decision_ignore_s_range
,
3.0
,
"threshold for judging nudge in dp path computing decision"
);
DEFINE_double
(
static_decision_nudge_l_buffer
,
0.5
,
"l buffer for nudge"
);
...
...
@@ -118,6 +119,8 @@ DEFINE_double(stop_distance_obstacle, 5.0,
"stop distance from in-lane obstacle (meters)"
);
DEFINE_double
(
destination_adjust_distance_buffer
,
1.0
,
"distance buffer when adjusting destination stop line"
);
DEFINE_double
(
min_driving_width
,
2.5
,
"minimum road width(meters) for adc to drive through"
);
DEFINE_double
(
nudge_distance_vehicle
,
0.3
,
"minimum distance to nudge a vehicle"
);
DEFINE_double
(
nudge_distance_bicycle
,
0.9144
,
...
...
modules/planning/common/planning_gflags.h
浏览文件 @
044fcd4c
...
...
@@ -74,6 +74,7 @@ DECLARE_double(stgraph_max_deceleration_divide_factor_level_1);
DECLARE_double
(
stgraph_max_deceleration_divide_factor_level_2
);
// Decision Part
DECLARE_bool
(
enable_nudge_decision
);
DECLARE_double
(
static_decision_ignore_s_range
);
DECLARE_double
(
static_decision_nudge_l_buffer
);
DECLARE_double
(
static_decision_stop_buffer
);
...
...
@@ -81,6 +82,7 @@ DECLARE_double(dynamic_decision_follow_range);
DECLARE_double
(
stop_distance_pedestrian
);
DECLARE_double
(
stop_distance_obstacle
);
DECLARE_double
(
destination_adjust_distance_buffer
);
DECLARE_double
(
min_driving_width
);
DECLARE_double
(
nudge_distance_vehicle
);
DECLARE_double
(
nudge_distance_bicycle
);
DECLARE_double
(
nudge_distance_obstacle
);
...
...
modules/planning/tasks/path_decider/path_decider.cc
浏览文件 @
044fcd4c
...
...
@@ -71,6 +71,10 @@ bool PathDecider::MakeObjectDecision(const PathData &path_data,
bool
PathDecider
::
MakeStaticObstacleDecision
(
const
PathData
&
path_data
,
PathDecision
*
const
path_decision
)
{
if
(
!
FLAGS_enable_nudge_decision
)
{
return
true
;
}
DCHECK_NOTNULL
(
path_decision
);
std
::
vector
<
common
::
SLPoint
>
adc_sl_points
;
std
::
vector
<
common
::
math
::
Box2d
>
adc_bounding_box
;
...
...
@@ -137,16 +141,42 @@ bool PathDecider::MakeStaticObstacleDecision(
}
// check STOP/NUDGE
double
left_bound
;
double
right_bound
;
if
(
!
reference_line_
->
get_lane_width
(
adc_sl
.
s
(),
&
left_bound
,
&
right_bound
))
{
left_bound
=
right_bound
=
FLAGS_default_reference_line_width
/
2
;
double
left_width
;
double
right_width
;
if
(
!
reference_line_
->
get_lane_width
(
adc_sl
.
s
(),
&
left_width
,
&
right_width
))
{
left_width
=
right_width
=
FLAGS_default_reference_line_width
/
2
;
}
double
driving_width
;
bool
left_nudgable
=
false
;
bool
right_nudgable
=
false
;
if
(
sl_boundary
.
start_l
()
>=
0
)
{
// obstacle on the left, check RIGHT_NUDGE
driving_width
=
sl_boundary
.
start_l
()
-
FLAGS_static_decision_nudge_l_buffer
+
right_width
;
right_nudgable
=
(
driving_width
>=
FLAGS_min_driving_width
)
?
true
:
false
;
}
else
if
(
sl_boundary
.
end_l
()
<=
0
)
{
// obstacle on the right, check LEFT_NUDGE
driving_width
=
std
::
fabs
(
sl_boundary
.
end_l
())
-
FLAGS_static_decision_nudge_l_buffer
+
left_width
;
left_nudgable
=
(
driving_width
>=
FLAGS_min_driving_width
)
?
true
:
false
;
}
else
{
// obstacle across the central line, decide RIGHT_NUDGE/LEFT_NUDGE
double
driving_width_left
=
left_width
-
sl_boundary
.
end_l
()
-
FLAGS_static_decision_nudge_l_buffer
;
double
driving_width_right
=
right_width
-
std
::
fabs
(
sl_boundary
.
start_l
())
-
FLAGS_static_decision_nudge_l_buffer
;
if
(
std
::
max
(
driving_width_right
,
driving_width_left
)
>=
FLAGS_min_driving_width
)
{
// nudgable
left_nudgable
=
driving_width_left
>
driving_width_right
?
true
:
false
;
right_nudgable
=
!
left_nudgable
;
}
}
bool
left_nudgable
=
left_bound
-
sl_boundary
.
end_l
()
>=
FLAGS_static_decision_nudge_l_buffer
;
bool
right_nudgable
=
sl_boundary
.
start_l
()
-
right_bound
>=
FLAGS_static_decision_nudge_l_buffer
;
if
(
!
left_nudgable
&&
!
right_nudgable
)
{
// STOP: and break
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录