EqualityFilter.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <map>
4
#include <vector>
5
6
// Base Class
7
#include "../Filter.h"
8
9
// Aron
10
#include <
RobotAPI/libraries/aron/core/data/variant/container/Dict.h
>
11
#include "
RobotAPI/libraries/aron/similarity/data/image/NDArraySimilarity.h
"
12
#include "
RobotAPI/libraries/aron/similarity/data/image/FloatSimilarity.h
"
13
14
#include <chrono>
15
16
namespace
armarx::armem::server::ltm::processor::filter
17
{
18
class
SnapshotSimilarityFilter
:
public
SnapshotFilter
19
{
20
public
:
21
static
const
constexpr
char
*
NAME
=
"SnapshotSimilarityFilter"
;
22
static
const
constexpr
char
*
PARAM_THRESHOLD
=
"Threshold"
;
23
static
const
constexpr
char
*
PARAM_SIM_MEASURE
=
"SimilarityMeasure"
;
24
static
const
constexpr
char
*
PARAM_MAX_OBJECTS
=
"NumberOfObjectsToCompare"
;
25
26
SnapshotSimilarityFilter
() =
default
;
27
28
virtual
bool
accept
(
const
armem::wm::EntitySnapshot
& e)
override
;
29
void
configure
(
const
nlohmann::json& json)
override
;
30
31
FilterStatistics
getFilterStatistics
()
override
;
32
std::string
getName
()
override
;
33
34
private
:
35
//std::map<MemoryID, std::vector<aron::data::DictPtr>> dataLastCommit;
36
std::deque<std::vector<armarx::aron::data::NDArrayPtr>> images;
37
std::deque<std::vector<armarx::aron::data::FloatPtr>> floats;
38
std::map<MemoryID, long> timestampLastCommitInMs;
39
std::double_t threshold;
40
FilterStatistics
stats;
41
std::size_t max_images = 2;
42
aron::similarity::NDArraySimilarity::Type
similarity_type;
43
aron::similarity::FloatSimilarity::Type
float_similarity_type;
44
45
};
46
}
// namespace armarx::armem::server::ltm::processor::filter
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::NAME
static const constexpr char * NAME
Definition:
EqualityFilter.h:21
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::getFilterStatistics
FilterStatistics getFilterStatistics() override
Definition:
EqualityFilter.cpp:173
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::PARAM_THRESHOLD
static const constexpr char * PARAM_THRESHOLD
Definition:
EqualityFilter.h:22
FloatSimilarity.h
Dict.h
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::SnapshotSimilarityFilter
SnapshotSimilarityFilter()=default
armarx::aron::similarity::FloatSimilarity::Type
Type
The Type enum.
Definition:
FloatSimilarity.h:8
armarx::armem::wm::EntitySnapshot
Client-side working memory entity snapshot.
Definition:
memory_definitions.h:80
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::getName
std::string getName() override
Definition:
EqualityFilter.cpp:178
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::configure
void configure(const nlohmann::json &json) override
Definition:
EqualityFilter.cpp:130
armarx::armem::server::ltm::processor::filter
Definition:
EqualityFilter.cpp:9
NDArraySimilarity.h
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter
Definition:
EqualityFilter.h:18
armarx::armem::server::ltm::processor::SnapshotFilter::FilterStatistics
Definition:
Filter.h:35
armarx::armem::server::ltm::processor::SnapshotFilter
Definition:
Filter.h:26
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::accept
virtual bool accept(const armem::wm::EntitySnapshot &e) override
Definition:
EqualityFilter.cpp:12
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::PARAM_SIM_MEASURE
static const constexpr char * PARAM_SIM_MEASURE
Definition:
EqualityFilter.h:23
armarx::aron::similarity::NDArraySimilarity::Type
Type
Definition:
NDArraySimilarity.h:8
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::PARAM_MAX_OBJECTS
static const constexpr char * PARAM_MAX_OBJECTS
Definition:
EqualityFilter.h:24
RobotAPI
libraries
armem
server
ltm
processors
filter
equalityFilter
EqualityFilter.h
Generated on Sat Oct 12 2024 09:14:08 for armarx_documentation by
1.8.17