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
88be8197
Commit
88be8197
authored
1 month ago
by
cont-integration
Browse files
Options
Downloads
Patches
Plain Diff
[skip ci] applied clang format
parent
9e004ff8
No related branches found
Branches containing commit
No related tags found
1 merge request
!49
Draft: Resolve "Adapt to new sensor constructors in core"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_imu_3d.cpp
+19
-18
19 additions, 18 deletions
src/processor/processor_imu_3d.cpp
with
19 additions
and
18 deletions
src/processor/processor_imu_3d.cpp
+
19
−
18
View file @
88be8197
...
@@ -100,13 +100,13 @@ bool ProcessorImu3d::voteForKeyFrame() const
...
@@ -100,13 +100,13 @@ bool ProcessorImu3d::voteForKeyFrame() const
return
false
;
return
false
;
}
}
CaptureMotionPtr
ProcessorImu3d
::
emplaceCapture
(
const
FrameBasePtr
&
_frame_own
,
CaptureMotionPtr
ProcessorImu3d
::
emplaceCapture
(
const
FrameBasePtr
&
_frame_own
,
const
SensorBasePtr
&
_sensor
,
const
SensorBasePtr
&
_sensor
,
const
TimeStamp
&
_ts
,
const
TimeStamp
&
_ts
,
const
VectorXd
&
_data
,
const
VectorXd
&
_data
,
const
MatrixXd
&
_data_cov
,
const
MatrixXd
&
_data_cov
,
const
VectorXd
&
_calib
,
const
VectorXd
&
_calib
,
const
VectorXd
&
_calib_preint
,
const
VectorXd
&
_calib_preint
,
const
CaptureBasePtr
&
_capture_origin
)
const
CaptureBasePtr
&
_capture_origin
)
{
{
auto
cap_motion
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
auto
cap_motion
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
...
@@ -178,9 +178,9 @@ void ProcessorImu3d::computeCurrentDelta(const Eigen::VectorXd &_data,
...
@@ -178,9 +178,9 @@ void ProcessorImu3d::computeCurrentDelta(const Eigen::VectorXd &_data,
const
Eigen
::
MatrixXd
&
_data_cov
,
const
Eigen
::
MatrixXd
&
_data_cov
,
const
Eigen
::
VectorXd
&
_calib
,
const
Eigen
::
VectorXd
&
_calib
,
const
double
_dt
,
const
double
_dt
,
Eigen
::
VectorXd
&
_delta
,
Eigen
::
VectorXd
&
_delta
,
Eigen
::
MatrixXd
&
_delta_cov
,
Eigen
::
MatrixXd
&
_delta_cov
,
Eigen
::
MatrixXd
&
_jac_delta_calib
)
const
Eigen
::
MatrixXd
&
_jac_delta_calib
)
const
{
{
assert
(
_data
.
size
()
==
data_size_
&&
"Wrong data size!"
);
assert
(
_data
.
size
()
==
data_size_
&&
"Wrong data size!"
);
...
@@ -219,7 +219,7 @@ void ProcessorImu3d::computeCurrentDelta(const Eigen::VectorXd &_data,
...
@@ -219,7 +219,7 @@ void ProcessorImu3d::computeCurrentDelta(const Eigen::VectorXd &_data,
void
ProcessorImu3d
::
deltaPlusDelta
(
const
Eigen
::
VectorXd
&
_delta_preint
,
void
ProcessorImu3d
::
deltaPlusDelta
(
const
Eigen
::
VectorXd
&
_delta_preint
,
const
Eigen
::
VectorXd
&
_delta
,
const
Eigen
::
VectorXd
&
_delta
,
const
double
_dt
,
const
double
_dt
,
Eigen
::
VectorXd
&
_delta_preint_plus_delta
)
const
Eigen
::
VectorXd
&
_delta_preint_plus_delta
)
const
{
{
/* MATHS according to Sola-16
/* MATHS according to Sola-16
* Dp' = Dp + Dv*dt + 1/2*Dq*(a-a_b)*dt^2 = Dp + Dv*dt + Dq*dp if dp =
* Dp' = Dp + Dv*dt + 1/2*Dq*(a-a_b)*dt^2 = Dp + Dv*dt + Dq*dp if dp =
...
@@ -236,7 +236,7 @@ void ProcessorImu3d::deltaPlusDelta(const Eigen::VectorXd &_delta_preint,
...
@@ -236,7 +236,7 @@ void ProcessorImu3d::deltaPlusDelta(const Eigen::VectorXd &_delta_preint,
void
ProcessorImu3d
::
statePlusDelta
(
const
VectorComposite
&
_x
,
void
ProcessorImu3d
::
statePlusDelta
(
const
VectorComposite
&
_x
,
const
Eigen
::
VectorXd
&
_delta
,
const
Eigen
::
VectorXd
&
_delta
,
const
double
_dt
,
const
double
_dt
,
VectorComposite
&
_x_plus_delta
)
const
VectorComposite
&
_x_plus_delta
)
const
{
{
assert
(
_delta
.
size
()
==
10
&&
"Wrong _delta vector size"
);
assert
(
_delta
.
size
()
==
10
&&
"Wrong _delta vector size"
);
assert
(
_dt
>=
0
&&
"Time interval _dt is negative!"
);
assert
(
_dt
>=
0
&&
"Time interval _dt is negative!"
);
...
@@ -256,9 +256,9 @@ void ProcessorImu3d::statePlusDelta(const VectorComposite &_x,
...
@@ -256,9 +256,9 @@ void ProcessorImu3d::statePlusDelta(const VectorComposite &_x,
void
ProcessorImu3d
::
deltaPlusDelta
(
const
Eigen
::
VectorXd
&
_delta_preint
,
void
ProcessorImu3d
::
deltaPlusDelta
(
const
Eigen
::
VectorXd
&
_delta_preint
,
const
Eigen
::
VectorXd
&
_delta
,
const
Eigen
::
VectorXd
&
_delta
,
const
double
_dt
,
const
double
_dt
,
Eigen
::
VectorXd
&
_delta_preint_plus_delta
,
Eigen
::
VectorXd
&
_delta_preint_plus_delta
,
Eigen
::
MatrixXd
&
_jacobian_delta_preint
,
Eigen
::
MatrixXd
&
_jacobian_delta_preint
,
Eigen
::
MatrixXd
&
_jacobian_delta
)
const
Eigen
::
MatrixXd
&
_jacobian_delta
)
const
{
{
/*
/*
* Expression of the delta integration step, D' = D (+) d:
* Expression of the delta integration step, D' = D (+) d:
...
@@ -391,7 +391,8 @@ void ProcessorImu3d::bootstrap()
...
@@ -391,7 +391,8 @@ void ProcessorImu3d::bootstrap()
bias_init
.
tail
<
3
>
()
=
last_ptr_
->
getBuffer
().
back
().
data_
.
tail
<
3
>
();
bias_init
.
tail
<
3
>
()
=
last_ptr_
->
getBuffer
().
back
().
data_
.
tail
<
3
>
();
// Acc bias is not observable, computing a warm start
// Acc bias is not observable, computing a warm start
// Bias that provide exactly 'g' at the estimated orientation
// Bias that provide exactly 'g' at the estimated orientation
bias_init
.
head
<
3
>
()
=
Vector3d
::
Zero
();
// last_ptr_->getBuffer().back().data_.head<3>() - q_w_l * g_w;
bias_init
.
head
<
3
>
()
=
Vector3d
::
Zero
();
// last_ptr_->getBuffer().back().data_.head<3>() - q_w_l * g_w;
WOLF_DEBUG
(
"////////////////////////////////////////////////////"
);
WOLF_DEBUG
(
"////////////////////////////////////////////////////"
);
WOLF_DEBUG
(
"q_l_s: "
,
q_l_s
.
coeffs
().
transpose
());
WOLF_DEBUG
(
"q_l_s: "
,
q_l_s
.
coeffs
().
transpose
());
WOLF_DEBUG
(
"g_l: "
,
g_l
.
transpose
());
WOLF_DEBUG
(
"g_l: "
,
g_l
.
transpose
());
...
@@ -560,8 +561,8 @@ bool ProcessorImu3d::recomputeStates() const
...
@@ -560,8 +561,8 @@ bool ProcessorImu3d::recomputeStates() const
const
auto
&
cap_origin
=
cap
->
getOriginCapture
();
const
auto
&
cap_origin
=
cap
->
getOriginCapture
();
const
auto
&
frm_origin
=
cap_origin
->
getFrame
();
const
auto
&
frm_origin
=
cap_origin
->
getFrame
();
const
auto
&
delta
=
VectorComposite
({{
'P'
,
ftr
->
getMeasurement
().
head
<
3
>
()},
const
auto
&
delta
=
VectorComposite
({{
'P'
,
ftr
->
getMeasurement
().
head
<
3
>
()},
{
'O'
,
ftr
->
getMeasurement
().
segment
<
4
>
(
3
)},
{
'O'
,
ftr
->
getMeasurement
().
segment
<
4
>
(
3
)},
{
'V'
,
ftr
->
getMeasurement
().
tail
<
3
>
()}});
{
'V'
,
ftr
->
getMeasurement
().
tail
<
3
>
()}});
const
auto
&
x_origin
=
frm_origin
->
getState
();
const
auto
&
x_origin
=
frm_origin
->
getState
();
auto
dt
=
cap
->
getTimeStamp
()
-
cap_origin
->
getTimeStamp
();
auto
dt
=
cap
->
getTimeStamp
()
-
cap_origin
->
getTimeStamp
();
auto
x
=
imu
::
composeOverState
(
x_origin
,
delta
,
dt
);
auto
x
=
imu
::
composeOverState
(
x_origin
,
delta
,
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