Main Page
Namespaces
Classes
Files
File List
src
DuplicationFilter.cpp
Go to the documentation of this file.
1
/*
2
* DuplicationFilter.cpp
3
*
4
* Created on: Aug 18, 2017
5
* Author: Peter Fankhauser
6
* Institute: ETH Zurich, ANYbotics
7
*/
8
9
#include "
grid_map_filters/DuplicationFilter.hpp
"
10
11
#include <
grid_map_core/GridMap.hpp
>
12
#include <
pluginlib/class_list_macros.h
>
13
14
using namespace
filters
;
15
16
namespace
grid_map
{
17
18
template
<
typename
T>
19
DuplicationFilter<T>::DuplicationFilter
()
20
{
21
}
22
23
template
<
typename
T>
24
DuplicationFilter<T>::~DuplicationFilter
()
25
{
26
}
27
28
template
<
typename
T>
29
bool
DuplicationFilter<T>::configure
()
30
{
31
if
(!
FilterBase<T>::getParam
(std::string(
"input_layer"
), inputLayer_)) {
32
ROS_ERROR
(
"DuplicationFilter did not find parameter 'input_layer'."
);
33
return
false
;
34
}
35
36
if
(!
FilterBase<T>::getParam
(std::string(
"output_layer"
), outputLayer_)) {
37
ROS_ERROR
(
"DuplicationFilter did not find parameter 'output_layer'."
);
38
return
false
;
39
}
40
41
return
true
;
42
}
43
44
template
<
typename
T>
45
bool
DuplicationFilter<T>::update
(
const
T& mapIn, T& mapOut)
46
{
47
mapOut = mapIn;
48
mapOut.add(outputLayer_, mapIn[inputLayer_]);
49
return
true
;
50
}
51
52
}
/* namespace */
53
54
PLUGINLIB_EXPORT_CLASS
(
grid_map::DuplicationFilter<grid_map::GridMap>
,
filters::FilterBase<grid_map::GridMap>
)
filters::FilterBase
GridMap.hpp
grid_map
class_list_macros.h
DuplicationFilter.hpp
filters
PLUGINLIB_EXPORT_CLASS
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
ROS_ERROR
#define ROS_ERROR(...)
grid_map::DuplicationFilter
Definition:
DuplicationFilter.hpp:21
grid_map_filters
Author(s): Péter Fankhauser
, Martin Wermelinger
autogenerated on Tue Jun 25 2019 20:02:22