Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
wolf
Merge requests
!177
Hotfix
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Hotfix
hotfix
into
master
Overview
0
Commits
3
Pipelines
1
Changes
1
Merged
Joan Solà Ortega
requested to merge
hotfix
into
master
7 years ago
Overview
0
Commits
3
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Viewing commit
8cf936c8
Prev
Next
Show latest version
1 file
+
11
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
8cf936c8
getState(): Fix the capture where the calibration params were obtained
· 8cf936c8
Dinesh Atchuthan
authored
7 years ago
src/processor_motion.cpp
+
11
−
8
Options
@@ -267,18 +267,21 @@ void ProcessorMotion::getState(const TimeStamp& _ts, Eigen::VectorXs& _x)
// We need to search in previous keyframes for the capture containing a motion buffer with the queried time stamp
capture_motion
=
getCaptureMotionContainingTimeStamp
(
_ts
);
if
(
capture_motion
)
if
(
capture_motion
)
// We found a CaptureMotion whose buffer contains the time stamp
{
// We found a CaptureMotion whose buffer contains the time stamp
VectorXs
state_0
=
capture_motion
->
getOriginFramePtr
()
->
getState
();
// Get origin state and calibration
VectorXs
state_0
=
capture_motion
->
getOriginFramePtr
()
->
getState
();
CaptureBasePtr
cap_orig
=
capture_motion
->
getOriginFramePtr
()
->
getCaptureOf
(
getSensorPtr
());
VectorXs
calib
=
cap_orig
->
getCalibration
();
// Get delta and correct it with new bias
VectorXs
calib_preint
=
capture_motion
->
getBuffer
().
getCalibrationPreint
();
Motion
motion
=
capture_motion
->
getBuffer
().
getMotion
(
_ts
);
VectorXs
delta_error
=
motion
.
jacobian_calib_
*
(
origin_ptr_
->
getCalibration
()
-
calib_preint
);
VectorXs
delta
=
capture_motion
->
correctDelta
(
motion
.
delta_integr_
,
delta_error
);
VectorXs
calib_preint
=
capture_motion
->
getBuffer
().
getCalibrationPreint
();
Motion
motion
=
capture_motion
->
getBuffer
().
getMotion
(
_ts
);
VectorXs
delta_step
=
motion
.
jacobian_calib_
*
(
calib
-
calib_preint
);
VectorXs
delta
=
capture_motion
->
correctDelta
(
motion
.
delta_integr_
,
delta_step
);
// Compose on top of state using the buffered time stamp, not the query time stamp
// Compose on top of
origin
state using the buffered time stamp, not the query time stamp
// TODO Interpolate the delta to produce a state at the query time stamp _ts
Scalar
dt
=
motion
.
ts_
-
capture_motion
->
getBuffer
().
get
().
front
().
ts_
;
// = _ts - capture_motion->getOriginPtr()->getTimeStamp();
statePlusDelta
(
state_0
,
delta
,
dt
,
_x
);
Loading