Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
7f530866
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,发现更多精彩内容 >>
提交
7f530866
编写于
11月 07, 2019
作者:
P
panjiacheng
提交者:
PAN Jiacheng
11月 07, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: label low right-of-road segments.
上级
96f2bab5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
70 addition
and
33 deletion
+70
-33
modules/planning/tasks/deciders/path_assessment_decider/path_assessment_decider.cc
...ciders/path_assessment_decider/path_assessment_decider.cc
+68
-32
modules/planning/tasks/deciders/path_assessment_decider/path_assessment_decider.h
...eciders/path_assessment_decider/path_assessment_decider.h
+2
-1
未找到文件。
modules/planning/tasks/deciders/path_assessment_decider/path_assessment_decider.cc
浏览文件 @
7f530866
...
...
@@ -400,14 +400,26 @@ bool PathAssessmentDecider::IsValidFallbackPath(
void
PathAssessmentDecider
::
SetPathInfo
(
const
ReferenceLineInfo
&
reference_line_info
,
PathData
*
const
path_data
)
{
// Go through every path_point, and label its:
// - in-lane/out-of-lane info
// - in-lane/out-of-lane info
(side-pass or lane-change)
// - distance to the closest obstacle.
std
::
vector
<
PathPointDecision
>
path_decision
;
// 0. Initialize the path info.
InitPathPointDecision
(
*
path_data
,
&
path_decision
);
if
(
path_data
->
path_label
().
find
(
"fallback"
)
==
std
::
string
::
npos
&&
path_data
->
path_label
().
find
(
"self"
)
==
std
::
string
::
npos
)
{
SetPathPointType
(
reference_line_info
,
*
path_data
,
&
path_decision
);
// 1. Label caution types, differently for side-pass or lane-change.
if
(
reference_line_info
.
IsChangeLanePath
())
{
// If lane-change, then label the lane-changing part to
// be out-on-forward lane.
SetPathPointType
(
reference_line_info
,
*
path_data
,
true
,
&
path_decision
);
}
else
{
// Otherwise, only do the label for borrow-lane generated paths.
if
(
path_data
->
path_label
().
find
(
"fallback"
)
==
std
::
string
::
npos
&&
path_data
->
path_label
().
find
(
"self"
)
==
std
::
string
::
npos
)
{
SetPathPointType
(
reference_line_info
,
*
path_data
,
false
,
&
path_decision
);
}
}
// SetObstacleDistance(reference_line_info, *path_data, &path_decision);
path_data
->
SetPathPointDecisionGuide
(
std
::
move
(
path_decision
));
}
...
...
@@ -627,7 +639,8 @@ void PathAssessmentDecider::InitPathPointDecision(
}
void
PathAssessmentDecider
::
SetPathPointType
(
const
ReferenceLineInfo
&
reference_line_info
,
const
PathData
&
path_data
,
const
ReferenceLineInfo
&
reference_line_info
,
const
PathData
&
path_data
,
const
bool
is_lane_change_path
,
std
::
vector
<
PathPointDecision
>*
const
path_point_decision
)
{
// Sanity checks.
CHECK_NOTNULL
(
path_point_decision
);
...
...
@@ -665,41 +678,64 @@ void PathAssessmentDecider::SetPathPointType(
if
(
reference_line_info
.
reference_line
().
GetLaneWidth
(
middle_s
,
&
lane_left_width
,
&
lane_right_width
))
{
// Rough sl boundary estimate using single point lane width
double
back_to_inlane_extra_buffer
=
0.
5
;
double
back_to_inlane_extra_buffer
=
0.
2
;
double
in_and_out_lane_hysteresis_buffer
=
is_prev_point_out_lane
?
back_to_inlane_extra_buffer
:
0.0
;
if
(
ego_sl_boundary
.
end_l
()
>
lane_left_width
+
in_and_out_lane_hysteresis_buffer
||
ego_sl_boundary
.
start_l
()
<
-
lane_right_width
-
in_and_out_lane_hysteresis_buffer
)
{
if
(
path_data
.
path_label
().
find
(
"reverse"
)
!=
std
::
string
::
npos
)
{
// Check for lane-change and lane-borrow differently:
if
(
is_lane_change_path
)
{
// For lane-change path, only transitioning part is labeled as
// out-of-lane.
if
(
ego_sl_boundary
.
start_l
()
>
lane_left_width
||
ego_sl_boundary
.
end_l
()
<
-
lane_right_width
)
{
// This means that ADC hasn't started lane-change yet.
std
::
get
<
1
>
((
*
path_point_decision
)[
i
])
=
PathData
::
PathPointType
::
OUT_ON_REVERSE_LANE
;
}
else
if
(
path_data
.
path_label
().
find
(
"forward"
)
!=
std
::
string
::
npos
)
{
PathData
::
PathPointType
::
IN_LANE
;
}
else
if
(
ego_sl_boundary
.
start_l
()
>
-
lane_right_width
+
back_to_inlane_extra_buffer
&&
ego_sl_boundary
.
end_l
()
<
lane_left_width
-
back_to_inlane_extra_buffer
)
{
// This means that ADC has safely completed lane-change with margin.
std
::
get
<
1
>
((
*
path_point_decision
)[
i
])
=
PathData
::
PathPointType
::
OUT_ON_FORWARD
_LANE
;
PathData
::
PathPointType
::
IN
_LANE
;
}
else
{
// ADC is right across two lanes.
std
::
get
<
1
>
((
*
path_point_decision
)[
i
])
=
PathData
::
PathPointType
::
UNKNOWN
;
}
if
(
!
is_prev_point_out_lane
)
{
if
(
ego_sl_boundary
.
end_l
()
>
lane_left_width
+
back_to_inlane_extra_buffer
||
ego_sl_boundary
.
start_l
()
<
-
lane_right_width
-
back_to_inlane_extra_buffer
)
{
is_prev_point_out_lane
=
true
;
}
PathData
::
PathPointType
::
OUT_ON_FORWARD_LANE
;
}
}
else
{
// The path point is within the reference_line's lane.
std
::
get
<
1
>
((
*
path_point_decision
)[
i
])
=
PathData
::
PathPointType
::
IN_LANE
;
if
(
is_prev_point_out_lane
)
{
if
(
ego_sl_boundary
.
end_l
()
>
lane_left_width
||
ego_sl_boundary
.
start_l
()
<
-
lane_right_width
)
{
// For lane-borrow path, as long as ADC is not on the lane of
// reference-line, it is out on other lanes. It might even be
// on reverse lane!
if
(
ego_sl_boundary
.
end_l
()
>
lane_left_width
+
in_and_out_lane_hysteresis_buffer
||
ego_sl_boundary
.
start_l
()
<
-
lane_right_width
-
in_and_out_lane_hysteresis_buffer
)
{
if
(
path_data
.
path_label
().
find
(
"reverse"
)
!=
std
::
string
::
npos
)
{
std
::
get
<
1
>
((
*
path_point_decision
)[
i
])
=
PathData
::
PathPointType
::
OUT_ON_REVERSE_LANE
;
}
else
if
(
path_data
.
path_label
().
find
(
"forward"
)
!=
std
::
string
::
npos
)
{
std
::
get
<
1
>
((
*
path_point_decision
)[
i
])
=
PathData
::
PathPointType
::
OUT_ON_FORWARD_LANE
;
}
else
{
std
::
get
<
1
>
((
*
path_point_decision
)[
i
])
=
PathData
::
PathPointType
::
UNKNOWN
;
}
if
(
!
is_prev_point_out_lane
)
{
if
(
ego_sl_boundary
.
end_l
()
>
lane_left_width
+
back_to_inlane_extra_buffer
||
ego_sl_boundary
.
start_l
()
<
-
lane_right_width
-
back_to_inlane_extra_buffer
)
{
is_prev_point_out_lane
=
true
;
}
}
}
else
{
// The path point is within the reference_line's lane.
std
::
get
<
1
>
((
*
path_point_decision
)[
i
])
=
PathData
::
PathPointType
::
IN_LANE
;
if
(
is_prev_point_out_lane
)
{
is_prev_point_out_lane
=
false
;
}
}
...
...
modules/planning/tasks/deciders/path_assessment_decider/path_assessment_decider.h
浏览文件 @
7f530866
...
...
@@ -89,7 +89,8 @@ class PathAssessmentDecider : public Decider {
path_point_decision
);
void
SetPathPointType
(
const
ReferenceLineInfo
&
reference_line_info
,
const
PathData
&
path_data
,
const
ReferenceLineInfo
&
reference_line_info
,
const
PathData
&
path_data
,
const
bool
is_lane_change_path
,
std
::
vector
<
std
::
tuple
<
double
,
PathData
::
PathPointType
,
double
>>*
const
path_point_decision
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录