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
ce712f07
Commit
ce712f07
authored
4 weeks ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
fixed bootstrapping
parent
263cb1e1
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
+11
-6
11 additions, 6 deletions
src/processor/processor_imu_3d.cpp
with
11 additions
and
6 deletions
src/processor/processor_imu_3d.cpp
+
11
−
6
View file @
ce712f07
...
@@ -318,8 +318,15 @@ void ProcessorImu3d::bootstrap()
...
@@ -318,8 +318,15 @@ void ProcessorImu3d::bootstrap()
// ALL TIMES:
// ALL TIMES:
// To all frames not processed yet:
// To all frames not processed yet:
// Fix zero velocity, initialize zero PO, and add zero 3D relative pose factors
// Fix zero velocity, initialize zero PO, and add zero 3D relative pose factors
while
(
bootstrap_last_frame_
!=
getProblem
()
->
getLastFrame
())
while
(
bootstrap_last_frame_
!=
getProblem
()
->
getLastFrame
()
and
getProblem
()
->
getLastFrame
())
{
{
// first frame
if
(
not
bootstrap_last_frame_
)
bootstrap_last_frame_
=
first_capture
->
getFrame
();
else
// next
bootstrap_last_frame_
=
bootstrap_last_frame_
->
getNextFrame
();
// emplace missing states
// emplace missing states
getProblem
()
->
emplaceStatesToFrame
(
bootstrap_last_frame_
,
getProblem
()
->
stateZero
(
getStateKeys
()));
getProblem
()
->
emplaceStatesToFrame
(
bootstrap_last_frame_
,
getProblem
()
->
stateZero
(
getStateKeys
()));
...
@@ -328,7 +335,8 @@ void ProcessorImu3d::bootstrap()
...
@@ -328,7 +335,8 @@ void ProcessorImu3d::bootstrap()
bootstrap_last_frame_
->
getV
()
->
fix
();
bootstrap_last_frame_
->
getV
()
->
fix
();
// Initialize state as same as first frame
// Initialize state as same as first frame
bootstrap_last_frame_
->
setState
(
first_capture
->
getFrame
()
->
getState
(
"PO"
));
if
(
first_capture
->
getFrame
()
!=
bootstrap_last_frame_
)
bootstrap_last_frame_
->
setState
(
first_capture
->
getFrame
()
->
getState
(
"PO"
));
// Factor zero-relative pose
// Factor zero-relative pose
if
(
bootstrap_last_frame_
->
getPreviousFrame
())
if
(
bootstrap_last_frame_
->
getPreviousFrame
())
...
@@ -348,13 +356,10 @@ void ProcessorImu3d::bootstrap()
...
@@ -348,13 +356,10 @@ void ProcessorImu3d::bootstrap()
false
,
false
,
TOP_MOTION
);
TOP_MOTION
);
}
}
// next
bootstrap_last_frame_
=
bootstrap_last_frame_
->
getNextFrame
();
}
}
// ONLY AFTER bootstrap_averaging_length_ seconds:
// ONLY AFTER bootstrap_averaging_length_ seconds:
// Orientation initialization aligning with g
//
To all problem:
Orientation initialization aligning with g
if
(
t_current
-
first_capture
->
getTimeStamp
()
>=
bootstrap_averaging_length_
)
if
(
t_current
-
first_capture
->
getTimeStamp
()
>=
bootstrap_averaging_length_
)
{
{
// get initial IMU frame 's' expressed in local world frame 'l'
// get initial IMU frame 's' expressed in local world frame 'l'
...
...
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