forked from Archive/PX4-Autopilot
Compare commits
4 Commits
main
...
pr-autopil
Author | SHA1 | Date |
---|---|---|
Silvan Fuhrer | bf406269c7 | |
Silvan Fuhrer | 2f5c32e500 | |
Silvan Fuhrer | c5f226761e | |
Silvan Fuhrer | cf7f1be305 |
|
@ -96,7 +96,7 @@ jobs:
|
||||||
PX4_HOME_LON: ${{matrix.config.longitude}}
|
PX4_HOME_LON: ${{matrix.config.longitude}}
|
||||||
PX4_HOME_ALT: ${{matrix.config.altitude}}
|
PX4_HOME_ALT: ${{matrix.config.altitude}}
|
||||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
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
|
timeout-minutes: 45
|
||||||
|
|
||||||
- name: Look at core files
|
- name: Look at core files
|
||||||
|
|
|
@ -271,9 +271,16 @@ void AutopilotTester::execute_mission()
|
||||||
REQUIRE(poll_condition_with_timeout(
|
REQUIRE(poll_condition_with_timeout(
|
||||||
[this]() { return _mission->start_mission() == Mission::Result::Success; }, std::chrono::seconds(3)));
|
[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()
|
void AutopilotTester::execute_mission_and_lose_gps()
|
||||||
|
@ -388,9 +395,16 @@ void AutopilotTester::execute_mission_raw()
|
||||||
{
|
{
|
||||||
REQUIRE(_mission->start_mission() == Mission::Result::Success);
|
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()
|
void AutopilotTester::execute_rtl()
|
||||||
|
|
|
@ -47,7 +47,7 @@ TEST_CASE("Fly VTOL Loiter with airspeed failure", "[vtol_airspeed_fail]")
|
||||||
const float takeoff_altitude = 10.f;
|
const float takeoff_altitude = 10.f;
|
||||||
tester.set_takeoff_altitude(takeoff_altitude);
|
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.arm();
|
||||||
|
|
||||||
tester.takeoff();
|
tester.takeoff();
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
null,
|
null,
|
||||||
47.38497919751799,
|
47.392,
|
||||||
8.54578066404548,
|
8.54578066404548,
|
||||||
30
|
30
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue