1 #include <gtest/gtest.h> 6 TEST(OutlierRemoval, active)
11 TEST(OutlierRemoval, layer_doesnt_exist)
20 if(!filterChain.
configure(
"mitre_fast_layered_map_filters", nh))
22 GTEST_FATAL_FAILURE_(
"Unable to configure filter chain.");
26 EXPECT_FALSE(filterChain.
update(gridMap, outMap));
35 TEST(OutlierRemoval, remove_middle_one)
47 if(!filterChain.
configure(
"mitre_fast_layered_map_filters", nh))
49 GTEST_FATAL_FAILURE_(
"Unable to configure filter chain.");
52 if(!filterChain.
update(gridMap, gridMap))
54 GTEST_FATAL_FAILURE_(
"Unable to update grid map.");
66 TEST(OutlierRemoval, remove_perimeter_one)
79 if(!filterChain.
configure(
"mitre_fast_layered_map_filters", nh))
81 GTEST_FATAL_FAILURE_(
"Unable to configure filter chain.");
84 if(!filterChain.
update(gridMap, gridMap))
86 GTEST_FATAL_FAILURE_(
"Unable to update grid map.");
100 TEST(OutlierRemoval, preserve_points)
110 if(!filterChain.
configure(
"mitre_fast_layered_map_filters", nh))
112 GTEST_FATAL_FAILURE_(
"Unable to configure filter chain.");
120 if(index(0) == 1 && index(1) == 1)
126 gridMap.at(
"map", index) = 100;
128 if(!filterChain.
update(gridMap, gridMap))
130 GTEST_FATAL_FAILURE_(
"Unable to update grid map.");
135 EXPECT_EQ(100, gridMap.at(
"map", index));
138 gridMap.at(
"map", index) = 0;
154 TEST(OutlierRemoval, large_case)
171 if(!filterChain.
configure(
"mitre_fast_layered_map_filters", nh))
173 GTEST_FATAL_FAILURE_(
"Unable to configure filter chain.");
176 if(!filterChain.
update(gridMap, gridMap))
178 GTEST_FATAL_FAILURE_(
"Unable to update grid map.");
TEST(OutlierRemoval, active)
bool update(const T &data_in, T &data_out)
bool configure(std::string param_name, ros::NodeHandle node=ros::NodeHandle())
Filters that operate on a grid map instance.
void setFrameId(const std::string &frameId)