Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
926f3ea3
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,发现更多精彩内容 >>
提交
926f3ea3
编写于
2月 12, 2018
作者:
L
luoqi06
提交者:
Jiangtao Hu
2月 12, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ThirdParty : Add conti_radar callback
上级
0cbcd25c
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
46 addition
and
9 deletion
+46
-9
modules/third_party_perception/common/third_party_perception_gflags.cc
..._party_perception/common/third_party_perception_gflags.cc
+4
-0
modules/third_party_perception/common/third_party_perception_gflags.h
...d_party_perception/common/third_party_perception_gflags.h
+3
-0
modules/third_party_perception/conf/adapter.conf
modules/third_party_perception/conf/adapter.conf
+6
-2
modules/third_party_perception/third_party_perception.cc
modules/third_party_perception/third_party_perception.cc
+30
-6
modules/third_party_perception/third_party_perception.h
modules/third_party_perception/third_party_perception.h
+3
-1
未找到文件。
modules/third_party_perception/common/third_party_perception_gflags.cc
浏览文件 @
926f3ea3
...
...
@@ -76,3 +76,7 @@ DEFINE_int32(
"a radar object is considered as a movable "
"if it is moving for consecutive movable_frames_count_threshold frames"
);
DEFINE_int32
(
keep_radar_frames
,
5
,
"number of delphi esr frames to keep"
);
// TODO(QiL) : remove this temperary gflags
DEFINE_bool
(
use_conti_radar
,
true
,
"use conti or delphi radar, true is conti, false is delphi"
);
modules/third_party_perception/common/third_party_perception_gflags.h
浏览文件 @
926f3ea3
...
...
@@ -57,4 +57,7 @@ DECLARE_double(movable_heading_threshold);
DECLARE_int32
(
movable_frames_count_threshold
);
DECLARE_int32
(
keep_radar_frames
);
// TODO(QiL) : remove this temperary gflags
DECLARE_bool
(
use_conti_radar
);
#endif
modules/third_party_perception/conf/adapter.conf
浏览文件 @
926f3ea3
...
...
@@ -6,6 +6,10 @@ config {
type
:
DELPHIESR
mode
:
RECEIVE_ONLY
}
config
: {
type
:
CONTI_RADAR
mode
:
RECEIVE_ONLY
}
config
{
type
:
LOCALIZATION
mode
:
RECEIVE_ONLY
...
...
modules/third_party_perception/third_party_perception.cc
浏览文件 @
926f3ea3
...
...
@@ -33,6 +33,7 @@ namespace third_party_perception {
using
apollo
::
common
::
ErrorCode
;
using
apollo
::
common
::
Status
;
using
apollo
::
common
::
adapter
::
AdapterManager
;
using
apollo
::
drivers
::
ContiRadar
;
using
apollo
::
drivers
::
DelphiESR
;
using
apollo
::
drivers
::
Esr_track01_500
;
using
apollo
::
drivers
::
Mobileye
;
...
...
@@ -50,14 +51,23 @@ Status ThirdPartyPerception::Init() {
CHECK
(
AdapterManager
::
GetMobileye
())
<<
"Mobileye is not initialized."
;
AdapterManager
::
AddMobileyeCallback
(
&
ThirdPartyPerception
::
OnMobileye
,
this
);
CHECK
(
AdapterManager
::
GetDelphiESR
())
<<
"DelphiESR is not initialized."
;
AdapterManager
::
AddDelphiESRCallback
(
&
ThirdPartyPerception
::
OnDelphiESR
,
this
);
CHECK
(
AdapterManager
::
GetLocalization
())
<<
"Localization is not initialized."
;
AdapterManager
::
AddLocalizationCallback
(
&
ThirdPartyPerception
::
OnLocalization
,
this
);
// TODO(all) : need to merge the delphi/conti_radar before adaptor manager
// level. This is just temperary change.
if
(
!
FLAGS_use_conti_radar
)
{
CHECK
(
AdapterManager
::
GetDelphiESR
())
<<
"DelphiESR is not initialized."
;
AdapterManager
::
AddDelphiESRCallback
(
&
ThirdPartyPerception
::
OnDelphiESR
,
this
);
}
else
{
CHECK
(
AdapterManager
::
GetContiRadar
())
<<
"GetContiRadar is not initialized."
;
AdapterManager
::
AddContiRadarCallback
(
&
ThirdPartyPerception
::
OnContiRadar
,
this
);
}
return
Status
::
OK
();
}
...
...
@@ -91,7 +101,21 @@ void ThirdPartyPerception::OnDelphiESR(const DelphiESR& message) {
RadarObstacles
filtered_radar_obstacles
=
filter
::
FilterRadarObstacles
(
current_radar_obstacles_
);
if
(
FLAGS_enable_radar
)
{
delphi_esr_obstacles_
=
conversion
::
RadarObstaclesToPerceptionObstacles
(
radar_obstacles_
=
conversion
::
RadarObstaclesToPerceptionObstacles
(
filtered_radar_obstacles
);
}
}
void
ThirdPartyPerception
::
OnContiRadar
(
const
ContiRadar
&
message
)
{
AINFO
<<
"Received delphi esr data: run delphi esr callback."
;
std
::
lock_guard
<
std
::
mutex
>
lock
(
third_party_perception_mutex_
);
last_radar_obstacles_
.
CopyFrom
(
current_radar_obstacles_
);
current_radar_obstacles_
=
conversion
::
ContiToRadarObstacles
(
message
,
localization_
,
last_radar_obstacles_
);
RadarObstacles
filtered_radar_obstacles
=
filter
::
FilterRadarObstacles
(
current_radar_obstacles_
);
if
(
FLAGS_enable_radar
)
{
radar_obstacles_
=
conversion
::
RadarObstaclesToPerceptionObstacles
(
filtered_radar_obstacles
);
}
}
...
...
@@ -108,13 +132,13 @@ void ThirdPartyPerception::OnTimer(const ros::TimerEvent&) {
std
::
lock_guard
<
std
::
mutex
>
lock
(
third_party_perception_mutex_
);
PerceptionObstacles
obstacles
=
fusion
::
MobileyeRadarFusion
(
mobileye_obstacles_
,
delphi_es
r_obstacles_
);
fusion
::
MobileyeRadarFusion
(
mobileye_obstacles_
,
rada
r_obstacles_
);
AdapterManager
::
FillPerceptionObstaclesHeader
(
FLAGS_node_name
,
&
obstacles
);
AdapterManager
::
PublishPerceptionObstacles
(
obstacles
);
mobileye_obstacles_
.
Clear
();
delphi_es
r_obstacles_
.
Clear
();
rada
r_obstacles_
.
Clear
();
}
}
// namespace third_party_perception
...
...
modules/third_party_perception/third_party_perception.h
浏览文件 @
926f3ea3
...
...
@@ -28,6 +28,7 @@
#include "modules/common/apollo_app.h"
#include "modules/common/macro.h"
#include "modules/drivers/proto/conti_radar.pb.h"
#include "modules/drivers/proto/delphi_esr.pb.h"
#include "modules/drivers/proto/mobileye.pb.h"
#include "modules/localization/proto/localization.pb.h"
...
...
@@ -54,6 +55,7 @@ class ThirdPartyPerception : public apollo::common::ApolloApp {
void
OnMobileye
(
const
apollo
::
drivers
::
Mobileye
&
message
);
// Upon receiving radar data
void
OnDelphiESR
(
const
apollo
::
drivers
::
DelphiESR
&
message
);
void
OnContiRadar
(
const
apollo
::
drivers
::
ContiRadar
&
message
);
// Upon receiving localization data
void
OnLocalization
(
const
apollo
::
localization
::
LocalizationEstimate
&
message
);
...
...
@@ -63,7 +65,7 @@ class ThirdPartyPerception : public apollo::common::ApolloApp {
ros
::
Timer
timer_
;
std
::
mutex
third_party_perception_mutex_
;
apollo
::
perception
::
PerceptionObstacles
mobileye_obstacles_
;
apollo
::
perception
::
PerceptionObstacles
delphi_es
r_obstacles_
;
apollo
::
perception
::
PerceptionObstacles
rada
r_obstacles_
;
apollo
::
localization
::
LocalizationEstimate
localization_
;
RadarObstacles
current_radar_obstacles_
;
RadarObstacles
last_radar_obstacles_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录