Skip to content

Commit

Permalink
fixed tests for clearing functionality
Browse files Browse the repository at this point in the history
Signed-off-by: alexander <[email protected]>
  • Loading branch information
alexanderjyuen committed Dec 11, 2024
1 parent ce437aa commit 0e86021
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions nav2_costmap_2d/test/integration/plugin_container_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,16 +454,13 @@ TEST_F(TestNode, testClearing) {

ASSERT_EQ(countValues(*costmap, nav2_costmap_2d::LETHAL_OBSTACLE), 21);
ASSERT_EQ(countValues(*costmap, nav2_costmap_2d::INSCRIBED_INFLATED_OBSTACLE), 29);
ASSERT_EQ(olayer_b->getCost(9, 9), nav2_costmap_2d::LETHAL_OBSTACLE);

pclayer_a->clearArea(-1, -1, 10, 10, false);
pclayer_b->clearArea(-1, -1, 10, 10, false);

layers.updateMap(0, 0, 0);

costmap = layers.getCostmap();

ASSERT_EQ(countValues(*costmap, nav2_costmap_2d::LETHAL_OBSTACLE), 1);
ASSERT_EQ(countValues(*costmap, nav2_costmap_2d::INSCRIBED_INFLATED_OBSTACLE), 2);
ASSERT_EQ(slayer->getCost(9, 0), nav2_costmap_2d::LETHAL_OBSTACLE);
ASSERT_EQ(olayer_b->getCost(9, 9), nav2_costmap_2d::NO_INFORMATION);
}

TEST_F(TestNode, testOverwriteCombinationMethods) {
Expand Down

0 comments on commit 0e86021

Please sign in to comment.