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
830600b7
Commit
830600b7
authored
2 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Check factor type in bootstrap operations
parent
d8a6b85f
No related branches found
No related tags found
2 merge requests
!54
devel->main
,
!53
Resolve "Remove bias drift from FactorImu"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_imu.cpp
+19
-13
19 additions, 13 deletions
src/processor/processor_imu.cpp
with
19 additions
and
13 deletions
src/processor/processor_imu.cpp
+
19
−
13
View file @
830600b7
...
...
@@ -444,9 +444,12 @@ VectorXd ProcessorImu::bootstrapDelta() const
for
(
const
auto
&
fac
:
bootstrap_factor_list_
)
// here, we take advantage of the list of IMU factors to recover all deltas
{
dt
=
fac
->
getCapture
()
->
getTimeStamp
()
-
fac
->
getCaptureOther
()
->
getTimeStamp
();
const
auto
&
delta
=
fac
->
getFeature
()
->
getMeasurement
();
// In FeatImu, delta = measurement
delta_int
=
imu
::
compose
(
delta_int
,
delta
,
dt
);
if
(
std
::
dynamic_pointer_cast
<
FactorImu
>
(
fac
)
!=
nullptr
)
{
dt
=
fac
->
getCapture
()
->
getTimeStamp
()
-
fac
->
getCaptureOther
()
->
getTimeStamp
();
const
auto
&
delta
=
fac
->
getFeature
()
->
getMeasurement
();
// In FeatImu, delta = measurement
delta_int
=
imu
::
compose
(
delta_int
,
delta
,
dt
);
}
}
// now compose with delta in last_ptr_
dt
=
last_ptr_
->
getBuffer
().
back
().
ts_
-
origin_ptr_
->
getTimeStamp
();
...
...
@@ -466,16 +469,19 @@ bool ProcessorImu::recomputeStates() const
WOLF_DEBUG
(
"Recomputing IMU keyframe states..."
);
for
(
const
auto
&
fac
:
bootstrap_factor_list_
)
{
const
auto
&
ftr
=
fac
->
getFeature
();
const
auto
&
cap
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
ftr
->
getCapture
());
const
auto
&
frm
=
cap
->
getFrame
();
const
auto
&
cap_origin
=
cap
->
getOriginCapture
();
const
auto
&
frm_origin
=
cap_origin
->
getFrame
();
const
auto
&
delta
=
VectorComposite
(
ftr
->
getMeasurement
(),
"POV"
,
{
3
,
4
,
3
});
const
auto
&
x_origin
=
frm_origin
->
getState
();
auto
dt
=
cap
->
getTimeStamp
()
-
cap_origin
->
getTimeStamp
();
auto
x
=
imu
::
composeOverState
(
x_origin
,
delta
,
dt
);
frm
->
setState
(
x
);
if
(
std
::
dynamic_pointer_cast
<
FactorImu
>
(
fac
)
!=
nullptr
)
{
const
auto
&
ftr
=
fac
->
getFeature
();
const
auto
&
cap
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
ftr
->
getCapture
());
const
auto
&
frm
=
cap
->
getFrame
();
const
auto
&
cap_origin
=
cap
->
getOriginCapture
();
const
auto
&
frm_origin
=
cap_origin
->
getFrame
();
const
auto
&
delta
=
VectorComposite
(
ftr
->
getMeasurement
(),
"POV"
,
{
3
,
4
,
3
});
const
auto
&
x_origin
=
frm_origin
->
getState
();
auto
dt
=
cap
->
getTimeStamp
()
-
cap_origin
->
getTimeStamp
();
auto
x
=
imu
::
composeOverState
(
x_origin
,
delta
,
dt
);
frm
->
setState
(
x
);
}
}
return
true
;
}
...
...
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