1 #include <gtest/gtest.h> 7 #define GTEST_COUT std::cerr << "[ INFO ] " 9 TEST(ThresholdFilter, active)
18 TEST(ThresholdFilter, layers_dont_exist)
28 if (!filterChain.
configure(
"mitre_fast_layered_map_filters_threshold", nh))
30 GTEST_FATAL_FAILURE_(
"Unable to configure filter chain.");
33 EXPECT_FALSE(filterChain.
update(gridMap, gridMap));
36 gridMap.add(
"current_probability", 0);
37 EXPECT_FALSE(filterChain.
update(gridMap, gridMap));
39 gridMap.add(
"nonground", 0);
40 EXPECT_TRUE(filterChain.
update(gridMap, gridMap));
64 if (!filterChain.
configure(
"mitre_fast_layered_map_filters_threshold", nh))
66 GTEST_FATAL_FAILURE_(
"Unable to configure filter chain.");
70 gridMap[
"current_probability"] <<
77 Eigen::MatrixXf answerMat(3, 3);
82 if (!filterChain.
update(gridMap, gridMap))
84 GTEST_FATAL_FAILURE_(
"Unable to update grid map.");
91 EXPECT_FLOAT_EQ(answerMat(index(0), index(1)), gridMap.at(
"nonground", index)) <<
"Index: " << index(0) <<
" " << index(1);
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.
TEST(ThresholdFilter, active)
void setFrameId(const std::string &frameId)