Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
d88bddfe
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,发现更多精彩内容 >>
提交
d88bddfe
编写于
8月 28, 2017
作者:
Z
Zhang Liangliang
提交者:
Dong Li
8月 28, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: relaxed the mapped boundary from 4 points to multiple points.
上级
727864d9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
45 addition
and
35 deletion
+45
-35
modules/planning/common/speed/st_boundary.cc
modules/planning/common/speed/st_boundary.cc
+17
-0
modules/planning/common/speed/st_boundary.h
modules/planning/common/speed/st_boundary.h
+3
-0
modules/planning/tasks/dp_st_speed/dp_st_graph.cc
modules/planning/tasks/dp_st_speed/dp_st_graph.cc
+0
-3
modules/planning/tasks/speed_optimizer.cc
modules/planning/tasks/speed_optimizer.cc
+0
-1
modules/planning/tasks/st_graph/st_boundary_mapper.cc
modules/planning/tasks/st_graph/st_boundary_mapper.cc
+25
-31
未找到文件。
modules/planning/common/speed/st_boundary.cc
浏览文件 @
d88bddfe
...
...
@@ -308,5 +308,22 @@ bool StBoundary::GetIndexRange(const std::vector<STPoint>& points,
return
true
;
}
StBoundary
StBoundary
::
GenerateStBoundary
(
const
std
::
vector
<
STPoint
>
lower_points
,
const
std
::
vector
<
STPoint
>
upper_points
)
{
if
(
lower_points
.
size
()
!=
upper_points
.
size
()
||
lower_points
.
size
()
<
2
)
{
AERROR
<<
"Fail to generate StBoundary because input points are not valid."
;
return
StBoundary
();
}
std
::
vector
<
std
::
pair
<
STPoint
,
STPoint
>>
point_pairs
;
for
(
size_t
i
=
0
;
i
<
lower_points
.
size
()
&&
i
<
upper_points
.
size
();
++
i
)
{
point_pairs
.
emplace_back
(
STPoint
(
lower_points
.
at
(
i
).
s
(),
lower_points
.
at
(
i
).
t
()),
STPoint
(
upper_points
.
at
(
i
).
s
(),
upper_points
.
at
(
i
).
t
()));
}
return
StBoundary
(
point_pairs
);
}
}
// namespace planning
}
// namespace apollo
modules/planning/common/speed/st_boundary.h
浏览文件 @
d88bddfe
...
...
@@ -96,6 +96,9 @@ class StBoundary : public common::math::Polygon2d {
std
::
vector
<
STPoint
>
upper_points
()
const
{
return
upper_points_
;
}
std
::
vector
<
STPoint
>
lower_points
()
const
{
return
lower_points_
;
}
static
StBoundary
GenerateStBoundary
(
const
std
::
vector
<
STPoint
>
lower_points
,
const
std
::
vector
<
STPoint
>
upper_points
);
private:
bool
IsValid
(
const
std
::
vector
<
std
::
pair
<
STPoint
,
STPoint
>>&
point_pairs
)
const
;
...
...
modules/planning/tasks/dp_st_speed/dp_st_graph.cc
浏览文件 @
d88bddfe
...
...
@@ -406,7 +406,6 @@ Status DpStGraph::MakeObjectDecision(const SpeedData& speed_profile,
if
(
path_obstacle
->
HasLongitudinalDecision
())
{
continue
;
}
CHECK_EQ
(
boundary
.
points
().
size
(),
4
);
double
start_t
=
boundary
.
min_t
();
double
end_t
=
boundary
.
max_t
();
...
...
@@ -640,8 +639,6 @@ double DpStGraph::CalculateEdgeCostForThirdCol(const uint32_t curr_row,
}
bool
DpStGraph
::
CheckIsFollowByT
(
const
StBoundary
&
boundary
)
const
{
DCHECK_EQ
(
boundary
.
points
().
size
(),
4
);
if
(
boundary
.
BottomLeftPoint
().
s
()
>
boundary
.
BottomRightPoint
().
s
())
{
return
false
;
}
...
...
modules/planning/tasks/speed_optimizer.cc
浏览文件 @
d88bddfe
...
...
@@ -95,7 +95,6 @@ void SpeedOptimizer::RecordSTGraphDebug(
point_debug
->
set_t
(
point
.
x
());
point_debug
->
set_s
(
point
.
y
());
}
std
::
cout
<<
boundary
.
DebugString
()
<<
std
::
endl
;
}
for
(
const
auto
&
point
:
speed_limits
.
speed_limit_points
())
{
...
...
modules/planning/tasks/st_graph/st_boundary_mapper.cc
浏览文件 @
d88bddfe
...
...
@@ -234,21 +234,17 @@ Status StBoundaryMapper::MapWithoutDecision(const PathObstacle& path_obstacle,
return
Status
::
OK
();
}
if
(
lower_points
.
size
()
>
0
&&
upper_points
.
size
()
>
0
)
{
std
::
vector
<
std
::
pair
<
STPoint
,
STPoint
>>
point_pairs
;
point_pairs
.
emplace_back
(
STPoint
(
lower_points
.
at
(
0
).
s
()
-
boundary_s_buffer
,
lower_points
.
at
(
0
).
t
()
-
boundary_t_buffer
),
STPoint
(
upper_points
.
at
(
0
).
s
()
+
boundary_s_buffer
,
upper_points
.
at
(
0
).
t
()
-
boundary_t_buffer
));
point_pairs
.
emplace_back
(
STPoint
(
lower_points
.
back
().
s
()
-
boundary_s_buffer
,
lower_points
.
back
().
t
()
+
boundary_t_buffer
),
STPoint
(
upper_points
.
back
().
s
()
+
boundary_s_buffer
,
upper_points
.
back
().
t
()
+
boundary_t_buffer
));
*
boundary
=
StBoundary
(
point_pairs
);
if
(
lower_points
.
size
()
!=
upper_points
.
size
())
{
std
::
string
msg
=
common
::
util
::
StrCat
(
"lower_points.size()["
,
lower_points
.
size
(),
"] and upper_points.size()["
,
upper_points
.
size
(),
"] does NOT match."
);
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
msg
);
}
if
(
lower_points
.
size
()
>
1
&&
upper_points
.
size
()
>
1
)
{
*
boundary
=
StBoundary
::
GenerateStBoundary
(
lower_points
,
upper_points
)
.
ExpandByS
(
boundary_s_buffer
)
.
ExpandByT
(
boundary_t_buffer
);
boundary
->
SetId
(
path_obstacle
.
obstacle
()
->
Id
());
}
return
Status
::
OK
();
...
...
@@ -350,21 +346,18 @@ Status StBoundaryMapper::MapWithPredictionTrajectory(
&
lower_points
))
{
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
"PLANNING_ERROR"
);
}
if
(
lower_points
.
size
()
>
0
&&
upper_points
.
size
()
>
0
)
{
std
::
vector
<
std
::
pair
<
STPoint
,
STPoint
>>
point_pairs
;
point_pairs
.
emplace_back
(
STPoint
(
lower_points
.
at
(
0
).
s
()
-
boundary_s_buffer
,
lower_points
.
at
(
0
).
t
()
-
boundary_t_buffer
),
STPoint
(
upper_points
.
at
(
0
).
s
()
+
boundary_s_buffer
,
upper_points
.
at
(
0
).
t
()
-
boundary_t_buffer
));
point_pairs
.
emplace_back
(
STPoint
(
lower_points
.
back
().
s
()
-
boundary_s_buffer
,
lower_points
.
back
().
t
()
+
boundary_t_buffer
),
STPoint
(
upper_points
.
back
().
s
()
+
boundary_s_buffer
,
upper_points
.
back
().
t
()
+
boundary_t_buffer
));
*
boundary
=
StBoundary
(
point_pairs
);
if
(
lower_points
.
size
()
!=
upper_points
.
size
())
{
std
::
string
msg
=
common
::
util
::
StrCat
(
"lower_points.size()["
,
lower_points
.
size
(),
"] and upper_points.size()["
,
upper_points
.
size
(),
"] does NOT match."
);
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
msg
);
}
if
(
lower_points
.
size
()
>
1
&&
upper_points
.
size
()
>
1
)
{
*
boundary
=
StBoundary
::
GenerateStBoundary
(
lower_points
,
upper_points
)
.
ExpandByS
(
boundary_s_buffer
)
.
ExpandByT
(
boundary_t_buffer
);
// get characteristic_length and boundary_type.
StBoundary
::
BoundaryType
b_type
=
StBoundary
::
BoundaryType
::
UNKNOWN
;
...
...
@@ -394,7 +387,8 @@ Status StBoundaryMapper::MapFollowDecision(
StBoundary
*
const
boundary
)
const
{
DCHECK_NOTNULL
(
boundary
);
DCHECK
(
obj_decision
.
has_follow
())
<<
"Map obstacle without prediction trajectory is ONLY supported when "
<<
"Map obstacle without prediction trajectory is ONLY supported "
"when "
"the object decision is follow. The current object decision is: "
<<
obj_decision
.
DebugString
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录