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
adcfcbf0
Commit
adcfcbf0
authored
6 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
adapted to emplace API
parent
e8ea17f8
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
,
!3
Resolve "Adapt to emplace API"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/IMU/processor/processor_IMU.h
+10
-7
10 additions, 7 deletions
include/IMU/processor/processor_IMU.h
src/processor/processor_IMU.cpp
+25
-23
25 additions, 23 deletions
src/processor/processor_IMU.cpp
with
35 additions
and
30 deletions
include/IMU/processor/processor_IMU.h
+
10
−
7
View file @
adcfcbf0
...
...
@@ -52,14 +52,17 @@ class ProcessorIMU : public ProcessorMotion{
Motion
&
_motion
,
TimeStamp
&
_ts
)
override
;
virtual
bool
voteForKeyFrame
()
override
;
virtual
CaptureMotionPtr
createCapture
(
const
TimeStamp
&
_ts
,
const
SensorBasePtr
&
_sensor
,
const
VectorXs
&
_data
,
const
MatrixXs
&
_data_cov
,
const
FrameBasePtr
&
_frame_origin
)
override
;
virtual
FeatureBasePtr
createFeature
(
CaptureMotionPtr
_capture_motion
)
override
;
virtual
CaptureMotionPtr
emplaceCapture
(
const
FrameBasePtr
&
_frame_own
,
const
SensorBasePtr
&
_sensor
,
const
TimeStamp
&
_ts
,
const
VectorXs
&
_data
,
const
MatrixXs
&
_data_cov
,
const
VectorXs
&
_calib
,
const
VectorXs
&
_calib_preint
,
const
FrameBasePtr
&
_frame_origin
)
override
;
virtual
FeatureBasePtr
emplaceFeature
(
CaptureMotionPtr
_capture_motion
)
override
;
virtual
FactorBasePtr
emplaceFactor
(
FeatureBasePtr
_feature_motion
,
CaptureBasePtr
_capture_origin
)
override
;
CaptureBasePtr
_capture_origin
)
override
;
protected
:
ProcessorParamsIMUPtr
params_motion_IMU_
;
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_IMU.cpp
+
25
−
23
View file @
adcfcbf0
...
...
@@ -185,27 +185,34 @@ Motion ProcessorIMU::interpolate(const Motion& _motion_ref, Motion& _motion_seco
}
CaptureMotionPtr
ProcessorIMU
::
createCapture
(
const
TimeStamp
&
_ts
,
const
SensorBasePtr
&
_sensor
,
const
VectorXs
&
_data
,
const
MatrixXs
&
_data_cov
,
const
FrameBasePtr
&
_frame_origin
)
CaptureMotionPtr
ProcessorIMU
::
emplaceCapture
(
const
FrameBasePtr
&
_frame_own
,
const
SensorBasePtr
&
_sensor
,
const
TimeStamp
&
_ts
,
const
VectorXs
&
_data
,
const
MatrixXs
&
_data_cov
,
const
VectorXs
&
_calib
,
const
VectorXs
&
_calib_preint
,
const
FrameBasePtr
&
_frame_origin
)
{
CaptureIMUPtr
capture_imu
=
std
::
make_shared
<
CaptureIMU
>
(
_ts
,
_sensor
,
_data
,
_data_cov
,
_frame_origin
);
return
capture_imu
;
auto
cap_motion
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
CaptureBase
::
emplace
<
CaptureIMU
>
(
_frame_own
,
_ts
,
_sensor
,
_data
,
_data_cov
,
_frame_origin
));
cap_motion
->
setCalibration
(
_calib
);
cap_motion
->
setCalibrationPreint
(
_calib_preint
);
return
cap_motion
;
}
FeatureBasePtr
ProcessorIMU
::
creat
eFeature
(
CaptureMotionPtr
_capture_motion
)
FeatureBasePtr
ProcessorIMU
::
emplac
eFeature
(
CaptureMotionPtr
_capture_motion
)
{
FeatureIMUPtr
feature
=
std
::
make_shared
<
FeatureIMU
>
(
_capture_motion
->
getBuffer
().
get
().
back
().
delta_integr_
,
_capture_motion
->
getBuffer
().
get
().
back
().
delta_integr_cov_
+
unmeasured_perturbation_cov_
,
_capture_motion
->
getBuffer
().
getCalibrationPreint
(),
_capture_motion
->
getBuffer
().
get
().
back
().
jacobian_calib_
);
auto
feature
=
FeatureBase
::
emplace
<
FeatureIMU
>
(
_capture_motion
,
_capture_motion
->
getBuffer
().
get
().
back
().
delta_integr_
,
_capture_motion
->
getBuffer
().
get
().
back
().
delta_integr_cov_
+
unmeasured_perturbation_cov_
,
_capture_motion
->
getBuffer
().
getCalibrationPreint
(),
_capture_motion
->
getBuffer
().
get
().
back
().
jacobian_calib_
);
return
feature
;
}
...
...
@@ -213,13 +220,8 @@ FactorBasePtr ProcessorIMU::emplaceFactor(FeatureBasePtr _feature_motion, Captur
{
CaptureIMUPtr
cap_imu
=
std
::
static_pointer_cast
<
CaptureIMU
>
(
_capture_origin
);
FeatureIMUPtr
ftr_imu
=
std
::
static_pointer_cast
<
FeatureIMU
>
(
_feature_motion
);
// FactorIMUPtr fac_imu = std::make_shared<FactorIMU>(ftr_imu, cap_imu, shared_from_this());
auto
fac_imu
=
FactorBase
::
emplace
<
FactorIMU
>
(
_feature_motion
,
ftr_imu
,
cap_imu
,
shared_from_this
());
// link ot wolf tree
// _feature_motion->addFactor(fac_imu);
// _capture_origin->addConstrainedBy(fac_imu);
// _capture_origin->getFrame()->addConstrainedBy(fac_imu);
auto
fac_imu
=
FactorBase
::
emplace
<
FactorIMU
>
(
_feature_motion
,
ftr_imu
,
cap_imu
,
shared_from_this
());
return
fac_imu
;
}
...
...
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