From 958a66b18e1c249d375a195ef38a1ceb96aaab2f Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Thu, 22 Feb 2024 13:57:36 +0100 Subject: [PATCH] MAVSDK test: increase offboard position threshold This is a workaround to hotfix CI but the root cause is #22792 (MAVSDK test failing after EKF change, accelerometer simulation issues not learned anymore?) --- test/mavsdk_tests/test_multicopter_offboard.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/mavsdk_tests/test_multicopter_offboard.cpp b/test/mavsdk_tests/test_multicopter_offboard.cpp index 2a166e3612b4..7160c0db382c 100644 --- a/test/mavsdk_tests/test_multicopter_offboard.cpp +++ b/test/mavsdk_tests/test_multicopter_offboard.cpp @@ -34,6 +34,7 @@ #include "autopilot_tester.h" #include +static constexpr float acceptance_radius = 0.3f; TEST_CASE("Offboard takeoff and land", "[multicopter][offboard]") { @@ -45,7 +46,7 @@ TEST_CASE("Offboard takeoff and land", "[multicopter][offboard]") tester.set_rc_loss_exception(AutopilotTester::RcLossException::Offboard); tester.arm(); std::chrono::seconds goto_timeout = std::chrono::seconds(90); - tester.offboard_goto(takeoff_position, 0.1f, goto_timeout); + tester.offboard_goto(takeoff_position, acceptance_radius, goto_timeout); tester.offboard_land(); tester.wait_until_disarmed(std::chrono::seconds(120)); tester.check_home_within(1.0f); @@ -63,12 +64,12 @@ TEST_CASE("Offboard position control", "[multicopter][offboard]") tester.store_home(); tester.set_rc_loss_exception(AutopilotTester::RcLossException::Offboard); tester.arm(); - std::chrono::seconds goto_timeout = std::chrono::seconds(120); - tester.offboard_goto(takeoff_position, 0.1f, goto_timeout); - tester.offboard_goto(setpoint_1, 0.1f, goto_timeout); - tester.offboard_goto(setpoint_2, 0.1f, goto_timeout); - tester.offboard_goto(setpoint_3, 0.1f, goto_timeout); - tester.offboard_goto(takeoff_position, 0.1f, goto_timeout); + std::chrono::seconds goto_timeout = std::chrono::seconds(10); + tester.offboard_goto(takeoff_position, acceptance_radius, goto_timeout); + tester.offboard_goto(setpoint_1, acceptance_radius, goto_timeout); + tester.offboard_goto(setpoint_2, acceptance_radius, goto_timeout); + tester.offboard_goto(setpoint_3, acceptance_radius, goto_timeout); + tester.offboard_goto(takeoff_position, acceptance_radius, goto_timeout); tester.offboard_land(); tester.wait_until_disarmed(std::chrono::seconds(120)); tester.check_home_within(1.0f);