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
0b8395f2
Commit
0b8395f2
authored
5 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Deprecated processor_capture_holder. Closes
#243
parent
d51252e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+0
-2
0 additions, 2 deletions
CMakeLists.txt
include/core/processor/processor_capture_holder.h
+0
-86
0 additions, 86 deletions
include/core/processor/processor_capture_holder.h
src/processor/processor_capture_holder.cpp
+0
-84
0 additions, 84 deletions
src/processor/processor_capture_holder.cpp
with
0 additions
and
172 deletions
CMakeLists.txt
+
0
−
2
View file @
0b8395f2
...
@@ -249,7 +249,6 @@ SET(HDRS_PROCESSOR
...
@@ -249,7 +249,6 @@ SET(HDRS_PROCESSOR
include/core/processor/diff_drive_tools.hpp
include/core/processor/diff_drive_tools.hpp
include/core/processor/motion_buffer.h
include/core/processor/motion_buffer.h
include/core/processor/processor_base.h
include/core/processor/processor_base.h
include/core/processor/processor_capture_holder.h
include/core/processor/processor_diff_drive.h
include/core/processor/processor_diff_drive.h
include/core/processor/processor_factory.h
include/core/processor/processor_factory.h
include/core/processor/processor_logging.h
include/core/processor/processor_logging.h
...
@@ -343,7 +342,6 @@ SET(SRCS_LANDMARK
...
@@ -343,7 +342,6 @@ SET(SRCS_LANDMARK
SET
(
SRCS_PROCESSOR
SET
(
SRCS_PROCESSOR
src/processor/motion_buffer.cpp
src/processor/motion_buffer.cpp
src/processor/processor_base.cpp
src/processor/processor_base.cpp
src/processor/processor_capture_holder.cpp
src/processor/processor_diff_drive.cpp
src/processor/processor_diff_drive.cpp
src/processor/processor_loopclosure.cpp
src/processor/processor_loopclosure.cpp
src/processor/processor_motion.cpp
src/processor/processor_motion.cpp
...
...
This diff is collapsed.
Click to expand it.
include/core/processor/processor_capture_holder.h
deleted
100644 → 0
+
0
−
86
View file @
d51252e5
/**
* \file processor_capture_holder.h
*
* Created on: Jul 12, 2017
* \author: Jeremie Deray
*/
#ifndef _WOLF_PROCESSOR_CAPTURE_HOLDER_H_
#define _WOLF_PROCESSOR_CAPTURE_HOLDER_H_
//Wolf includes
#include
"core/processor/processor_base.h"
#include
"core/capture/capture_base.h"
namespace
wolf
{
WOLF_PTR_TYPEDEFS
(
ProcessorCaptureHolder
);
WOLF_STRUCT_PTR_TYPEDEFS
(
ProcessorParamsCaptureHolder
);
/**
* \brief ProcessorParamsCaptureHolder
*/
struct
ProcessorParamsCaptureHolder
:
public
ProcessorParamsBase
{
using
ProcessorParamsBase
::
ProcessorParamsBase
;
};
/**
* \brief ProcessorCaptureHolder
*/
class
ProcessorCaptureHolder
:
public
ProcessorBase
{
public:
ProcessorCaptureHolder
(
ProcessorParamsCaptureHolderPtr
_params_capture_holder
);
virtual
~
ProcessorCaptureHolder
()
=
default
;
virtual
void
configure
(
SensorBasePtr
_sensor
)
override
{
};
protected
:
/** \brief process an incoming capture
*
* The ProcessorCaptureHolder is only triggered in KF (see triggerInCapture()) so this function is not called.
*/
virtual
void
processCapture
(
CaptureBasePtr
)
override
{};
/** \brief process an incoming key-frame
*
* Each derived processor should implement this function. It will be called if:
* - A new KF arrived and triggerInKF() returned true.
*/
virtual
void
processKeyFrame
(
FrameBasePtr
_keyframe_ptr
,
const
Scalar
&
_time_tolerance
)
override
;
/** \brief trigger in capture
*
* The ProcessorCaptureHolder only processes incoming KF, then it returns false.
*/
virtual
bool
triggerInCapture
(
CaptureBasePtr
)
override
{
return
false
;}
/** \brief trigger in key-frame
*
* Returns true if processKeyFrame() should be called after the provided KF arrived.
*/
virtual
bool
triggerInKeyFrame
(
FrameBasePtr
_keyframe_ptr
,
const
Scalar
&
_time_tol_other
)
override
{
return
true
;
}
/** \brief Vote for KeyFrame generation
*
* If a KeyFrame criterion is validated, this function returns true,
* meaning that it wants to create a KeyFrame at the \b last Capture.
*
* WARNING! This function only votes! It does not create KeyFrames!
*/
virtual
bool
voteForKeyFrame
()
override
{
return
false
;
}
ProcessorParamsCaptureHolderPtr
params_capture_holder_
;
public
:
static
ProcessorBasePtr
create
(
const
std
::
string
&
_unique_name
,
const
ProcessorParamsBasePtr
_params
,
const
SensorBasePtr
sensor_ptr
=
nullptr
);
};
}
// namespace wolf
#endif // _WOLF_PROCESSOR_CAPTURE_HOLDER_H_
This diff is collapsed.
Click to expand it.
src/processor/processor_capture_holder.cpp
deleted
100644 → 0
+
0
−
84
View file @
d51252e5
/**
* \file processor_capture_holder.h
*
* Created on: Jul 12, 2017
* \author: Jeremie Deray
*/
//Wolf includes
#include
"core/processor/processor_capture_holder.h"
namespace
wolf
{
ProcessorCaptureHolder
::
ProcessorCaptureHolder
(
ProcessorParamsCaptureHolderPtr
_params_capture_holder
)
:
ProcessorBase
(
"CAPTURE HOLDER"
,
_params_capture_holder
),
params_capture_holder_
(
_params_capture_holder
)
{
//
}
void
ProcessorCaptureHolder
::
processKeyFrame
(
FrameBasePtr
_keyframe_ptr
,
const
Scalar
&
_time_tolerance
)
{
assert
(
_keyframe_ptr
->
getTrajectory
()
!=
nullptr
&&
"ProcessorMotion::keyFrameCallback: key frame must be in the trajectory."
);
// get keyframe's time stamp
const
TimeStamp
new_ts
=
_keyframe_ptr
->
getTimeStamp
();
// find capture whose buffer is affected by the new keyframe
CaptureBasePtr
existing_capture
=
buffer_capture_
.
selectFirstBefore
(
new_ts
,
_time_tolerance
);
buffer_capture_
.
removeUpTo
(
existing_capture
->
getTimeStamp
());
if
(
existing_capture
==
nullptr
)
{
WOLF_WARN
(
"Could not find a capture at ts: "
,
new_ts
.
get
(),
" within time tolerance: "
,
_time_tolerance
);
return
;
}
WOLF_DEBUG
(
"ProcessorCaptureHolder::keyFrameCallback time tolerance "
,
_time_tolerance
);
WOLF_DEBUG
(
"Capture of type : "
,
existing_capture
->
getType
());
WOLF_DEBUG
(
"CaptureBuffer size : "
,
buffer_capture_
.
size
());
// add capture to keyframe
auto
frame_ptr
=
existing_capture
->
getFrame
();
if
(
frame_ptr
!=
nullptr
&&
frame_ptr
->
isKey
())
{
WOLF_WARN_COND
(
frame_ptr
!=
_keyframe_ptr
,
"found a capture already in a different KF"
);
WOLF_INFO_COND
(
frame_ptr
==
_keyframe_ptr
,
"found a capture already in a this KF"
);
}
else
{
WOLF_INFO
(
"Adding capture laser !"
);
existing_capture
->
link
(
_keyframe_ptr
);
if
(
frame_ptr
)
frame_ptr
->
remove
();
}
}
ProcessorBasePtr
ProcessorCaptureHolder
::
create
(
const
std
::
string
&
_unique_name
,
const
ProcessorParamsBasePtr
_params
,
const
SensorBasePtr
)
{
ProcessorParamsCaptureHolderPtr
params
;
params
=
std
::
static_pointer_cast
<
ProcessorParamsCaptureHolder
>
(
_params
);
// if cast failed use default value
if
(
params
==
nullptr
)
params
=
std
::
make_shared
<
ProcessorParamsCaptureHolder
>
();
ProcessorCaptureHolderPtr
prc_ptr
=
std
::
make_shared
<
ProcessorCaptureHolder
>
(
params
);
prc_ptr
->
setName
(
_unique_name
);
return
prc_ptr
;
}
}
// namespace wolf
// Register in the ProcessorFactory
#include
"core/processor/processor_factory.h"
namespace
wolf
{
WOLF_REGISTER_PROCESSOR
(
"CAPTURE HOLDER"
,
ProcessorCaptureHolder
)
}
// 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