Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
7e8bfc9b
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,发现更多精彩内容 >>
提交
7e8bfc9b
编写于
8月 14, 2017
作者:
Z
Zhang Liangliang
提交者:
Jiangtao Hu
8月 15, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: Restructured some code in dp_st_graph.
上级
ef2c6c44
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
15 deletion
+25
-15
modules/planning/optimizer/dp_st_speed/dp_st_graph.cc
modules/planning/optimizer/dp_st_speed/dp_st_graph.cc
+14
-10
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_graph.cc
...anning/optimizer/qp_spline_st_speed/qp_spline_st_graph.cc
+2
-0
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_speed_optimizer.cc
...imizer/qp_spline_st_speed/qp_spline_st_speed_optimizer.cc
+1
-0
modules/planning/optimizer/st_graph/st_boundary_mapper.cc
modules/planning/optimizer/st_graph/st_boundary_mapper.cc
+8
-5
未找到文件。
modules/planning/optimizer/dp_st_speed/dp_st_graph.cc
浏览文件 @
7e8bfc9b
...
...
@@ -100,6 +100,8 @@ Status DpStGraph::InitCostTable() {
unit_t_
=
dp_st_speed_config_
.
total_time
()
/
dp_st_speed_config_
.
matrix_dimension_t
();
DCHECK_GT
(
dim_s
,
2
);
DCHECK_GT
(
dim_t
,
2
);
cost_table_
=
std
::
vector
<
std
::
vector
<
StGraphPoint
>>
(
dim_t
,
std
::
vector
<
StGraphPoint
>
(
dim_s
,
StGraphPoint
()));
...
...
@@ -176,8 +178,6 @@ void DpStGraph::GetRowRange(const uint32_t curr_row, const uint32_t curr_col,
uint32_t
*
next_lowest_row
)
{
// TODO: finish the implementation of this function.
const
auto
&
curr_point
=
cost_table_
[
curr_col
][
curr_row
];
*
next_highest_row
=
cost_table_
.
back
().
size
()
-
1
;
*
next_lowest_row
=
curr_point
.
index_s
();
double
v0
=
0.0
;
if
(
curr_col
==
0
)
{
...
...
@@ -190,16 +190,20 @@ void DpStGraph::GetRowRange(const uint32_t curr_row, const uint32_t curr_col,
const
double
delta_s_upper_bound
=
v0
*
unit_t_
+
0.5
*
vehicle_param_
.
max_acceleration
()
*
unit_t_
*
unit_t_
;
*
next_highest_row
=
std
::
min
(
static_cast
<
uint32_t
>
(
cost_table_
.
back
().
size
()
-
1
),
*
next_lowest_row
+
static_cast
<
uint32_t
>
(
delta_s_upper_bound
/
unit_s_
));
*
next_highest_row
=
curr_point
.
index_s
()
+
static_cast
<
uint32_t
>
(
delta_s_upper_bound
/
unit_s_
);
if
(
*
next_highest_row
>=
cost_table_
.
back
().
size
())
{
*
next_highest_row
=
cost_table_
.
back
().
size
()
-
1
;
}
const
double
delta_s_lower_bound
=
v0
*
unit_t_
+
0.5
*
vehicle_param_
.
max_deceleration
()
*
unit_t_
*
unit_t_
;
const
double
delta_s_lower_bound
=
std
::
fmax
(
0.0
,
v0
*
unit_t_
+
0.5
*
vehicle_param_
.
max_deceleration
()
*
unit_t_
*
unit_t_
)
;
*
next_lowest_row
=
*
next_lowest_row
+
std
::
max
(
0
,
static_cast
<
int32_t
>
(
delta_s_lower_bound
/
unit_s_
));
*
next_lowest_row
+
static_cast
<
int32_t
>
(
delta_s_lower_bound
/
unit_s_
);
if
(
*
next_lowest_row
>=
cost_table_
.
back
().
size
())
{
*
next_lowest_row
=
cost_table_
.
back
().
size
()
-
1
;
}
}
void
DpStGraph
::
CalculateCostAt
(
const
StGraphData
&
st_graph_data
,
...
...
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_graph.cc
浏览文件 @
7e8bfc9b
...
...
@@ -326,6 +326,8 @@ Status QpSplineStGraph::GetSConstraintByTime(
boundary
.
boundary_type
()
==
StGraphBoundary
::
BoundaryType
::
YIELD
)
{
*
s_upper_bound
=
std
::
fmin
(
*
s_upper_bound
,
s_upper
);
}
else
{
DCHECK
(
boundary
.
boundary_type
()
==
StGraphBoundary
::
BoundaryType
::
OVERTAKE
);
*
s_lower_bound
=
std
::
fmax
(
*
s_lower_bound
,
s_lower
);
}
}
...
...
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_speed_optimizer.cc
浏览文件 @
7e8bfc9b
...
...
@@ -82,6 +82,7 @@ Status QpSplineStSpeedOptimizer::Process(const PathData& path_data,
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
"Mapping obstacle for qp st speed optimizer failed!"
);
}
SpeedLimit
speed_limits
;
if
(
boundary_mapper
.
GetSpeedLimits
(
&
speed_limits
)
!=
Status
::
OK
())
{
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
...
...
modules/planning/optimizer/st_graph/st_boundary_mapper.cc
浏览文件 @
7e8bfc9b
...
...
@@ -112,16 +112,20 @@ Status StBoundaryMapper::GetGraphBoundary(
AERROR
<<
msg
;
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
msg
);
}
continue
;
}
const
auto
&
decision
=
path_obstacle
->
LongitutionalDecision
();
StGraphBoundary
boundary
(
path_obstacle
);
if
(
decision
.
has_follow
())
{
StGraphBoundary
boundary
(
path_obstacle
);
const
auto
ret
=
MapFollowDecision
(
*
path_obstacle
,
decision
,
&
boundary
);
if
(
!
ret
.
ok
()
)
{
if
(
ret
.
code
()
==
ErrorCode
::
PLANNING_ERROR
)
{
AERROR
<<
"Fail to map obstacle "
<<
path_obstacle
->
Id
()
<<
" with follow decision: "
<<
decision
.
DebugString
();
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
"Fail to map follow decision"
);
}
if
(
ret
.
ok
())
{
st_graph_boundaries
->
push_back
(
boundary
);
}
}
else
if
(
decision
.
has_stop
())
{
// TODO(all) change start_s() to st_boundary.min_s()
const
double
stop_s
=
path_obstacle
->
perception_sl_boundary
().
start_s
()
+
...
...
@@ -153,9 +157,9 @@ Status StBoundaryMapper::GetGraphBoundary(
}
else
{
std
::
string
msg
=
common
::
util
::
StrCat
(
"No mapping for decision: "
,
decision
.
DebugString
());
return
Status
(
ErrorCode
::
PLANNING_SKIP
,
msg
);
ADEBUG
<<
msg
;
// Status(ErrorCode::PLANNING_SKIP, msg);
}
boundary
.
set_id
(
path_obstacle
->
Id
());
}
if
(
stop_obstacle
)
{
...
...
@@ -169,7 +173,6 @@ Status StBoundaryMapper::GetGraphBoundary(
}
st_graph_boundaries
->
push_back
(
stop_boundary
);
}
return
Status
::
OK
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录