Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
aab16153
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,发现更多精彩内容 >>
未验证
提交
aab16153
编写于
10月 22, 2020
作者:
L
lishuanghua
提交者:
GitHub
10月 22, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
D-Kit : Add localization timer (#12796)
上级
f2fef815
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
12 deletion
+8
-12
modules/localization/msf/BUILD
modules/localization/msf/BUILD
+1
-2
modules/localization/msf/msf_localization.cc
modules/localization/msf/msf_localization.cc
+5
-1
modules/localization/msf/msf_localization.h
modules/localization/msf/msf_localization.h
+2
-1
modules/localization/msf/msf_localization_component.cc
modules/localization/msf/msf_localization_component.cc
+0
-5
modules/localization/msf/msf_localization_component.h
modules/localization/msf/msf_localization_component.h
+0
-3
未找到文件。
modules/localization/msf/BUILD
浏览文件 @
aab16153
...
...
@@ -59,8 +59,7 @@ cc_binary(
cc_test
(
name
=
"msf_localization_test"
,
size
=
"small"
,
timeout
=
"short"
,
size
=
"enormous"
,
srcs
=
[
"msf_localization_test.cc"
],
copts
=
[
"-fno-access-control"
,
...
...
modules/localization/msf/msf_localization.cc
浏览文件 @
aab16153
...
...
@@ -185,6 +185,10 @@ void MSFLocalization::InitParams() {
FLAGS_localization_std_x_threshold_2
;
localization_param_
.
localization_std_y_threshold_2
=
FLAGS_localization_std_y_threshold_2
;
localization_timer_
.
reset
(
new
cyber
::
Timer
(
10
,
[
this
]()
{
this
->
OnLocalizationTimer
();
},
false
));
localization_timer_
->
Start
();
}
void
MSFLocalization
::
OnPointCloud
(
...
...
@@ -304,7 +308,7 @@ void MSFLocalization::OnGnssHeading(
localization_integ_
.
GnssHeadingProcess
(
*
gnss_heading_msg
);
}
void
MSFLocalization
::
On
Gps
()
{
void
MSFLocalization
::
On
LocalizationTimer
()
{
if
(
!
raw_imu_msg_
)
{
return
;
}
...
...
modules/localization/msf/msf_localization.h
浏览文件 @
aab16153
...
...
@@ -75,9 +75,9 @@ class MSFLocalization {
const
std
::
shared_ptr
<
drivers
::
gnss
::
GnssBestPose
>
&
bestgnsspos_msg
);
void
OnGnssHeading
(
const
std
::
shared_ptr
<
drivers
::
gnss
::
Heading
>
&
gnss_heading_msg
);
void
OnGps
();
void
SetPublisher
(
const
std
::
shared_ptr
<
LocalizationMsgPublisher
>
&
publisher
);
void
OnLocalizationTimer
();
private:
bool
LoadGnssAntennaExtrinsic
(
const
std
::
string
&
file_path
,
double
*
offset_x
,
...
...
@@ -105,6 +105,7 @@ class MSFLocalization {
std
::
shared_ptr
<
LocalizationMsgPublisher
>
publisher_
;
std
::
shared_ptr
<
drivers
::
gnss
::
Imu
>
raw_imu_msg_
;
std
::
mutex
mutex_imu_msg_
;
std
::
unique_ptr
<
cyber
::
Timer
>
localization_timer_
=
nullptr
;
};
}
// namespace localization
...
...
modules/localization/msf/msf_localization_component.cc
浏览文件 @
aab16153
...
...
@@ -49,7 +49,6 @@ bool MSFLocalizationComponent::InitConfig() {
lidar_topic_
=
FLAGS_lidar_topic
;
bestgnsspos_topic_
=
FLAGS_gnss_best_pose_topic
;
gnss_heading_topic_
=
FLAGS_heading_topic
;
gps_topic_
=
FLAGS_gps_topic
;
if
(
!
publisher_
->
InitConfig
())
{
AERROR
<<
"Init publisher config failed."
;
...
...
@@ -90,10 +89,6 @@ bool MSFLocalizationComponent::InitIO() {
gnss_heading_listener_
=
this
->
node_
->
CreateReader
<
drivers
::
gnss
::
Heading
>
(
gnss_heading_topic_
,
gnss_heading_call
);
std
::
function
<
void
(
const
std
::
shared_ptr
<
Gps
>&
gps_msg
)
>
gps_call
=
std
::
bind
(
&
MSFLocalization
::
OnGps
,
&
localization_
);
gps_listener_
=
this
->
node_
->
CreateReader
<
Gps
>
(
gps_topic_
,
gps_call
);
// init writer
if
(
!
publisher_
->
InitIO
())
{
AERROR
<<
"Init publisher io failed."
;
...
...
modules/localization/msf/msf_localization_component.h
浏览文件 @
aab16153
...
...
@@ -63,9 +63,6 @@ class MSFLocalizationComponent final
gnss_heading_listener_
=
nullptr
;
std
::
string
gnss_heading_topic_
=
""
;
std
::
shared_ptr
<
cyber
::
Reader
<
Gps
>>
gps_listener_
=
nullptr
;
std
::
string
gps_topic_
=
""
;
private:
std
::
shared_ptr
<
LocalizationMsgPublisher
>
publisher_
;
MSFLocalization
localization_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录