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
451aba0a
Commit
451aba0a
authored
3 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
new processor created
parent
d5426d0e
No related branches found
No related tags found
1 merge request
!419
Resolve "Processor motion model"
Pipeline
#6718
passed
3 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/processor/processor_frame_factor.h
+80
-0
80 additions, 0 deletions
include/core/processor/processor_frame_factor.h
src/processor/processor_frame_factor.cpp
+36
-0
36 additions, 0 deletions
src/processor/processor_frame_factor.cpp
with
116 additions
and
0 deletions
include/core/processor/processor_frame_factor.h
0 → 100644
+
80
−
0
View file @
451aba0a
/*
* processor_frame_factor.h
*
* Created on: Sep 6, 2021
* Author: joanvallve
*/
#ifndef INCLUDE_CORE_PROCESSOR_PROCESSOR_FRAME_FACTOR_H_
#define INCLUDE_CORE_PROCESSOR_PROCESSOR_FRAME_FACTOR_H_
#include
"core/processor/processor_base.h"
namespace
wolf
{
WOLF_STRUCT_PTR_TYPEDEFS
(
ParamsProcessorFrameFactor
);
struct
ParamsProcessorFrameFactor
:
public
ParamsProcessorBase
{
ParamsProcessorFrameFactor
()
=
default
;
ParamsProcessorFrameFactor
(
std
::
string
_unique_name
,
const
wolf
::
ParamsServer
&
_server
)
:
ParamsProcessorBase
(
_unique_name
,
_server
)
{
}
std
::
string
print
()
const
override
{
return
ParamsProcessorBase
::
print
();
}
};
WOLF_PTR_TYPEDEFS
(
ProcessorFrameFactor
);
class
ProcessorFrameFactor
:
public
ProcessorBase
{
public:
ProcessorFrameFactor
(
ParamsProcessorMotionModelPtr
);
// Factory method for high level API
WOLF_PROCESSOR_CREATE
(
ProcessorFrameFactor
,
ParamsProcessorFrameFactor
);
virtual
~
ProcessorFrameFactor
()
override
;
void
configure
(
SensorBasePtr
_sensor
)
override
{};
protected
:
/** \brief process an incoming capture NEVER CALLED
*/
virtual
void
processCapture
(
CaptureBasePtr
)
override
{};
/** \brief process an incoming key-frame: applies the motion model between consecutive keyframes
*/
virtual
void
processKeyFrame
(
FrameBasePtr
_keyframe_ptr
,
const
double
&
_time_tolerance
)
override
;
/** \brief trigger in capture
*/
virtual
bool
triggerInCapture
(
CaptureBasePtr
)
const
override
{
return
false
;};
/** \brief trigger in key-frame
*/
virtual
bool
triggerInKeyFrame
(
FrameBasePtr
_keyframe_ptr
,
const
double
&
_time_tolerance
)
const
override
{
return
true
;};
/** \brief store key frame
*/
virtual
bool
storeKeyFrame
(
FrameBasePtr
)
override
{
return
false
;};
/** \brief store capture
*/
virtual
bool
storeCapture
(
CaptureBasePtr
)
override
{
return
false
;};
/** \brief Vote for KeyFrame generation
*/
virtual
bool
voteForKeyFrame
()
const
override
{
return
false
;};
// ATTRIBUTES
ParamsProcessorFrameFactorPtr
params_processor_
;
};
}
/* namespace wolf */
#endif
/* INCLUDE_CORE_PROCESSOR_PROCESSOR_FRAME_FACTOR_H_ */
This diff is collapsed.
Click to expand it.
src/processor/processor_frame_factor.cpp
0 → 100644
+
36
−
0
View file @
451aba0a
/*
* processor_frame_factor.cpp
*
* Created on: Sep 6, 2021
* Author: joanvallve
*/
#include
"../../include/core/processor/processor_frame_factor.h"
namespace
wolf
{
ProcessorFrameFactor
::
ProcessorFrameFactor
(
ParamsProcessorMotionModelPtr
_params
)
:
params_motion_model_
(
_params
)
{
}
ProcessorFrameFactor
::~
ProcessorFrameFactor
()
{
}
void
ProcessorFrameFactor
::
processKeyFrame
(
FrameBasePtr
_keyframe_ptr
,
const
double
&
_time_tolerance
)
{
// TODO
}
}
/* namespace wolf */
// Register in the FactoryProcessor
#include
"core/processor/factory_processor.h"
namespace
wolf
{
WOLF_REGISTER_PROCESSOR
(
ProcessorFrameFactor
);
WOLF_REGISTER_PROCESSOR_AUTO
(
ProcessorFrameFactor
);
}
// namespace wolf
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