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
Commits
16696e80
Commit
16696e80
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Plain Diff
Merge branch 'hotfix' into 'master'
Hotfix See merge request mobile_robotics/wolf!177
parents
652d7b84
8cf936c8
No related branches found
No related tags found
1 merge request
!177
Hotfix
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/problem.cpp
+6
-0
6 additions, 0 deletions
src/problem.cpp
src/processor_motion.cpp
+16
-5
16 additions, 5 deletions
src/processor_motion.cpp
with
22 additions
and
5 deletions
src/problem.cpp
+
6
−
0
View file @
16696e80
...
...
@@ -822,6 +822,12 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks)
}
else
cout
<<
" -> S-"
;
if
(
C
->
isMotion
())
{
auto
CM
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
C
);
if
(
CM
->
getOriginFramePtr
())
cout
<<
" -> OF"
<<
CM
->
getOriginFramePtr
()
->
id
();
}
cout
<<
((
depth
<
3
)
?
" -- "
+
std
::
to_string
(
C
->
getFeatureList
().
size
())
+
"f"
:
""
);
if
(
constr_by
)
...
...
This diff is collapsed.
Click to expand it.
src/processor_motion.cpp
+
16
−
5
View file @
16696e80
...
...
@@ -267,12 +267,23 @@ 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
();
VectorXs
delta
=
capture_motion
->
getDeltaCorrected
(
origin_ptr_
->
getCalibration
(),
_ts
);
Scalar
dt
=
_ts
-
capture_motion
->
getBuffer
().
get
().
front
().
ts_
;
// 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_step
=
motion
.
jacobian_calib_
*
(
calib
-
calib_preint
);
VectorXs
delta
=
capture_motion
->
correctDelta
(
motion
.
delta_integr_
,
delta_step
);
// 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
);
}
else
...
...
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