Compare commits

...

4 Commits

Author SHA1 Message Date
Silvan Fuhrer bf406269c7 test: reduce sped factor to 3
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-02-28 18:08:36 +01:00
Silvan Fuhrer 2f5c32e500 autopilot_tester: for mission end timeout check take speed factor into account
And increase the (simulation time) timeouts.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-02-27 13:27:45 +01:00
Silvan Fuhrer c5f226761e autopilot_tester: reduce mission distance for wind world
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-02-27 13:24:05 +01:00
Silvan Fuhrer cf7f1be305 autopilot_tester: use normal VTOL mission for airspeed blockage test
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-02-27 13:23:00 +01:00
4 changed files with 21 additions and 7 deletions

View File

@ -96,7 +96,7 @@ jobs:
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 3 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
timeout-minutes: 45
- name: Look at core files

View File

@ -271,9 +271,16 @@ void AutopilotTester::execute_mission()
REQUIRE(poll_condition_with_timeout(
[this]() { return _mission->start_mission() == Mission::Result::Success; }, std::chrono::seconds(3)));
// TODO: Adapt time limit based on mission size, flight speed, sim speed factor, etc.
float speed_factor = 1.0f;
wait_for_mission_finished(std::chrono::seconds(90));
if (_info != nullptr) {
speed_factor = _info->get_speed_factor().second;
}
const float mission_finish_waiting_time_in_simulation_s = 500.f;
float mission_finish_waiting_time_in_real_s = mission_finish_waiting_time_in_simulation_s / speed_factor;
wait_for_mission_finished(std::chrono::seconds(static_cast<int>(mission_finish_waiting_time_in_real_s)));
}
void AutopilotTester::execute_mission_and_lose_gps()
@ -388,9 +395,16 @@ void AutopilotTester::execute_mission_raw()
{
REQUIRE(_mission->start_mission() == Mission::Result::Success);
// TODO: Adapt time limit based on mission size, flight speed, sim speed factor, etc.
float speed_factor = 1.0f;
wait_for_mission_raw_finished(std::chrono::seconds(120));
if (_info != nullptr) {
speed_factor = _info->get_speed_factor().second;
}
const float waiting_time_simulation_time_s = 300.f; // currently this is tuned for the VTOL wind test
float waiting_time_absolute_s = waiting_time_simulation_time_s / speed_factor;
wait_for_mission_raw_finished(std::chrono::seconds(static_cast<int>(waiting_time_absolute_s)));
}
void AutopilotTester::execute_rtl()

View File

@ -47,7 +47,7 @@ TEST_CASE("Fly VTOL Loiter with airspeed failure", "[vtol_airspeed_fail]")
const float takeoff_altitude = 10.f;
tester.set_takeoff_altitude(takeoff_altitude);
tester.load_qgc_mission_raw_and_move_here("test/mavsdk_tests/vtol_mission_straight_south.plan");
tester.load_qgc_mission_raw_and_move_here("test/mavsdk_tests/vtol_mission.plan");
tester.arm();
tester.takeoff();

View File

@ -49,7 +49,7 @@
0,
0,
null,
47.38497919751799,
47.392,
8.54578066404548,
30
],