Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
7947894d
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,发现更多精彩内容 >>
提交
7947894d
编写于
4月 06, 2018
作者:
C
cheni-kuei
提交者:
Qi Luo
4月 06, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Perception: Fix a bug in fusion about not initialized
上级
927a575d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
13 deletion
+16
-13
modules/perception/obstacle/onboard/fusion_subnode.cc
modules/perception/obstacle/onboard/fusion_subnode.cc
+16
-13
未找到文件。
modules/perception/obstacle/onboard/fusion_subnode.cc
浏览文件 @
7947894d
...
...
@@ -138,8 +138,8 @@ bool FusionSubnode::InitOutputStream() {
auto
lane_iter
=
reserve_field_map
.
find
(
"lane_event_id"
);
if
(
lane_iter
==
reserve_field_map
.
end
())
{
AWARN
<<
"Failed to find
camera_event_id
:"
<<
reserve_
;
AINFO
<<
"
camera_event_id
will be set -1"
;
AWARN
<<
"Failed to find
lane_event_id_
:"
<<
reserve_
;
AINFO
<<
"
lane_event_id_
will be set -1"
;
lane_event_id_
=
-
1
;
}
else
{
lane_event_id_
=
static_cast
<
EventID
>
(
atoi
((
lane_iter
->
second
).
c_str
()));
...
...
@@ -150,8 +150,7 @@ bool FusionSubnode::InitOutputStream() {
Status
FusionSubnode
::
ProcEvents
()
{
for
(
auto
event_meta
:
sub_meta_events_
)
{
// ignore lane event from polling
if
(
event_meta
.
event_id
==
lane_event_id_
)
continue
;
if
(
event_meta
.
event_id
==
lane_event_id_
)
continue
;
// ignore lane event
std
::
vector
<
Event
>
events
;
if
(
!
SubscribeEvents
(
event_meta
,
&
events
))
{
...
...
@@ -305,11 +304,13 @@ bool FusionSubnode::GetSharedData(const Event &event,
}
else
if
(
event
.
event_id
==
camera_event_id_
&&
camera_object_data_
!=
nullptr
)
{
get_data_succ
=
camera_object_data_
->
Get
(
data_key
,
objs
);
// trying to get lane shared data as well
Event
lane_event
;
if
(
event_manager_
->
Subscribe
(
lane_event_id_
,
&
lane_event
,
false
))
{
get_data_succ
=
lane_shared_data_
->
Get
(
data_key
,
&
lane_objects_
);
ADEBUG
<<
"getting lane data successfully for data key "
<<
data_key
;
if
(
lane_shared_data_
!=
nullptr
&&
lane_event_id_
!=
-
1
)
{
Event
lane_event
;
if
(
event_manager_
->
Subscribe
(
lane_event_id_
,
&
lane_event
,
false
))
{
get_data_succ
=
lane_shared_data_
->
Get
(
data_key
,
&
lane_objects_
);
ADEBUG
<<
"getting lane data successfully for data key "
<<
data_key
;
}
}
}
else
{
AERROR
<<
"Event id is not supported. event:"
<<
event
.
to_string
();
...
...
@@ -344,15 +345,17 @@ bool FusionSubnode::GeneratePbMsg(PerceptionObstacles *obstacles) {
}
if
(
FLAGS_use_navigation_mode
)
{
// generate lane marker protobuf messages
LaneMarkers
*
lane_markers
=
obstacles
->
mutable_lane_marker
();
LaneObjectsToLaneMarkerProto
(
*
(
lane_objects_
),
lane_markers
);
// Relative speed of objects + latest ego car speed in X
for
(
auto
obstacle
:
obstacles
->
perception_obstacle
())
{
obstacle
.
mutable_velocity
()
->
set_x
(
obstacle
.
velocity
().
x
()
+
chassis_speed_mps_
);
}
// generate lane marker protobuf messages
if
(
lane_shared_data_
!=
nullptr
&&
lane_event_id_
!=
-
1
)
{
LaneMarkers
*
lane_markers
=
obstacles
->
mutable_lane_marker
();
LaneObjectsToLaneMarkerProto
(
*
(
lane_objects_
),
lane_markers
);
}
}
ADEBUG
<<
"PerceptionObstacles: "
<<
obstacles
->
ShortDebugString
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录