Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
9389510d
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,发现更多精彩内容 >>
提交
9389510d
编写于
7月 26, 2017
作者:
Z
Zhang Liangliang
提交者:
Jiangtao Hu
7月 26, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added map_mission_complete in planning.
上级
0a8f3c66
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
42 addition
and
10 deletion
+42
-10
modules/common/status/status.h
modules/common/status/status.h
+1
-3
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_boundary_mapper.cc
...imizer/qp_spline_st_speed/qp_spline_st_boundary_mapper.cc
+36
-7
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_boundary_mapper.h
...timizer/qp_spline_st_speed/qp_spline_st_boundary_mapper.h
+5
-0
未找到文件。
modules/common/status/status.h
浏览文件 @
9389510d
...
...
@@ -84,9 +84,7 @@ class Status {
/**
* @brief defines the logic of testing if two Status are equal
*/
bool
operator
==
(
const
Status
&
rh
)
const
{
return
(
this
->
code_
==
rh
.
code_
)
&&
(
this
->
msg_
==
rh
.
msg_
);
}
bool
operator
==
(
const
Status
&
rh
)
const
{
return
(
this
->
code_
==
rh
.
code_
);
}
/**
* @brief defines the logic of testing if two Status are unequal
...
...
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_boundary_mapper.cc
浏览文件 @
9389510d
...
...
@@ -82,12 +82,15 @@ Status QpSplineStBoundaryMapper::get_graph_boundary(
ret
=
map_main_decision_stop
(
main_decision
.
stop
(),
reference_line
,
planning_distance
,
planning_time
,
obs_boundary
);
if
(
ret
!=
Status
::
OK
()
&&
ret
!=
Status
(
ErrorCode
::
PLANNING_SKIP
,
""
))
{
return
ret
;
if
(
ret
!=
Status
::
OK
()
&&
ret
!=
Status
(
ErrorCode
::
PLANNING_SKIP
))
{
return
Status
(
ErrorCode
::
PLANNING_ERROR
)
;
}
}
else
if
(
main_decision
.
has_mission_complete
())
{
// TODO: fill in this function.
// ret = map_main_decision_mission_complete();
ret
=
map_mission_complete
(
reference_line
,
planning_distance
,
planning_time
,
obs_boundary
);
if
(
ret
!=
Status
::
OK
()
&&
ret
!=
Status
(
ErrorCode
::
PLANNING_SKIP
))
{
return
Status
(
ErrorCode
::
PLANNING_ERROR
);
}
}
const
auto
&
static_obs_vec
=
decision_data
.
StaticObstacles
();
...
...
@@ -139,8 +142,6 @@ Status QpSplineStBoundaryMapper::map_main_decision_stop(
const
MainStop
&
main_stop
,
const
ReferenceLine
&
reference_line
,
const
double
planning_distance
,
const
double
planning_time
,
std
::
vector
<
StGraphBoundary
>*
const
boundary
)
const
{
// TODO: complete this function.
const
auto
lane_id
=
common
::
util
::
MakeMapId
(
main_stop
.
enforced_line
().
lane_id
());
const
auto
lane_info
=
DataCenter
::
instance
()
->
map
().
get_lane_by_id
(
lane_id
);
...
...
@@ -149,7 +150,8 @@ Status QpSplineStBoundaryMapper::map_main_decision_stop(
SLPoint
sl_point
;
if
(
!
reference_line
.
get_point_in_Frenet_frame
(
Vec2d
(
map_point
.
x
(),
map_point
.
y
()),
&
sl_point
))
{
AERROR
<<
"Fail to map_main_decision_stop since xy_to_sl_point failed."
;
AERROR
<<
"Fail to map_main_decision_stop since get_point_in_Frenet_frame "
"failed."
;
return
Status
(
ErrorCode
::
PLANNING_ERROR
);
}
sl_point
.
set_s
(
sl_point
.
s
()
-
FLAGS_backward_routing_distance
);
...
...
@@ -200,6 +202,33 @@ Status QpSplineStBoundaryMapper::map_obstacle_with_planning(
return
Status
::
OK
();
}
Status
QpSplineStBoundaryMapper
::
map_mission_complete
(
const
ReferenceLine
&
reference_line
,
const
double
planning_distance
,
const
double
planning_time
,
std
::
vector
<
StGraphBoundary
>*
const
boundary
)
const
{
const
double
s_min
=
st_boundary_config
().
success_tunnel
();
const
double
s_max
=
std
::
fmin
(
planning_distance
,
reference_line
.
length
()
-
FLAGS_backward_routing_distance
);
std
::
vector
<
STPoint
>
boundary_points
;
boundary_points
.
emplace_back
(
s_min
,
0.0
);
boundary_points
.
emplace_back
(
s_max
,
0.0
);
boundary_points
.
emplace_back
(
s_max
+
st_boundary_config
().
boundary_buffer
(),
planning_time
);
boundary_points
.
emplace_back
(
s_min
,
planning_time
);
const
double
area
=
get_area
(
boundary_points
);
if
(
Double
::
compare
(
area
,
0.0
)
<=
0
)
{
return
Status
(
ErrorCode
::
PLANNING_SKIP
);
}
boundary
->
emplace_back
(
boundary_points
);
boundary
->
back
().
set_characteristic_length
(
st_boundary_config
().
boundary_buffer
());
boundary
->
back
().
set_boundary_type
(
StGraphBoundary
::
BoundaryType
::
STOP
);
return
Status
::
OK
();
}
Status
QpSplineStBoundaryMapper
::
map_obstacle_with_prediction_trajectory
(
const
common
::
TrajectoryPoint
&
initial_planning_point
,
const
Obstacle
&
obstacle
,
const
ObjectDecisionType
obj_decision
,
...
...
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_boundary_mapper.h
浏览文件 @
9389510d
...
...
@@ -48,6 +48,11 @@ class QpSplineStBoundaryMapper : public StBoundaryMapper {
const
double
planning_distance
,
const
double
planning_time
,
std
::
vector
<
StGraphBoundary
>*
const
boundary
)
const
;
apollo
::
common
::
Status
map_mission_complete
(
const
ReferenceLine
&
reference_line
,
const
double
planning_distance
,
const
double
planning_time
,
std
::
vector
<
StGraphBoundary
>*
const
boundary
)
const
;
apollo
::
common
::
Status
map_obstacle_with_planning
(
const
common
::
TrajectoryPoint
&
initial_planning_point
,
const
Obstacle
&
obstacle
,
const
PathData
&
path_data
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录