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
1be38ec6
Commit
1be38ec6
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add API shortcuts to factors
parent
614488c4
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
+8
-0
8 additions, 0 deletions
include/core/factor/factor_base.h
src/factor/factor_base.cpp
+12
-0
12 additions, 0 deletions
src/factor/factor_base.cpp
with
20 additions
and
0 deletions
include/core/factor/factor_base.h
+
8
−
0
View file @
1be38ec6
...
@@ -144,6 +144,14 @@ class FactorBase : public NodeBase, public std::enable_shared_from_this<FactorBa
...
@@ -144,6 +144,14 @@ class FactorBase : public NodeBase, public std::enable_shared_from_this<FactorBa
**/
**/
CaptureBasePtr
getCapture
()
const
;
CaptureBasePtr
getCapture
()
const
;
/** \brief Returns a pointer to its frame
**/
FrameBasePtr
getFrame
()
const
;
/** \brief Returns a pointer to its capture's sensor
**/
SensorBasePtr
getSensor
()
const
;
/** \brief Returns the factor residual size
/** \brief Returns the factor residual size
**/
**/
virtual
unsigned
int
getSize
()
const
=
0
;
virtual
unsigned
int
getSize
()
const
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/factor/factor_base.cpp
+
12
−
0
View file @
1be38ec6
...
@@ -155,6 +155,18 @@ CaptureBasePtr FactorBase::getCapture() const
...
@@ -155,6 +155,18 @@ CaptureBasePtr FactorBase::getCapture() const
return
getFeature
()
->
getCapture
();
return
getFeature
()
->
getCapture
();
}
}
FrameBasePtr
FactorBase
::
getFrame
()
const
{
assert
(
getCapture
()
!=
nullptr
&&
"calling getFrame before linking with a capture"
);
return
getCapture
()
->
getFrame
();
}
SensorBasePtr
FactorBase
::
getSensor
()
const
{
assert
(
getCapture
()
!=
nullptr
&&
"calling getSensor before linking with a capture"
);
return
getCapture
()
->
getSensor
();
}
void
FactorBase
::
setStatus
(
FactorStatus
_status
)
void
FactorBase
::
setStatus
(
FactorStatus
_status
)
{
{
if
(
getProblem
()
==
nullptr
)
if
(
getProblem
()
==
nullptr
)
...
...
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