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
ab9aec50
Commit
ab9aec50
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Implement lists of NodeOther and API
parent
0c888c06
No related branches found
No related tags found
1 merge request
!346
Resolve "Frame/Capture/Feature/Landmark Other as list/vectors in FactorBase"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/factor/factor_base.h
+4
-4
4 additions, 4 deletions
include/core/factor/factor_base.h
src/factor/factor_base.cpp
+32
-32
32 additions, 32 deletions
src/factor/factor_base.cpp
with
36 additions
and
36 deletions
include/core/factor/factor_base.h
+
4
−
4
View file @
ab9aec50
...
@@ -182,10 +182,10 @@ class FactorBase : public NodeBase, public std::enable_shared_from_this<FactorBa
...
@@ -182,10 +182,10 @@ class FactorBase : public NodeBase, public std::enable_shared_from_this<FactorBa
FeatureBaseWPtrList
getFeatureOtherList
()
const
{
return
feature_other_list_
;
}
FeatureBaseWPtrList
getFeatureOtherList
()
const
{
return
feature_other_list_
;
}
LandmarkBaseWPtrList
getLandmarkOtherList
()
const
{
return
landmark_other_list_
;
}
LandmarkBaseWPtrList
getLandmarkOtherList
()
const
{
return
landmark_other_list_
;
}
bool
hasFrameOther
(
const
FrameBasePtr
&
_frm_other
);
bool
hasFrameOther
(
const
FrameBasePtr
&
_frm_other
)
const
;
bool
hasCaptureOther
(
const
CaptureBasePtr
&
_cap_other
);
bool
hasCaptureOther
(
const
CaptureBasePtr
&
_cap_other
)
const
;
bool
hasFeatureOther
(
const
FeatureBasePtr
&
_ftr_other
);
bool
hasFeatureOther
(
const
FeatureBasePtr
&
_ftr_other
)
const
;
bool
hasLandmarkOther
(
const
LandmarkBasePtr
&
_lmk_other
);
bool
hasLandmarkOther
(
const
LandmarkBasePtr
&
_lmk_other
)
const
;
public
:
public
:
/**
/**
...
...
This diff is collapsed.
Click to expand it.
src/factor/factor_base.cpp
+
32
−
32
View file @
ab9aec50
...
@@ -169,60 +169,60 @@ void FactorBase::setStatus(FactorStatus _status)
...
@@ -169,60 +169,60 @@ void FactorBase::setStatus(FactorStatus _status)
status_
=
_status
;
status_
=
_status
;
}
}
bool
FactorBase
::
hasFrameOther
(
const
FrameBasePtr
&
_frm_other
)
bool
FactorBase
::
hasFrameOther
(
const
FrameBasePtr
&
_frm_other
)
const
{
{
FrameBaseW
PtrList
::
iterato
r
frm_it
=
find_if
(
frame_other_list_
.
begin
(),
FrameBaseW
ConstIte
r
frm_it
=
find_if
(
frame_other_list_
.
begin
(),
frame_other_list_
.
end
(),
frame_other_list_
.
end
(),
[
_frm_other
](
const
FrameBaseWPtr
&
frm_ow
)
[
_frm_other
](
const
FrameBaseWPtr
&
frm_ow
)
{
{
return
frm_ow
.
lock
()
==
_frm_other
;
return
frm_ow
.
lock
()
==
_frm_other
;
}
}
);
);
if
(
frm_it
!=
frame_other_list_
.
end
())
if
(
frm_it
!=
frame_other_list_
.
end
())
return
true
;
return
true
;
return
false
;
return
false
;
}
}
bool
FactorBase
::
hasCaptureOther
(
const
CaptureBasePtr
&
_cap_other
)
bool
FactorBase
::
hasCaptureOther
(
const
CaptureBasePtr
&
_cap_other
)
const
{
{
CaptureBaseW
PtrList
::
iterato
r
cap_it
=
find_if
(
capture_other_list_
.
begin
(),
CaptureBaseW
ConstIte
r
cap_it
=
find_if
(
capture_other_list_
.
begin
(),
capture_other_list_
.
end
(),
capture_other_list_
.
end
(),
[
_cap_other
](
const
CaptureBaseWPtr
&
cap_ow
)
[
_cap_other
](
const
CaptureBaseWPtr
&
cap_ow
)
{
{
return
cap_ow
.
lock
()
==
_cap_other
;
return
cap_ow
.
lock
()
==
_cap_other
;
}
}
);
);
if
(
cap_it
!=
capture_other_list_
.
end
())
if
(
cap_it
!=
capture_other_list_
.
end
())
return
true
;
return
true
;
return
false
;
return
false
;
}
}
bool
FactorBase
::
hasFeatureOther
(
const
FeatureBasePtr
&
_ftr_other
)
bool
FactorBase
::
hasFeatureOther
(
const
FeatureBasePtr
&
_ftr_other
)
const
{
{
FeatureBaseW
PtrList
::
iterato
r
ftr_it
=
find_if
(
feature_other_list_
.
begin
(),
FeatureBaseW
ConstIte
r
ftr_it
=
find_if
(
feature_other_list_
.
begin
(),
feature_other_list_
.
end
(),
feature_other_list_
.
end
(),
[
_ftr_other
](
const
FeatureBaseWPtr
&
ftr_ow
)
[
_ftr_other
](
const
FeatureBaseWPtr
&
ftr_ow
)
{
{
return
ftr_ow
.
lock
()
==
_ftr_other
;
return
ftr_ow
.
lock
()
==
_ftr_other
;
}
}
);
);
if
(
ftr_it
!=
feature_other_list_
.
end
())
if
(
ftr_it
!=
feature_other_list_
.
end
())
return
true
;
return
true
;
return
false
;
return
false
;
}
}
bool
FactorBase
::
hasLandmarkOther
(
const
LandmarkBasePtr
&
_lmk_other
)
bool
FactorBase
::
hasLandmarkOther
(
const
LandmarkBasePtr
&
_lmk_other
)
const
{
{
LandmarkBaseW
PtrList
::
iterato
r
lmk_it
=
find_if
(
landmark_other_list_
.
begin
(),
LandmarkBaseW
ConstIte
r
lmk_it
=
find_if
(
landmark_other_list_
.
begin
(),
landmark_other_list_
.
end
(),
landmark_other_list_
.
end
(),
[
_lmk_other
](
const
LandmarkBaseWPtr
&
lmk_ow
)
[
_lmk_other
](
const
LandmarkBaseWPtr
&
lmk_ow
)
{
{
return
lmk_ow
.
lock
()
==
_lmk_other
;
return
lmk_ow
.
lock
()
==
_lmk_other
;
}
}
);
);
if
(
lmk_it
!=
landmark_other_list_
.
end
())
if
(
lmk_it
!=
landmark_other_list_
.
end
())
return
true
;
return
true
;
...
...
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