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
c85bbde2
There was a problem fetching the pipeline mini graph.
Commit
c85bbde2
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fix lastCapture() and rename to lastKeyCapture()
parent
0c8ad97c
No related branches found
No related tags found
1 merge request
!176
Fix lastCapture() and rename to lastKeyCapture()
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sensor_base.cpp
+10
-7
10 additions, 7 deletions
src/sensor_base.cpp
src/sensor_base.h
+1
-1
1 addition, 1 deletion
src/sensor_base.h
with
11 additions
and
8 deletions
src/sensor_base.cpp
+
10
−
7
View file @
c85bbde2
...
...
@@ -218,18 +218,21 @@ void SensorBase::setNoiseCov(const Eigen::MatrixXs& _noise_cov) {
noise_cov_
=
_noise_cov
;
}
CaptureBasePtr
SensorBase
::
lastCapture
(
void
)
CaptureBasePtr
SensorBase
::
last
Key
Capture
(
void
)
{
// we search for the most recent Capture of this sensor
// we search for the most recent Capture of this sensor
which belongs to a KeyFrame
CaptureBasePtr
capture
=
nullptr
;
FrameBaseList
frame_list
=
getProblem
()
->
getTrajectoryPtr
()
->
getFrameList
();
FrameBaseRevIter
frame_rev_it
=
frame_list
.
rbegin
();
while
(
frame_rev_it
!=
frame_list
.
rend
())
{
CaptureBasePtr
capture
=
(
*
frame_rev_it
)
->
getCaptureOf
(
shared_from_this
());
if
(
capture
)
// found the most recent Capture made by this sensor !
break
;
if
((
*
frame_rev_it
)
->
isKey
())
{
capture
=
(
*
frame_rev_it
)
->
getCaptureOf
(
shared_from_this
());
if
(
capture
)
// found the most recent Capture made by this sensor !
break
;
}
frame_rev_it
++
;
}
return
capture
;
...
...
@@ -340,7 +343,7 @@ StateBlockPtr SensorBase::getStateBlockPtrDynamic(unsigned int _i)
{
if
((
_i
<
2
&&
this
->
extrinsicsInCaptures
())
||
(
_i
>=
2
&&
intrinsicsInCaptures
()))
{
CaptureBasePtr
cap
=
lastCapture
();
CaptureBasePtr
cap
=
last
Key
Capture
();
if
(
cap
)
return
cap
->
getStateBlockPtr
(
_i
);
else
...
...
This diff is collapsed.
Click to expand it.
src/sensor_base.h
+
1
−
1
View file @
c85bbde2
...
...
@@ -102,7 +102,7 @@ class SensorBase : public NodeBase, public std::enable_shared_from_this<SensorBa
ProcessorBasePtr
addProcessor
(
ProcessorBasePtr
_proc_ptr
);
ProcessorBaseList
&
getProcessorList
();
CaptureBasePtr
lastCapture
(
void
);
CaptureBasePtr
last
Key
Capture
(
void
);
CaptureBasePtr
lastCapture
(
const
TimeStamp
&
_ts
);
bool
process
(
const
CaptureBasePtr
capture_ptr
);
...
...
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