Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
56827af4
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,发现更多精彩内容 >>
提交
56827af4
编写于
6月 26, 2019
作者:
Z
zhouyao
提交者:
Xiangquan Xiao
6月 27, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use corrected imu from SINS
上级
6e5e084f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
37 addition
and
12 deletion
+37
-12
modules/localization/msf/local_integ/localization_integ_impl.cc
...s/localization/msf/local_integ/localization_integ_impl.cc
+13
-12
modules/localization/msf/local_integ/localization_integ_process.cc
...ocalization/msf/local_integ/localization_integ_process.cc
+19
-0
modules/localization/msf/local_integ/localization_integ_process.h
...localization/msf/local_integ/localization_integ_process.h
+5
-0
未找到文件。
modules/localization/msf/local_integ/localization_integ_impl.cc
浏览文件 @
56827af4
...
...
@@ -144,6 +144,10 @@ void LocalizationIntegImpl::ImuProcessImpl(const ImuData& imu_data) {
IntegState
state
;
LocalizationEstimate
integ_localization
;
integ_process_
->
GetResult
(
&
state
,
&
integ_localization
);
ImuData
corrected_imu
;
integ_process_
->
GetRemoveBiasImu
(
&
corrected_imu
);
InertialParameter
earth_param
;
integ_process_
->
GetEarthParameter
(
&
earth_param
);
// check msf running status and set msf_status in integ_localization
LocalizationIntegStatus
integ_status
;
...
...
@@ -160,8 +164,8 @@ void LocalizationIntegImpl::ImuProcessImpl(const ImuData& imu_data) {
}
// set linear acceleration
Eigen
::
Vector3d
orig_acceleration
(
imu_data
.
fb
[
0
],
imu_data
.
fb
[
1
],
imu_data
.
fb
[
2
]);
Eigen
::
Vector3d
orig_acceleration
(
corrected_imu
.
fb
[
0
],
corrected_imu
.
fb
[
1
],
corrected_imu
.
fb
[
2
]);
const
apollo
::
common
::
Quaternion
&
orientation
=
integ_localization
.
pose
().
orientation
();
Eigen
::
Quaternion
<
double
>
quaternion
(
orientation
.
qw
(),
orientation
.
qx
(),
...
...
@@ -170,11 +174,7 @@ void LocalizationIntegImpl::ImuProcessImpl(const ImuData& imu_data) {
static_cast
<
Eigen
::
Vector3d
>
(
quaternion
*
orig_acceleration
);
// Remove gravity.
// Gravity on the Earth's surface varies by around 0.7%.
// From 9.7639 m/s2 on the Nevado Huascaran mountain in Peru
// to 9.8337 m/s2 at the surface of the Arctic Ocean
// Here we simply subtract a standard gravity, by definition, 9.80665.
vec_acceleration
(
2
)
-=
9.80665
;
vec_acceleration
(
2
)
-=
earth_param
.
g
;
apollo
::
common
::
Point3D
*
linear_acceleration
=
posepb_loc
->
mutable_linear_acceleration
();
...
...
@@ -192,8 +192,9 @@ void LocalizationIntegImpl::ImuProcessImpl(const ImuData& imu_data) {
linear_acceleration_vrf
->
set_z
(
vec_acceleration_vrf
(
2
));
// set angular velocity
Eigen
::
Vector3d
orig_angular_velocity
(
imu_data
.
wibb
[
0
],
imu_data
.
wibb
[
1
],
imu_data
.
wibb
[
2
]);
Eigen
::
Vector3d
orig_angular_velocity
(
corrected_imu
.
wibb
[
0
],
corrected_imu
.
wibb
[
1
],
corrected_imu
.
wibb
[
2
]);
Eigen
::
Vector3d
vec_angular_velocity
=
static_cast
<
Eigen
::
Vector3d
>
(
quaternion
.
toRotationMatrix
()
*
orig_angular_velocity
);
apollo
::
common
::
Point3D
*
angular_velocity
=
...
...
@@ -204,9 +205,9 @@ void LocalizationIntegImpl::ImuProcessImpl(const ImuData& imu_data) {
apollo
::
common
::
Point3D
*
angular_velocity_vrf
=
posepb_loc
->
mutable_angular_velocity_vrf
();
angular_velocity_vrf
->
set_x
(
imu_data
.
wibb
[
0
]);
angular_velocity_vrf
->
set_y
(
imu_data
.
wibb
[
1
]);
angular_velocity_vrf
->
set_z
(
imu_data
.
wibb
[
2
]);
angular_velocity_vrf
->
set_x
(
corrected_imu
.
wibb
[
0
]);
angular_velocity_vrf
->
set_y
(
corrected_imu
.
wibb
[
1
]);
angular_velocity_vrf
->
set_z
(
corrected_imu
.
wibb
[
2
]);
lastest_integ_localization_
=
LocalizationResult
(
LocalizationMeasureState
(
static_cast
<
int
>
(
state
)),
...
...
modules/localization/msf/local_integ/localization_integ_process.cc
浏览文件 @
56827af4
...
...
@@ -35,6 +35,8 @@ LocalizationIntegProcess::LocalizationIntegProcess()
integ_state_
(
IntegState
::
NOT_INIT
),
ins_pva_
(),
pva_covariance_
{
0.0
},
corrected_imu_
(),
earth_param_
(),
keep_running_
(
false
),
measure_data_queue_size_
(
150
),
delay_output_counter_
(
0
)
{}
...
...
@@ -102,6 +104,8 @@ void LocalizationIntegProcess::RawImuProcess(const ImuData &imu_msg) {
// add imu msg and get current predict pose
sins_
->
AddImu
(
imu_msg
);
sins_
->
GetPose
(
&
ins_pva_
,
pva_covariance_
);
sins_
->
GetRemoveBiasImu
(
&
corrected_imu_
);
sins_
->
GetEarthParameter
(
&
earth_param_
);
if
(
sins_
->
IsSinsAligned
())
{
integ_state_
=
IntegState
::
NOT_STABLE
;
...
...
@@ -241,6 +245,21 @@ void LocalizationIntegProcess::GetResult(IntegState *state, InsPva *sins_pva,
return
;
}
void
LocalizationIntegProcess
::
GetRemoveBiasImu
(
ImuData
*
imu_data
)
{
CHECK_NOTNULL
(
imu_data
);
*
imu_data
=
corrected_imu_
;
return
;
}
void
LocalizationIntegProcess
::
GetEarthParameter
(
InertialParameter
*
earth_param
)
{
CHECK_NOTNULL
(
earth_param
);
*
earth_param
=
earth_param_
;
return
;
}
void
LocalizationIntegProcess
::
MeasureDataProcess
(
const
MeasureData
&
measure_msg
)
{
measure_data_queue_mutex_
.
lock
();
...
...
modules/localization/msf/local_integ/localization_integ_process.h
浏览文件 @
56827af4
...
...
@@ -60,6 +60,8 @@ class LocalizationIntegProcess {
void
GetResult
(
IntegState
*
state
,
LocalizationEstimate
*
localization
);
void
GetResult
(
IntegState
*
state
,
InsPva
*
sins_pva
,
double
pva_covariance
[
9
][
9
]);
void
GetRemoveBiasImu
(
ImuData
*
imu_data
);
void
GetEarthParameter
(
InertialParameter
*
earth_param
);
// itegration measure data process
void
MeasureDataProcess
(
const
MeasureData
&
measure_msg
);
...
...
@@ -89,6 +91,9 @@ class LocalizationIntegProcess {
InsPva
ins_pva_
;
double
pva_covariance_
[
9
][
9
];
ImuData
corrected_imu_
;
InertialParameter
earth_param_
;
std
::
atomic
<
bool
>
keep_running_
;
std
::
queue
<
MeasureData
>
measure_data_queue_
;
int
measure_data_queue_size_
=
150
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录