Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bodydynamics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
plugins
bodydynamics
Commits
41776c9b
Commit
41776c9b
authored
4 years ago
by
Médéric Fourmy
Browse files
Options
Downloads
Patches
Plain Diff
Fix imu bias save bug
parent
75cfde3e
No related branches found
No related tags found
2 merge requests
!18
Release after RAL
,
!17
After 2nd RAL submission
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
demos/solo_real_pov_estimation.cpp
+13
-12
13 additions, 12 deletions
demos/solo_real_pov_estimation.cpp
with
13 additions
and
12 deletions
demos/solo_real_pov_estimation.cpp
+
13
−
12
View file @
41776c9b
...
@@ -494,11 +494,11 @@ int main (int argc, char **argv) {
...
@@ -494,11 +494,11 @@ int main (int argc, char **argv) {
imu_bias
=
sen_imu
->
getIntrinsic
()
->
getState
();
imu_bias
=
sen_imu
->
getIntrinsic
()
->
getState
();
Vector7d
extr_mocap_est
;
extr_mocap_est
<<
sensor_pose
->
getP
()
->
getState
(),
sensor_pose
->
getO
()
->
getState
();
Vector7d
extr_mocap_est
;
extr_mocap_est
<<
sensor_pose
->
getP
()
->
getState
(),
sensor_pose
->
getO
()
->
getState
();
mempcpy
(
o_p_ob_fbk_carr
+
3
*
i
,
o_p_ob
.
data
(),
3
*
sizeof
(
double
));
mempcpy
(
o_p_ob_fbk_carr
+
3
*
i
,
o_p_ob
.
data
(),
3
*
sizeof
(
double
));
mempcpy
(
o_q_b_fbk_carr
+
4
*
i
,
o_qvec_b
.
data
(),
4
*
sizeof
(
double
));
mempcpy
(
o_q_b_fbk_carr
+
4
*
i
,
o_qvec_b
.
data
(),
4
*
sizeof
(
double
));
mempcpy
(
o_v_ob_fbk_carr
+
3
*
i
,
o_v_ob
.
data
(),
3
*
sizeof
(
double
));
mempcpy
(
o_v_ob_fbk_carr
+
3
*
i
,
o_v_ob
.
data
(),
3
*
sizeof
(
double
));
mempcpy
(
imu_bias_fbk_carr
+
6
*
i
,
imu_bias
.
data
(),
6
*
sizeof
(
double
));
mempcpy
(
imu_bias_fbk_carr
+
6
*
i
,
imu_bias
.
data
(),
6
*
sizeof
(
double
));
mempcpy
(
extr_mocap_fbk_carr
+
7
*
i
,
extr_mocap_est
.
data
(),
7
*
sizeof
(
double
));
mempcpy
(
extr_mocap_fbk_carr
+
7
*
i
,
extr_mocap_est
.
data
(),
7
*
sizeof
(
double
));
p_ob_fbk_v
.
push_back
(
o_p_ob
);
p_ob_fbk_v
.
push_back
(
o_p_ob
);
q_ob_fbk_v
.
push_back
(
o_qvec_b
);
q_ob_fbk_v
.
push_back
(
o_qvec_b
);
...
@@ -515,7 +515,7 @@ int main (int argc, char **argv) {
...
@@ -515,7 +515,7 @@ int main (int argc, char **argv) {
problem
->
print
(
4
,
true
,
true
,
true
);
problem
->
print
(
4
,
true
,
true
,
true
);
std
::
cout
<<
report
<<
std
::
endl
;
std
::
cout
<<
report
<<
std
::
endl
;
}
}
double
o_p_ob_carr
[
3
*
N
];
double
o_p_ob_carr
[
3
*
N
];
double
o_q_b_carr
[
4
*
N
];
double
o_q_b_carr
[
4
*
N
];
double
o_v_ob_carr
[
3
*
N
];
double
o_v_ob_carr
[
3
*
N
];
...
@@ -527,8 +527,9 @@ int main (int argc, char **argv) {
...
@@ -527,8 +527,9 @@ int main (int argc, char **argv) {
Vector4d
o_qvec_i
=
state_est
[
'O'
];
Vector4d
o_qvec_i
=
state_est
[
'O'
];
Vector3d
o_v_oi
=
state_est
[
'V'
];
Vector3d
o_v_oi
=
state_est
[
'V'
];
Vector6d
imu_bias
=
sen_imu
->
getStateBlockDynamic
(
'I'
,
t_arr
[
i
])
->
getState
();
auto
sb
=
sen_imu
->
getStateBlockDynamic
(
'I'
,
t_arr
[
i
]);
std
::
cout
<<
t_arr
[
i
]
<<
", imu_bias: "
<<
imu_bias
.
transpose
()
<<
std
::
endl
;
Vector6d
imu_bias
=
sb
->
getState
();
// std::cout << t_arr[i] << ", imu_bias: " << imu_bias.transpose() << std::endl;
Vector3d
i_omg_oi_unbiased
=
(
i_omg_oi
-
imu_bias
.
tail
<
3
>
());
Vector3d
i_omg_oi_unbiased
=
(
i_omg_oi
-
imu_bias
.
tail
<
3
>
());
Matrix3d
o_R_i
=
Quaterniond
(
o_qvec_i
).
toRotationMatrix
();
Matrix3d
o_R_i
=
Quaterniond
(
o_qvec_i
).
toRotationMatrix
();
...
@@ -539,10 +540,10 @@ int main (int argc, char **argv) {
...
@@ -539,10 +540,10 @@ int main (int argc, char **argv) {
// Vector3d o_p_ob = o_p_oi;
// Vector3d o_p_ob = o_p_oi;
// Vector3d o_v_ob = o_v_oi;
// Vector3d o_v_ob = o_v_oi;
mempcpy
(
o_p_ob_carr
+
3
*
i
,
o_p_ob
.
data
(),
3
*
sizeof
(
double
));
mempcpy
(
o_p_ob_carr
+
3
*
i
,
o_p_ob
.
data
(),
3
*
sizeof
(
double
));
mempcpy
(
o_q_b_carr
+
4
*
i
,
o_qvec_b
.
data
(),
4
*
sizeof
(
double
));
mempcpy
(
o_q_b_carr
+
4
*
i
,
o_qvec_b
.
data
(),
4
*
sizeof
(
double
));
mempcpy
(
o_v_ob_carr
+
3
*
i
,
o_v_ob
.
data
(),
3
*
sizeof
(
double
));
mempcpy
(
o_v_ob_carr
+
3
*
i
,
o_v_ob
.
data
(),
3
*
sizeof
(
double
));
mempcpy
(
imu_bias_carr
+
3
*
i
,
imu_bias
.
data
(),
3
*
sizeof
(
double
));
mempcpy
(
imu_bias_carr
+
6
*
i
,
imu_bias
.
data
(),
6
*
sizeof
(
double
));
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment