Fawkes API  Fawkes Development Version
map_filter.h
1 
2 /***************************************************************************
3  * map_filter.h - Laser map data filter
4  *
5  * Created: Fri Jul 17 20:38:14 2015
6  * Copyright 2006-2015 Tim Niemueller [www.niemueller.de]
7  * 2015 Tobias Neumann
8  *
9  ****************************************************************************/
10 
11 /* This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL file in the doc directory.
22  */
23 
24 #ifndef _PLUGINS_LASER_FILTER_FILTERS_MAP_FILTER_H_
25 #define _PLUGINS_LASER_FILTER_FILTERS_MAP_FILTER_H_
26 
27 #include "filter.h"
28 
29 #include <aspect/configurable.h>
30 #include <aspect/logging.h>
31 #include <aspect/tf.h>
32 #include <plugins/amcl/amcl_utils.h>
33 #include <plugins/amcl/map/map.h>
34 
36 {
37 private:
38  fawkes::tf::Transformer *tf_listener_;
39  fawkes::Configuration * config_;
40  fawkes::Logger * logger_;
41 
42  map_t * map_;
43  std::string frame_map_;
44  float cfg_occupied_thresh_;
45  int num_pixels_;
46 
47 public:
48  LaserMapFilterDataFilter(const std::string & filter_name,
49  unsigned int in_data_size,
50  std::vector<LaserDataFilter::Buffer *> &in,
51  fawkes::tf::Transformer * tf_listener,
52  fawkes::Configuration * config,
53  const std::string & prefix,
54  fawkes::Logger * logger);
55 
56  virtual void filter();
57 
58 private:
59  map_t *load_map();
60  bool is_in_map(int cell_x, int cell_y);
61 };
62 
63 #endif
LaserDataFilter::filter_name
std::string filter_name
Definition: filter.h:86
LaserMapFilterDataFilter::filter
virtual void filter()
Definition: map_filter.cpp:115
fawkes::tf::Transformer
Definition: transformer.h:74
LaserDataFilter::in_data_size
unsigned int in_data_size
Definition: filter.h:88
LaserDataFilter::in
std::vector< Buffer * > in
Definition: filter.h:89
LaserMapFilterDataFilter::LaserMapFilterDataFilter
LaserMapFilterDataFilter(const std::string &filter_name, unsigned int in_data_size, std::vector< LaserDataFilter::Buffer * > &in, fawkes::tf::Transformer *tf_listener, fawkes::Configuration *config, const std::string &prefix, fawkes::Logger *logger)
Constructor.
Definition: map_filter.cpp:49
fawkes::Configuration
Definition: config.h:70
fawkes::Logger
Definition: logger.h:41
LaserMapFilterDataFilter
Definition: map_filter.h:35
LaserDataFilter
Definition: filter.h:32