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
90dfa096
Commit
90dfa096
authored
4 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Update gtest_processor_motion_intrinsics_update.cpp
parent
46f21215
No related branches found
No related tags found
3 merge requests
!39
release after RAL
,
!38
After 2nd RAL submission
,
!26
Motion intrinsics update gtest
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/gtest_processor_motion_intrinsics_update.cpp
+9
-6
9 additions, 6 deletions
test/gtest_processor_motion_intrinsics_update.cpp
with
9 additions
and
6 deletions
test/gtest_processor_motion_intrinsics_update.cpp
+
9
−
6
View file @
90dfa096
...
...
@@ -66,7 +66,6 @@ class ProcessorImuTest : public testing::Test
// params and processor
params_
=
std
::
make_shared
<
ParamsProcessorImu
>
();
params_
->
voting_active
=
true
;
params_
->
voting_aux_active
=
false
;
params_
->
max_time_span
=
0.9999
;
// create one KF every second
params_
->
max_buff_length
=
1000000000
;
params_
->
dist_traveled
=
100000000000
;
...
...
@@ -150,8 +149,12 @@ TEST_F(ProcessorImuTest, test1)
}
/**
* SET TO TRUE TO PRODUCE CSV FILE
* SET TO FALSE TO STOP PRODUCING CSV FILE
*/
#define WRITE_CSV_FILE false
//#define WRITE_CSV_FILE // COMMENT OUT THIS LINE TO AVOID PRODUCING CSV FILE
TEST_F
(
ProcessorImuTest
,
getState
)
{
Matrix6d
data_cov
;
data_cov
.
setIdentity
();
...
...
@@ -166,7 +169,7 @@ TEST_F(ProcessorImuTest, getState)
double
dt
(
0.1
);
int
nb_kf
=
1
;
#if
def
WRITE_CSV_FILE
#if WRITE_CSV_FILE
std
::
fstream
file_est
;
file_est
.
open
(
"./est.csv"
,
std
::
fstream
::
out
);
// std::string header_est = "t,px,py,pz,qx,qy,qz,qw,vx,vy,vz,bax_est,bax_preint\n";
...
...
@@ -182,7 +185,7 @@ TEST_F(ProcessorImuTest, getState)
std
::
cout
<<
"t "
<<
t
<<
"; cap id "
<<
sensor_
->
findLastCaptureBefore
(
t
)
<<
"; cap ts "
<<
sensor_
->
findLastCaptureBefore
(
t
)
->
getTimeStamp
()
<<
std
::
endl
;
#if
def
WRITE_CSV_FILE
#if WRITE_CSV_FILE
// pre-solve print to CSV
VectorComposite
state
=
problem_
->
getState
(
t
);
VectorXd
calib_estim
=
sensor_
->
getIntrinsic
(
t
)
->
getState
();
...
...
@@ -205,7 +208,7 @@ TEST_F(ProcessorImuTest, getState)
nb_kf
=
problem_
->
getTrajectory
()
->
getFrameMap
().
size
();
#if
def
WRITE_CSV_FILE
#if WRITE_CSV_FILE
// post-solve print to CSV with time-stamp shifted by dt/2 to separate from pre-solve result
state
=
problem_
->
getState
(
t
);
calib_estim
=
sensor_
->
getIntrinsic
(
t
)
->
getState
();
...
...
@@ -221,7 +224,7 @@ TEST_F(ProcessorImuTest, getState)
t
+=
dt
;
}
#if
def
WRITE_CSV_FILE
#if WRITE_CSV_FILE
file_est
.
close
();
#endif
}
...
...
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