Fawkes API Fawkes Development Version
min_merge.h
1
2/***************************************************************************
3 * min_merge.h - Laser min merge data filter
4 *
5 * Created: Wed Mar 16 21:45:27 2011
6 * Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
19 *
20 * Read the full text in the LICENSE.GPL file in the doc directory.
21 */
22
23#ifndef _PLUGINS_LASER_FILTER_FILTERS_MIN_MERGE_H_
24#define _PLUGINS_LASER_FILTER_FILTERS_MIN_MERGE_H_
25
26#include "filter.h"
27
28#include <vector>
29
30namespace fawkes {
31class Logger;
32}
33
35{
36public:
37 /// Timestamp selection method
38 typedef enum {
39 TIMESTAMP_LATEST, ///< use the latest of all timestamps
40 TIMESTAMP_FIRST, ///< use the first (oldest) of all timestamps
41 TIMESTAMP_INDEX ///< use a specific index in the input buffer list
43
44 LaserMinMergeDataFilter(const std::string & filter_name,
45 fawkes::Logger * logger,
46 unsigned int in_data_size,
47 std::vector<LaserDataFilter::Buffer *> &in);
48 LaserMinMergeDataFilter(const std::string & filter_name,
49 fawkes::Logger * logger,
50 unsigned int in_data_size,
51 std::vector<LaserDataFilter::Buffer *> &in,
52 TimestampSelectionMethod timestamp_selection_method,
53 unsigned int timestamp_index = 0);
54
55 virtual void filter();
56
57private:
58 fawkes::Logger *logger;
59
60 TimestampSelectionMethod timestamp_selection_method_;
61 unsigned int timestamp_index_;
62
63 std::vector<bool> ignored_;
64};
65
66#endif
Laser data filter.
Definition: filter.h:33
unsigned int in_data_size
Number of entries in input arrays.
Definition: filter.h:88
std::string filter_name
Name of the specific filter instance.
Definition: filter.h:86
std::vector< Buffer * > in
Vector of input arrays.
Definition: filter.h:89
Merge multiple laser data arrays into one.
Definition: min_merge.h:35
TimestampSelectionMethod
Timestamp selection method.
Definition: min_merge.h:38
@ TIMESTAMP_LATEST
use the latest of all timestamps
Definition: min_merge.h:39
@ TIMESTAMP_FIRST
use the first (oldest) of all timestamps
Definition: min_merge.h:40
@ TIMESTAMP_INDEX
use a specific index in the input buffer list
Definition: min_merge.h:41
LaserMinMergeDataFilter(const std::string &filter_name, fawkes::Logger *logger, unsigned int in_data_size, std::vector< LaserDataFilter::Buffer * > &in)
Constructor.
Definition: min_merge.cpp:44
virtual void filter()
Filter the incoming data.
Definition: min_merge.cpp:82
Interface for logging.
Definition: logger.h:42
Fawkes library namespace.