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
e8ea17f8
Commit
e8ea17f8
authored
6 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
compiling and tests ok
parent
5fed25a8
No related branches found
No related tags found
3 merge requests
!39
release after RAL
,
!38
After 2nd RAL submission
,
!3
Resolve "Adapt to emplace API"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/feature/feature_IMU.cpp
+0
-3
0 additions, 3 deletions
src/feature/feature_IMU.cpp
test/gtest_feature_IMU.cpp
+17
-12
17 additions, 12 deletions
test/gtest_feature_IMU.cpp
with
17 additions
and
15 deletions
src/feature/feature_IMU.cpp
+
0
−
3
View file @
e8ea17f8
...
@@ -12,8 +12,6 @@ FeatureIMU::FeatureIMU(const Eigen::VectorXs& _delta_preintegrated,
...
@@ -12,8 +12,6 @@ FeatureIMU::FeatureIMU(const Eigen::VectorXs& _delta_preintegrated,
gyro_bias_preint_
(
_bias
.
tail
<
3
>
()),
gyro_bias_preint_
(
_bias
.
tail
<
3
>
()),
jacobian_bias_
(
_dD_db_jacobians
)
jacobian_bias_
(
_dD_db_jacobians
)
{
{
if
(
_cap_imu_ptr
)
this
->
setCapture
(
_cap_imu_ptr
);
}
}
FeatureIMU
::
FeatureIMU
(
CaptureMotionPtr
_cap_imu_ptr
)
:
FeatureIMU
::
FeatureIMU
(
CaptureMotionPtr
_cap_imu_ptr
)
:
...
@@ -22,7 +20,6 @@ FeatureIMU::FeatureIMU(CaptureMotionPtr _cap_imu_ptr):
...
@@ -22,7 +20,6 @@ FeatureIMU::FeatureIMU(CaptureMotionPtr _cap_imu_ptr):
gyro_bias_preint_
(
_cap_imu_ptr
->
getCalibrationPreint
().
tail
<
3
>
()),
gyro_bias_preint_
(
_cap_imu_ptr
->
getCalibrationPreint
().
tail
<
3
>
()),
jacobian_bias_
(
_cap_imu_ptr
->
getJacobianCalib
())
jacobian_bias_
(
_cap_imu_ptr
->
getJacobianCalib
())
{
{
this
->
setCapture
(
_cap_imu_ptr
);
}
}
FeatureIMU
::~
FeatureIMU
()
FeatureIMU
::~
FeatureIMU
()
...
...
This diff is collapsed.
Click to expand it.
test/gtest_feature_IMU.cpp
+
17
−
12
View file @
e8ea17f8
...
@@ -58,10 +58,15 @@ class FeatureIMU_test : public testing::Test
...
@@ -58,10 +58,15 @@ class FeatureIMU_test : public testing::Test
MatrixXs
P0
;
P0
.
setIdentity
(
9
,
9
);
MatrixXs
P0
;
P0
.
setIdentity
(
9
,
9
);
origin_frame
=
problem
->
setPrior
(
x0
,
P0
,
0.0
,
0.01
);
origin_frame
=
problem
->
setPrior
(
x0
,
P0
,
0.0
,
0.01
);
//
Creat
e one capture to store the IMU data arriving from (sensor / callback / file / etc.)
//
Emplac
e one capture to store the IMU data arriving from (sensor / callback / file / etc.)
// give the capture a big covariance, otherwise it will be so small that it won't pass following assertions
// give the capture a big covariance, otherwise it will be so small that it won't pass following assertions
imu_ptr
=
std
::
make_shared
<
CaptureIMU
>
(
t
,
sensor_ptr
,
data_
,
Eigen
::
Matrix6s
::
Identity
(),
Eigen
::
Vector6s
::
Zero
());
imu_ptr
=
std
::
static_pointer_cast
<
CaptureIMU
>
(
imu_ptr
->
setFrame
(
origin_frame
);
//to get ptr to Frm in processorIMU and then get biases
CaptureBase
::
emplace
<
CaptureIMU
>
(
origin_frame
,
t
,
sensor_ptr
,
data_
,
Eigen
::
Matrix6s
::
Identity
(),
Eigen
::
Vector6s
::
Zero
())
);
//process data
//process data
data_
<<
2
,
0
,
9.8
,
0
,
0
,
0
;
data_
<<
2
,
0
,
9.8
,
0
,
0
,
0
;
...
@@ -74,23 +79,23 @@ class FeatureIMU_test : public testing::Test
...
@@ -74,23 +79,23 @@ class FeatureIMU_test : public testing::Test
// process data in capture
// process data in capture
sensor_ptr
->
process
(
imu_ptr
);
sensor_ptr
->
process
(
imu_ptr
);
//
creat
e Frame
//
emplac
e Frame
ts
=
problem
->
getProcessorMotion
()
->
getBuffer
().
get
().
back
().
ts_
;
ts
=
problem
->
getProcessorMotion
()
->
getBuffer
().
get
().
back
().
ts_
;
state_vec
=
problem
->
getProcessorMotion
()
->
getCurrentState
();
state_vec
=
problem
->
getProcessorMotion
()
->
getCurrentState
();
last_frame
=
problem
->
emplaceFrame
(
KEY
,
state_vec
,
ts
);
last_frame
=
problem
->
emplaceFrame
(
KEY
,
state_vec
,
ts
);
//
creat
e a feature
//
emplac
e a feature
delta_preint
=
problem
->
getProcessorMotion
()
->
getMotion
().
delta_integr_
;
delta_preint
=
problem
->
getProcessorMotion
()
->
getMotion
().
delta_integr_
;
delta_preint_cov
=
problem
->
getProcessorMotion
()
->
getMotion
().
delta_integr_cov_
+
MatrixXs
::
Identity
(
9
,
9
)
*
1e-08
;
delta_preint_cov
=
problem
->
getProcessorMotion
()
->
getMotion
().
delta_integr_cov_
+
MatrixXs
::
Identity
(
9
,
9
)
*
1e-08
;
VectorXs
calib_preint
=
problem
->
getProcessorMotion
()
->
getBuffer
().
getCalibrationPreint
();
VectorXs
calib_preint
=
problem
->
getProcessorMotion
()
->
getBuffer
().
getCalibrationPreint
();
dD_db_jacobians
=
problem
->
getProcessorMotion
()
->
getMotion
().
jacobian_calib_
;
dD_db_jacobians
=
problem
->
getProcessorMotion
()
->
getMotion
().
jacobian_calib_
;
feat_imu
=
std
::
make_shared
<
FeatureIMU
>
(
delta_preint
,
feat_imu
=
std
::
static_pointer_cast
<
FeatureIMU
>
(
delta_preint_cov
,
FeatureBase
::
emplace
<
FeatureIMU
>
(
imu_ptr
,
calib
_preint
,
delta
_preint
,
dD_db_jacobians
,
delta_preint_cov
,
imu_ptr
);
calib_preint
,
feat_imu
->
setCapture
(
imu_ptr
);
//associate the feature to a capture
dD_db_jacobians
,
imu_ptr
)
);
}
}
virtual
void
TearDown
()
virtual
void
TearDown
()
...
...
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