Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
imu
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
imu
Commits
846e0553
Commit
846e0553
authored
4 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add post-solve info to CSV file
parent
9b1ad12c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!39
release after RAL
,
!38
After 2nd RAL submission
,
!26
Motion intrinsics update gtest
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
test/gtest_processor_motion_intrinsics_update.cpp
+24
-16
24 additions, 16 deletions
test/gtest_processor_motion_intrinsics_update.cpp
with
25 additions
and
16 deletions
.gitignore
+
1
−
0
View file @
846e0553
...
@@ -33,3 +33,4 @@ src/examples/map_apriltag_save.yaml
...
@@ -33,3 +33,4 @@ src/examples/map_apriltag_save.yaml
build_release/
build_release/
IMU.found
IMU.found
est.csv
This diff is collapsed.
Click to expand it.
test/gtest_processor_motion_intrinsics_update.cpp
+
24
−
16
View file @
846e0553
...
@@ -167,8 +167,9 @@ TEST_F(ProcessorImuTest, getState)
...
@@ -167,8 +167,9 @@ TEST_F(ProcessorImuTest, getState)
std
::
fstream
file_est
;
std
::
fstream
file_est
;
file_est
.
open
(
"/home/mfourmy/Documents/Phd_LAAS/phd_misc/PhdTests/est.csv"
,
std
::
fstream
::
out
);
file_est
.
open
(
"./est.csv"
,
std
::
fstream
::
out
);
std
::
string
header_est
=
"t,px,py,pz,qx,qy,qz,qw,vx,vy,vz,bax,bax_preint
\n
"
;
// std::string header_est = "t,px,py,pz,qx,qy,qz,qw,vx,vy,vz,bax_est,bax_preint\n";
std
::
string
header_est
=
"t;px;vx;bax_est;bax_preint
\n
"
;
file_est
<<
header_est
;
file_est
<<
header_est
;
...
@@ -176,22 +177,19 @@ TEST_F(ProcessorImuTest, getState)
...
@@ -176,22 +177,19 @@ TEST_F(ProcessorImuTest, getState)
auto
C
=
std
::
make_shared
<
CaptureImu
>
(
t
,
sensor_
,
data
,
data_cov
,
KF0_
->
getCaptureList
().
front
());
auto
C
=
std
::
make_shared
<
CaptureImu
>
(
t
,
sensor_
,
data
,
data_cov
,
KF0_
->
getCaptureList
().
front
());
C
->
process
();
C
->
process
();
VectorComposite
state
=
problem_
->
getState
(
t
);
VectorComposite
state
=
problem_
->
getState
(
t
);
VectorXd
calib
=
sensor_
->
getIntrinsic
(
t
)
->
getState
();
VectorXd
calib
_estim
=
sensor_
->
getIntrinsic
(
t
)
->
getState
();
VectorXd
calib_preint
=
processor_
->
getLast
()
->
getCalibrationPreint
();
VectorXd
calib_preint
=
processor_
->
getLast
()
->
getCalibrationPreint
();
std
::
cout
<<
"calib size: "
<<
calib
.
size
()
<<
std
::
endl
;
std
::
cout
<<
"calib size: "
<<
calib
_estim
.
size
()
<<
std
::
endl
;
std
::
cout
<<
"calib_preint size: "
<<
calib_preint
.
size
()
<<
std
::
endl
;
std
::
cout
<<
"calib_preint size: "
<<
calib_preint
.
size
()
<<
std
::
endl
;
file_est
<<
t
<<
","
<<
state
[
'P'
](
0
)
<<
","
std
::
cout
<<
"t "
<<
t
<<
"; cap id "
<<
sensor_
->
findLastCaptureBefore
(
t
)
<<
"; cap ts "
<<
sensor_
->
findLastCaptureBefore
(
t
)
->
getTimeStamp
()
<<
std
::
endl
;
<<
state
[
'P'
](
1
)
<<
","
<<
state
[
'P'
](
2
)
<<
","
<<
state
[
'O'
](
0
)
<<
","
// pre-solve print to CSV
<<
state
[
'O'
](
1
)
<<
","
file_est
<<
std
::
fixed
<<
t
<<
";"
<<
state
[
'O'
](
2
)
<<
","
<<
state
[
'P'
](
0
)
<<
";"
<<
state
[
'O'
](
3
)
<<
","
<<
state
[
'V'
](
0
)
<<
";"
<<
state
[
'V'
](
0
)
<<
","
<<
calib_estim
(
0
)
<<
";"
<<
state
[
'V'
](
1
)
<<
","
<<
state
[
'V'
](
2
)
<<
","
<<
calib
(
0
)
<<
","
<<
calib_preint
(
0
)
<<
"
\n
"
;
<<
calib_preint
(
0
)
<<
"
\n
"
;
...
@@ -205,6 +203,16 @@ TEST_F(ProcessorImuTest, getState)
...
@@ -205,6 +203,16 @@ TEST_F(ProcessorImuTest, getState)
problem_
->
print
(
4
,
true
,
true
,
true
);
problem_
->
print
(
4
,
true
,
true
,
true
);
nb_kf
++
;
nb_kf
++
;
// post-solve print to CSV with time-stamp shifted by dt/2 to separate from pre-solve result
VectorComposite
state
=
problem_
->
getState
(
t
);
VectorXd
calib_estim
=
sensor_
->
getIntrinsic
(
t
)
->
getState
();
VectorXd
calib_preint
=
processor_
->
getLast
()
->
getCalibrationPreint
();
file_est
<<
std
::
fixed
<<
t
+
dt
/
2
<<
";"
<<
state
[
'P'
](
0
)
<<
";"
<<
state
[
'V'
](
0
)
<<
";"
<<
calib_estim
(
0
)
<<
";"
<<
calib_preint
(
0
)
<<
"
\n
"
;
}
}
t
+=
dt
;
t
+=
dt
;
...
...
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