Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
8eb06434
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,发现更多精彩内容 >>
提交
8eb06434
编写于
8月 07, 2017
作者:
T
Tao Jiaming
提交者:
Dong Li
8月 07, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updated Decider
上级
11c46b76
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
14 deletion
+27
-14
modules/planning/planner/em/BUILD
modules/planning/planner/em/BUILD
+1
-0
modules/planning/planner/em/decider.cc
modules/planning/planner/em/decider.cc
+26
-14
未找到文件。
modules/planning/planner/em/BUILD
浏览文件 @
8eb06434
...
...
@@ -14,6 +14,7 @@ cc_library(
"//external:gflags"
,
"//modules/common:log"
,
"//modules/common/status"
,
"//modules/common/vehicle_state"
,
"//modules/planning/common:planning_common"
,
"//modules/planning/proto:planning_proto"
,
"//modules/planning/reference_line"
,
...
...
modules/planning/planner/em/decider.cc
浏览文件 @
8eb06434
...
...
@@ -19,13 +19,15 @@
**/
#include "modules/common/log.h"
#include "modules/common/vehicle_state/vehicle_state.h"
#include "modules/planning/planner/em/decider.h"
namespace
apollo
{
namespace
planning
{
using
common
::
Status
;
using
common
::
ErrorCode
;
using
common
::
Status
;
using
common
::
VehicleState
;
Decider
::
Decider
(
DecisionResult
*
decision_result
)
:
decision_
(
decision_result
)
{
...
...
@@ -53,7 +55,7 @@ Status Decider::MakeDecision(Frame* frame) {
MakeEStopDecision
(
path_decision
);
return
Status
(
ErrorCode
::
OK
,
"MakeDecision failed. estop."
);
}
else
if
(
error_code
==
0
)
{
// TODO: check other main decisions
// TODO
(all)
: check other main decisions
}
SetObjectDecisions
(
path_decision
);
...
...
@@ -95,7 +97,18 @@ int Decider::MakeMainStopDecision(Frame* frame,
continue
;
}
// TODO: check stop_line_s vs adc_s
// check stop_line_s vs adc_s
common
::
SLPoint
adc_sl
;
auto
&
adc_position
=
VehicleState
::
instance
()
->
pose
().
position
();
reference_line
.
get_point_in_frenet_frame
(
{
adc_position
.
x
(),
adc_position
.
y
()},
&
adc_sl
);
if
(
stop_line_s
<=
adc_sl
.
s
())
{
AERROR
<<
"object:"
<<
obstacle
->
Id
()
<<
" fence route_s["
<<
stop_line_s
<<
"] behind adc route_s["
<<
adc_sl
.
s
()
<<
"]"
;
continue
;
}
if
(
stop_line_s
<
min_stop_line_s
)
{
min_stop_line_s
=
stop_line_s
;
...
...
@@ -133,10 +146,8 @@ int Decider::SetObjectDecisions(PathDecision* const path_decision) {
const
auto
&
obstacle
=
path_obstacle
->
Obstacle
();
object_decision
->
set_id
(
obstacle
->
Id
());
// TODO: to be added
// object_decision->set_type();
// object_decision->mutable_prediction()->CopyFrom(
// *(path_obstacle->prediction()));
object_decision
->
set_type
(
ObjectDecision
::
PREDICTION
);
object_decision
->
set_perception_id
(
obstacle
->
PerceptionId
());
for
(
const
auto
&
decision
:
path_obstacle
->
Decisions
())
{
object_decision
->
add_object_decision
()
->
CopyFrom
(
decision
);
...
...
@@ -149,20 +160,21 @@ int Decider::MakeEStopDecision(PathDecision* const path_decision) {
CHECK_NOTNULL
(
path_decision
);
decision_
->
Clear
();
// TODO: to be added
// MainEmergencyStop* main_estop =
// decision_->mutable_main_decision()->mutable_estop();
// main_estop->set_reason_code();
// main_estop->set_reason();
// TODO(all): to be added
MainEmergencyStop
*
main_estop
=
decision_
->
mutable_main_decision
()
->
mutable_estop
();
main_estop
->
set_reason_code
(
MainEmergencyStop
::
ESTOP_REASON_INTERNAL_ERR
);
main_estop
->
set_reason
(
"estop reason to be added"
);
main_estop
->
mutable_cruise_to_stop
();
ObjectDecisions
*
object_decisions
=
decision_
->
mutable_object_decision
();
const
auto
&
path_obstacles
=
path_decision
->
path_obstacles
();
for
(
const
auto
path_obstacle
:
path_obstacles
.
Items
())
{
auto
*
object_decision
=
object_decisions
->
add_decision
();
const
auto
&
obstacle
=
path_obstacle
->
Obstacle
();
object_decision
->
set_id
(
obstacle
->
Id
());
object_decision
->
set_type
(
ObjectDecision
::
PREDICTION
);
object_decision
->
set_perception_id
(
obstacle
->
PerceptionId
());
object_decision
->
add_object_decision
()
->
mutable_avoid
();
}
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录