Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
dbdc5752
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,发现更多精彩内容 >>
提交
dbdc5752
编写于
8月 29, 2017
作者:
Z
Zhang Liangliang
提交者:
Jiangtao Hu
8月 29, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: uniformed the mapping for follow/overtake/yield.
上级
e09ca93d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
30 deletion
+15
-30
modules/planning/common/speed/st_boundary.cc
modules/planning/common/speed/st_boundary.cc
+12
-18
modules/planning/tasks/st_graph/st_boundary_mapper.cc
modules/planning/tasks/st_graph/st_boundary_mapper.cc
+3
-12
未找到文件。
modules/planning/common/speed/st_boundary.cc
浏览文件 @
dbdc5752
...
@@ -194,18 +194,15 @@ StBoundary StBoundary::ExpandByT(const double t) const {
...
@@ -194,18 +194,15 @@ StBoundary StBoundary::ExpandByT(const double t) const {
std
::
vector
<
std
::
pair
<
STPoint
,
STPoint
>>
point_pairs
;
std
::
vector
<
std
::
pair
<
STPoint
,
STPoint
>>
point_pairs
;
const
double
l
ower_l
eft_delta_t
=
lower_points_
[
1
].
t
()
-
lower_points_
[
0
].
t
();
const
double
left_delta_t
=
lower_points_
[
1
].
t
()
-
lower_points_
[
0
].
t
();
const
double
lower_left_delta_s
=
lower_points_
[
1
].
s
()
-
lower_points_
[
0
].
s
();
const
double
lower_left_delta_s
=
lower_points_
[
1
].
s
()
-
lower_points_
[
0
].
s
();
const
double
upper_left_delta_t
=
upper_points_
[
1
].
t
()
-
upper_points_
[
0
].
t
();
const
double
upper_left_delta_s
=
upper_points_
[
1
].
s
()
-
upper_points_
[
0
].
s
();
const
double
upper_left_delta_s
=
upper_points_
[
1
].
s
()
-
upper_points_
[
0
].
s
();
point_pairs
.
emplace_back
(
point_pairs
.
emplace_back
(
STPoint
(
STPoint
(
lower_points_
[
0
].
y
()
-
t
*
lower_left_delta_s
/
left_delta_t
,
lower_points_
[
0
].
y
()
-
t
*
lower_left_delta_s
/
lower_left_delta_t
,
lower_points_
[
0
].
x
()
-
t
),
lower_points_
[
0
].
x
()
-
t
),
STPoint
(
upper_points_
[
0
].
y
()
-
t
*
upper_left_delta_s
/
left_delta_t
,
STPoint
(
upper_points_
.
front
().
x
()
-
t
));
upper_points_
[
0
].
y
()
-
t
*
upper_left_delta_s
/
upper_left_delta_t
,
upper_points_
.
front
().
x
()
-
t
));
const
double
kMinSEpsilon
=
1e-3
;
const
double
kMinSEpsilon
=
1e-3
;
point_pairs
.
front
().
first
.
set_s
(
point_pairs
.
front
().
first
.
set_s
(
...
@@ -219,22 +216,19 @@ StBoundary StBoundary::ExpandByT(const double t) const {
...
@@ -219,22 +216,19 @@ StBoundary StBoundary::ExpandByT(const double t) const {
size_t
length
=
lower_points_
.
size
();
size_t
length
=
lower_points_
.
size
();
DCHECK_GE
(
length
,
2
);
DCHECK_GE
(
length
,
2
);
const
double
lower_
right_delta_t
=
const
double
right_delta_t
=
lower_points_
[
length
-
1
].
t
()
-
lower_points_
[
length
-
2
].
t
();
lower_points_
[
length
-
1
].
t
()
-
lower_points_
[
length
-
2
].
t
();
const
double
lower_right_delta_s
=
const
double
lower_right_delta_s
=
lower_points_
[
length
-
1
].
s
()
-
lower_points_
[
length
-
2
].
s
();
lower_points_
[
length
-
1
].
s
()
-
lower_points_
[
length
-
2
].
s
();
const
double
upper_right_delta_t
=
upper_points_
[
length
-
1
].
t
()
-
upper_points_
[
length
-
2
].
t
();
const
double
upper_right_delta_s
=
const
double
upper_right_delta_s
=
upper_points_
[
length
-
1
].
s
()
-
upper_points_
[
length
-
2
].
s
();
upper_points_
[
length
-
1
].
s
()
-
upper_points_
[
length
-
2
].
s
();
point_pairs
.
emplace_back
(
point_pairs
.
emplace_back
(
STPoint
(
lower_points_
.
back
().
y
()
+
STPoint
(
lower_points_
.
back
().
y
()
+
t
*
lower_right_delta_s
/
right_delta_t
,
t
*
lower_right_delta_s
/
lower_right_delta_t
,
lower_points_
.
back
().
x
()
+
t
),
lower_points_
.
back
().
x
()
+
t
),
STPoint
(
upper_points_
.
back
().
y
()
+
STPoint
(
upper_points_
.
back
().
y
()
+
t
*
upper_right_delta_s
/
right_delta_t
,
t
*
upper_right_delta_s
/
upper_right_delta_t
,
upper_points_
.
back
().
x
()
+
t
));
upper_points_
.
back
().
x
()
+
t
));
point_pairs
.
back
().
second
.
set_s
(
point_pairs
.
back
().
second
.
set_s
(
std
::
fmax
(
point_pairs
.
back
().
second
.
s
(),
std
::
fmax
(
point_pairs
.
back
().
second
.
s
(),
point_pairs
.
back
().
first
.
s
()
+
kMinSEpsilon
));
point_pairs
.
back
().
first
.
s
()
+
kMinSEpsilon
));
...
...
modules/planning/tasks/st_graph/st_boundary_mapper.cc
浏览文件 @
dbdc5752
...
@@ -117,17 +117,7 @@ Status StBoundaryMapper::GetGraphBoundary(
...
@@ -117,17 +117,7 @@ Status StBoundaryMapper::GetGraphBoundary(
continue
;
continue
;
}
}
const
auto
&
decision
=
path_obstacle
->
LongitudinalDecision
();
const
auto
&
decision
=
path_obstacle
->
LongitudinalDecision
();
if
(
decision
.
has_follow
())
{
if
(
decision
.
has_stop
())
{
StBoundary
follow_boundary
;
const
auto
ret
=
MapFollowDecision
(
*
path_obstacle
,
decision
,
&
follow_boundary
);
if
(
!
ret
.
ok
())
{
AERROR
<<
"Fail to map obstacle "
<<
path_obstacle
->
Id
()
<<
" with follow decision: "
<<
decision
.
DebugString
();
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
"Fail to map follow decision"
);
}
AppendBoundary
(
follow_boundary
,
st_boundaries
);
}
else
if
(
decision
.
has_stop
())
{
const
double
stop_s
=
path_obstacle
->
perception_sl_boundary
().
start_s
()
+
const
double
stop_s
=
path_obstacle
->
perception_sl_boundary
().
start_s
()
+
decision
.
stop
().
distance_s
();
decision
.
stop
().
distance_s
();
if
(
stop_s
<
adc_sl_boundary_
.
end_s
())
{
if
(
stop_s
<
adc_sl_boundary_
.
end_s
())
{
...
@@ -146,7 +136,8 @@ Status StBoundaryMapper::GetGraphBoundary(
...
@@ -146,7 +136,8 @@ Status StBoundaryMapper::GetGraphBoundary(
min_stop_s
=
stop_s
;
min_stop_s
=
stop_s
;
stop_decision
=
decision
;
stop_decision
=
decision
;
}
}
}
else
if
(
decision
.
has_overtake
()
||
decision
.
has_yield
())
{
}
else
if
(
decision
.
has_follow
()
||
decision
.
has_overtake
()
||
decision
.
has_yield
())
{
StBoundary
boundary
;
StBoundary
boundary
;
const
auto
ret
=
const
auto
ret
=
MapWithPredictionTrajectory
(
*
path_obstacle
,
decision
,
&
boundary
);
MapWithPredictionTrajectory
(
*
path_obstacle
,
decision
,
&
boundary
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录