Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
3cb93936
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,发现更多精彩内容 >>
提交
3cb93936
编写于
8月 11, 2017
作者:
Z
Zhang Liangliang
提交者:
Jiangtao Hu
8月 11, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: added mapping for static obstacle.
上级
2ec9b247
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
61 addition
and
41 deletion
+61
-41
modules/planning/optimizer/st_graph/st_boundary_mapper.cc
modules/planning/optimizer/st_graph/st_boundary_mapper.cc
+61
-41
未找到文件。
modules/planning/optimizer/st_graph/st_boundary_mapper.cc
浏览文件 @
3cb93936
...
...
@@ -232,16 +232,18 @@ Status StBoundaryMapper::MapObstacleWithoutDecision(
if
(
lower_points
.
size
()
>
0
&&
upper_points
.
size
()
>
0
)
{
boundary_points
.
clear
();
const
double
buffer
=
st_boundary_config_
.
follow_buffer
();
boundary_points
.
emplace_back
(
lower_points
.
at
(
0
).
s
()
-
buffer
,
lower_points
.
at
(
0
).
t
());
boundary_points
.
emplace_back
(
lower_points
.
back
().
s
()
-
buffer
,
lower_points
.
back
().
t
());
boundary_points
.
emplace_back
(
upper_points
.
back
().
s
()
+
buffer
+
st_boundary_config_
.
boundary_buffer
(),
upper_points
.
back
().
t
());
boundary_points
.
emplace_back
(
upper_points
.
at
(
0
).
s
()
+
buffer
,
upper_points
.
at
(
0
).
t
());
boundary_points
.
emplace_back
(
lower_points
.
at
(
0
).
s
()
-
st_boundary_config_
.
boundary_buffer
(),
lower_points
.
at
(
0
).
t
()
-
st_boundary_config_
.
boundary_buffer
());
boundary_points
.
emplace_back
(
lower_points
.
back
().
s
()
-
st_boundary_config_
.
boundary_buffer
(),
lower_points
.
back
().
t
()
+
st_boundary_config_
.
boundary_buffer
());
boundary_points
.
emplace_back
(
upper_points
.
back
().
s
()
+
st_boundary_config_
.
boundary_buffer
(),
upper_points
.
back
().
t
()
+
st_boundary_config_
.
boundary_buffer
());
boundary_points
.
emplace_back
(
upper_points
.
at
(
0
).
s
()
+
st_boundary_config_
.
boundary_buffer
(),
upper_points
.
at
(
0
).
t
()
-
st_boundary_config_
.
boundary_buffer
());
if
(
lower_points
.
at
(
0
).
t
()
>
lower_points
.
back
().
t
()
||
upper_points
.
at
(
0
).
t
()
>
upper_points
.
back
().
t
())
{
AWARN
<<
"lower/upper points are reversed."
;
...
...
@@ -277,42 +279,60 @@ bool StBoundaryMapper::GetOverlapBoundaryPoints(
}
const
auto
&
trajectory
=
obstacle
.
Trajectory
();
for
(
int
j
=
0
;
j
<
trajectory
.
trajectory_point_size
();
++
j
)
{
const
auto
&
trajectory_point
=
trajectory
.
trajectory_point
(
j
);
double
trajectory_point_time
=
trajectory_point
.
relative_time
();
const
Box2d
obs_box
=
obstacle
.
GetBoundingBox
(
trajectory_point
);
int64_t
low
=
0
;
int64_t
high
=
path_points
.
size
()
-
1
;
bool
find_low
=
false
;
bool
find_high
=
false
;
while
(
low
<
high
)
{
if
(
find_low
&&
find_high
)
{
if
(
trajectory
.
trajectory_point_size
()
==
0
)
{
for
(
const
auto
&
curr_point_on_path
:
path_points
)
{
if
(
curr_point_on_path
.
s
()
>
planning_distance_
)
{
break
;
}
if
(
!
find_low
)
{
if
(
!
CheckOverlap
(
path_points
[
low
],
obs_box
,
st_boundary_config_
.
boundary_buffer
()))
{
++
low
;
}
else
{
find_low
=
true
;
}
const
Box2d
obs_box
=
obstacle
.
PerceptionBoundingBox
();
if
(
CheckOverlap
(
curr_point_on_path
,
obs_box
,
st_boundary_config_
.
boundary_buffer
()))
{
lower_points
->
emplace_back
(
curr_point_on_path
.
s
(),
0.0
);
lower_points
->
emplace_back
(
curr_point_on_path
.
s
(),
planning_time_
);
upper_points
->
emplace_back
(
planning_distance_
,
0.0
);
upper_points
->
emplace_back
(
planning_distance_
,
planning_time_
);
break
;
}
if
(
!
find_high
)
{
if
(
!
CheckOverlap
(
path_points
[
high
],
obs_box
,
st_boundary_config_
.
boundary_buffer
()))
{
--
high
;
}
else
{
find_high
=
true
;
}
}
else
{
for
(
int
i
=
0
;
i
<
trajectory
.
trajectory_point_size
();
++
i
)
{
const
auto
&
trajectory_point
=
trajectory
.
trajectory_point
(
i
);
double
trajectory_point_time
=
trajectory_point
.
relative_time
();
const
Box2d
obs_box
=
obstacle
.
GetBoundingBox
(
trajectory_point
);
int64_t
low
=
0
;
int64_t
high
=
path_points
.
size
()
-
1
;
bool
find_low
=
false
;
bool
find_high
=
false
;
while
(
low
<
high
)
{
if
(
find_low
&&
find_high
)
{
break
;
}
if
(
!
find_low
)
{
if
(
!
CheckOverlap
(
path_points
[
low
],
obs_box
,
st_boundary_config_
.
boundary_buffer
()))
{
++
low
;
}
else
{
find_low
=
true
;
}
}
if
(
!
find_high
)
{
if
(
!
CheckOverlap
(
path_points
[
high
],
obs_box
,
st_boundary_config_
.
boundary_buffer
()))
{
--
high
;
}
else
{
find_high
=
true
;
}
}
}
}
if
(
find_high
&&
find_low
)
{
lower_points
->
emplace_back
(
path_points
[
low
].
s
()
-
st_boundary_config_
.
point_extension
(),
trajectory_point_time
);
upper_points
->
emplace_back
(
path_points
[
high
].
s
()
+
st_boundary_config_
.
point_extension
(),
trajectory_point_time
);
if
(
find_high
&&
find_low
)
{
lower_points
->
emplace_back
(
path_points
[
low
].
s
()
-
st_boundary_config_
.
point_extension
(),
trajectory_point_time
);
upper_points
->
emplace_back
(
path_points
[
high
].
s
()
+
st_boundary_config_
.
point_extension
(),
trajectory_point_time
);
}
}
}
DCHECK_EQ
(
lower_points
->
size
(),
upper_points
->
size
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录