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
bccd0283
Commit
bccd0283
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
lock() != nullptr instead of expired()
parent
3e31b91c
No related branches found
No related tags found
1 merge request
!394
Resolve "Safe and more complete print()"
Pipeline
#5913
passed
4 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/factor/factor_base.cpp
+28
-30
28 additions, 30 deletions
src/factor/factor_base.cpp
with
28 additions
and
30 deletions
src/factor/factor_base.cpp
+
28
−
30
View file @
bccd0283
...
...
@@ -316,27 +316,27 @@ void FactorBase::printHeader(int _depth, bool _constr_by, bool _metric, bool _st
for
(
const
auto
&
Fow
:
getFrameOtherList
())
{
auto
Fo
w_sh
=
Fow
.
lock
();
if
(
Fo
w_sh
)
_stream
<<
" Frm"
<<
Fo
w_sh
->
id
();
auto
Fo
=
Fow
.
lock
();
if
(
Fo
)
_stream
<<
" Frm"
<<
Fo
->
id
();
}
for
(
const
auto
&
Cow
:
getCaptureOtherList
())
{
auto
Co
w_sh
=
Cow
.
lock
();
if
(
Co
w_sh
)
_stream
<<
" Cap"
<<
Co
w_sh
->
id
();
auto
Co
=
Cow
.
lock
();
if
(
Co
)
_stream
<<
" Cap"
<<
Co
->
id
();
}
for
(
const
auto
&
fow
:
getFeatureOtherList
())
{
auto
fo
w_sh
=
fow
.
lock
();
if
(
fo
w_sh
)
_stream
<<
" Ftr"
<<
fo
w_sh
->
id
();
auto
fo
=
fow
.
lock
();
if
(
fo
)
_stream
<<
" Ftr"
<<
fo
->
id
();
}
for
(
const
auto
&
Low
:
getLandmarkOtherList
())
{
auto
Lo
w_sh
=
Low
.
lock
();
if
(
Lo
w_sh
)
_stream
<<
" Lmk"
<<
Lo
w_sh
->
id
();
auto
Lo
=
Low
.
lock
();
if
(
Lo
)
_stream
<<
" Lmk"
<<
Lo
->
id
();
}
_stream
<<
std
::
endl
;
}
...
...
@@ -366,9 +366,9 @@ CheckLog FactorBase::localCheck(bool _verbose, FactorBasePtr _fac_ptr, std::ostr
// find constrained_by pointer in constrained frame
for
(
const
auto
&
Fow
:
getFrameOtherList
())
{
if
(
!
Fow
.
expired
())
const
auto
&
Fo
=
Fow
.
lock
();
if
(
Fo
)
{
const
auto
&
Fo
=
Fow
.
lock
();
if
(
_verbose
)
{
_stream
<<
" ( --> Frm"
<<
Fo
->
id
()
<<
" <- "
;
...
...
@@ -389,10 +389,9 @@ CheckLog FactorBase::localCheck(bool _verbose, FactorBasePtr _fac_ptr, std::ostr
// find constrained_by pointer in constrained capture
for
(
const
auto
&
Cow
:
getCaptureOtherList
())
{
if
(
!
Cow
.
expired
())
const
auto
&
Co
=
Cow
.
lock
();
if
(
Co
)
{
const
auto
&
Co
=
Cow
.
lock
();
if
(
_verbose
)
{
_stream
<<
" ( --> Cap"
<<
Co
->
id
()
<<
" <- "
;
...
...
@@ -413,9 +412,9 @@ CheckLog FactorBase::localCheck(bool _verbose, FactorBasePtr _fac_ptr, std::ostr
// find constrained_by pointer in constrained feature
for
(
const
auto
&
fow
:
getFeatureOtherList
())
{
if
(
!
fow
.
expired
())
const
auto
&
fo
=
fow
.
lock
();
if
(
fo
)
{
const
auto
&
fo
=
fow
.
lock
();
if
(
_verbose
)
{
_stream
<<
" ( --> Ftr"
<<
fo
->
id
()
<<
" <- "
;
...
...
@@ -436,10 +435,9 @@ CheckLog FactorBase::localCheck(bool _verbose, FactorBasePtr _fac_ptr, std::ostr
// find constrained_by pointer in constrained landmark
for
(
const
auto
&
Low
:
getLandmarkOtherList
())
{
if
(
Low
.
expired
())
const
auto
&
Lo
=
Low
.
lock
();
if
(
Lo
)
{
const
auto
&
Lo
=
Low
.
lock
();
if
(
_verbose
)
{
_stream
<<
" ( --> Lmk"
<<
Lo
->
id
()
<<
" <- "
;
...
...
@@ -530,9 +528,9 @@ CheckLog FactorBase::localCheck(bool _verbose, FactorBasePtr _fac_ptr, std::ostr
// find in constrained Frame
for
(
const
auto
&
Fow
:
getFrameOtherList
())
{
if
(
!
Fow
.
expired
())
const
auto
&
Fo
=
Fow
.
lock
();
if
(
Fo
)
{
const
auto
&
Fo
=
Fow
.
lock
();
found_here
=
Fo
->
hasStateBlock
(
sb
);
if
(
found_here
&&
_verbose
)
_stream
<<
" FrmO"
<<
Fo
->
id
();
found
=
found
||
found_here
;
...
...
@@ -551,9 +549,9 @@ CheckLog FactorBase::localCheck(bool _verbose, FactorBasePtr _fac_ptr, std::ostr
// find in constrained Capture
for
(
const
auto
&
Cow
:
getCaptureOtherList
())
{
if
(
!
Cow
.
expired
())
const
auto
&
Co
=
Cow
.
lock
();
if
(
Co
)
{
const
auto
&
Co
=
Cow
.
lock
();
found_here
=
Co
->
hasStateBlock
(
sb
);
if
(
found_here
&&
_verbose
)
_stream
<<
" CapO"
<<
Co
->
id
();
found
=
found
||
found_here
;
...
...
@@ -563,9 +561,9 @@ CheckLog FactorBase::localCheck(bool _verbose, FactorBasePtr _fac_ptr, std::ostr
// find in constrained Feature
for
(
const
auto
&
fow
:
getFeatureOtherList
())
{
if
(
!
fow
.
expired
())
const
auto
&
fo
=
fow
.
lock
();
if
(
fo
)
{
const
auto
&
fo
=
fow
.
lock
();
// find in constrained feature's Frame
auto
foF
=
fo
->
getFrame
();
found_here
=
foF
->
hasStateBlock
(
sb
);
...
...
@@ -589,9 +587,9 @@ CheckLog FactorBase::localCheck(bool _verbose, FactorBasePtr _fac_ptr, std::ostr
// find in constrained landmark
for
(
const
auto
&
Low
:
getLandmarkOtherList
())
{
if
(
!
Low
.
expired
())
const
auto
&
Lo
=
Low
.
lock
();
if
(
Lo
)
{
const
auto
&
Lo
=
Low
.
lock
();
found_here
=
Lo
->
hasStateBlock
(
sb
);
if
(
found_here
&&
_verbose
)
_stream
<<
" LmkO"
<<
Lo
->
id
();
found
=
found
||
found_here
;
...
...
This diff is collapsed.
Click to expand it.
Joan Vallvé Navarro
@joanvallve
mentioned in commit
f51d0557
·
4 years ago
mentioned in commit
f51d0557
mentioned in commit f51d0557ee437affe60084d3d178dd683990e1b9
Toggle commit list
Joan Vallvé Navarro
@joanvallve
mentioned in commit
ad060899
·
4 years ago
mentioned in commit
ad060899
mentioned in commit ad060899e9a3ed4b899a88b253ed5c2cc335a624
Toggle commit list
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