Skip to content

Commit

Permalink
Fix flaky smoother test (#4372)
Browse files Browse the repository at this point in the history
* fix flaky smoother tets

* fix test

* fix
  • Loading branch information
SteveMacenski authored May 29, 2024
1 parent 931ca9e commit e8d3cd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nav2_smac_planner/test/test_smoother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ TEST(SmootherTest, test_full_smoother)
nav2_smac_planner::AStarAlgorithm<nav2_smac_planner::NodeHybrid> a_star(
nav2_smac_planner::MotionModel::REEDS_SHEPP, info);
int max_iterations = 10000;
float tolerance = 10.0;
int it_on_approach = 10;
float tolerance = 0.0;
int terminal_checking_interval = 5000;
double max_planning_time = 120.0;
int num_it = 0;
Expand Down Expand Up @@ -143,7 +142,8 @@ TEST(SmootherTest, test_full_smoother)
}

// Check that we accurately detect that this path has a reversing segment
EXPECT_EQ(smoother->findDirectionalPathSegmentsWrapper(plan).size(), 2u);
auto path_segs = smoother->findDirectionalPathSegmentsWrapper(plan);
EXPECT_TRUE(path_segs.size() == 2u || path_segs.size() == 3u);

// Test smoother, should succeed with same number of points
// and shorter overall length, while still being collision free.
Expand Down

0 comments on commit e8d3cd8

Please sign in to comment.