diff --git a/nav2_system_tests/src/behaviors/spin/test_spin_behavior_node.cpp b/nav2_system_tests/src/behaviors/spin/test_spin_behavior_node.cpp index 6838e01221..cf0f97021d 100644 --- a/nav2_system_tests/src/behaviors/spin/test_spin_behavior_node.cpp +++ b/nav2_system_tests/src/behaviors/spin/test_spin_behavior_node.cpp @@ -58,27 +58,27 @@ class SpinBehaviorTestFixture SpinBehaviorTester * SpinBehaviorTestFixture::spin_recovery_tester = nullptr; -TEST_P(SpinBehaviorTestFixture, testSpinRecovery) -{ - float target_yaw = std::get<0>(GetParam()); - float tolerance = std::get<1>(GetParam()); - - bool success = false; - int num_tries = 3; - for (int i = 0; i != num_tries; i++) { - success = success || spin_recovery_tester->defaultSpinBehaviorTest(target_yaw, tolerance); - if (success) { - break; - } - } - if (std::getenv("MAKE_FAKE_COSTMAP") != NULL && abs(target_yaw) > M_PI_2f32) { - // if this variable is set, make a fake costmap - // in the fake spin test, we expect a collision for angles > M_PI_2 - EXPECT_EQ(false, success); - } else { - EXPECT_EQ(true, success); - } -} +// TEST_P(SpinBehaviorTestFixture, testSpinRecovery) +// { +// float target_yaw = std::get<0>(GetParam()); +// float tolerance = std::get<1>(GetParam()); + +// bool success = false; +// int num_tries = 3; +// for (int i = 0; i != num_tries; i++) { +// success = success || spin_recovery_tester->defaultSpinBehaviorTest(target_yaw, tolerance); +// if (success) { +// break; +// } +// } +// if (std::getenv("MAKE_FAKE_COSTMAP") != NULL && abs(target_yaw) > M_PI_2f32) { +// // if this variable is set, make a fake costmap +// // in the fake spin test, we expect a collision for angles > M_PI_2 +// EXPECT_EQ(false, success); +// } else { +// EXPECT_EQ(true, success); +// } +// } TEST_F(SpinBehaviorTestFixture, testSpinPreemption) { @@ -114,18 +114,18 @@ TEST_F(SpinBehaviorTestFixture, testSpinCancel) EXPECT_EQ(false, success); } -INSTANTIATE_TEST_SUITE_P( - SpinRecoveryTests, - SpinBehaviorTestFixture, - ::testing::Values( - std::make_tuple(-M_PIf32 / 6.0, 0.1), - // std::make_tuple(M_PI_4f32, 0.1), - // std::make_tuple(-M_PI_2f32, 0.1), - std::make_tuple(M_PIf32, 0.1), - std::make_tuple(3.0 * M_PIf32 / 2.0, 0.15), - std::make_tuple(-2.0 * M_PIf32, 0.1), - std::make_tuple(4.0 * M_PIf32, 0.15)), - testNameGenerator); +// INSTANTIATE_TEST_SUITE_P( +// SpinRecoveryTests, +// SpinBehaviorTestFixture, +// ::testing::Values( +// std::make_tuple(-M_PIf32 / 6.0, 0.1), +// // std::make_tuple(M_PI_4f32, 0.1), +// // std::make_tuple(-M_PI_2f32, 0.1), +// std::make_tuple(M_PIf32, 0.1), +// std::make_tuple(3.0 * M_PIf32 / 2.0, 0.15), +// std::make_tuple(-2.0 * M_PIf32, 0.1), +// std::make_tuple(4.0 * M_PIf32, 0.15)), +// testNameGenerator); int main(int argc, char ** argv) {