Commit Graph

304 Commits

Author SHA1 Message Date
Julian Oes
4126dde11f mavsdk_tests: bump to v3.4.0
This should fix some of the lockups and segfaults we see.
2025-05-19 07:37:02 -07:00
Julian Oes
d4be5d3ff0 mavsdk_tests: add events to log 2025-05-19 07:37:02 -07:00
Julian Oes
1f65cc46b9 mavsdk_tests: bump MAVSDK to v3.3.4 2025-05-19 07:37:02 -07:00
Julian Oes
56eb9bcc18 mavsdk_tests: workaround race condition
PX4 needs a bit of time to process an uploaded mission before it is
ready to accept the mission mode.

Therefore, we need to wait a bit.

Alternatively, we could wait on the mission progress arriving properly,
but this sleep is simple enough for now.
2025-05-19 07:37:02 -07:00
Julian Oes
e19d245355 mavsdk_tests: remove hacks for rally points
We can now just use MAVSDK to upload rally points.
2025-05-19 07:37:02 -07:00
Julian Oes
66deae172d mavsdk_tests: update to MAVSDK 3.0.0 2025-05-19 07:37:02 -07:00
GuillaumeLaine
ba35ca461c ci: add external navigation integration tests 2025-04-04 09:12:53 +02:00
Beat Küng
0e4c794674 ros_tests: change filter to use all tests
The name is being changed in https://github.com/Auterion/px4-ros2-interface-lib/pull/8
2025-04-04 09:12:53 +02:00
Beat Küng
3d6056411f integration tests: add --force-color & set in CI
github actions supports color output, but does not report as a tty.
See https://github.com/actions/runner/issues/241.
2025-04-04 09:12:53 +02:00
Beat Küng
a954ec4d55 test: add ros integration test runner script & config 2025-04-04 09:12:53 +02:00
Beat Küng
7c14a63855 refactor mavsdk_tests: move code into separate classes & extract mavsdk-specifics
Allows it to be reused for other integration tests, like ros.
2025-04-04 09:12:53 +02:00
Beat Küng
d78af5436e mavsdk_tests: highlight px4 errors & reset color on gazebo output 2025-04-04 09:12:53 +02:00
Beat Küng
45285a57ad fix mavsdk_tests: add ',' to test_filter config 2025-04-04 09:12:53 +02:00
Beat Küng
bbcd153e94 sitl: add generic way to override params via ENV variables 2025-04-04 09:12:53 +02:00
Jacob Dahl
4c0a63f679 mavsdk_tests: add multicopter alt hold test (#24396)
* mavsdk_tests: add multicopter alt hold test

* fix test filter

* increase altitude tolerance to 10m as a test

* reduce to 1m tolerance

* increase to 5m tolerance

* increase to 2m tolerance

* reduce back to 1m

* delay 60 seconds

* fix log upload

* fix ulog upload path

* make altitude tolerance in tester.wait_until_altitude configurable

* fix lambda

* default arg in declaration

* tighten up tolerance
2025-03-21 16:21:10 -06:00
Balduin
c0100ed4e7 mavsdk tests: use tester sleep_for function
the previously used std::this_thread::sleep_for is with respect to host
system time which is different from autopilot time if:

 - speed factor != 1
 - something runs slower than realtime regardless of speed factor
 - debugging or otherwise interrupting PX4 control code

tester.sleep_for (which already existed) correctly sleeps w.r.t.
px4/simulation time.
2025-03-18 10:25:38 +01:00
Matthias Grob
ed9111ec49 Remove obstacle avoidance test with Gazebo classic and ROS 1 2025-02-18 14:33:16 +01:00
Silvan Fuhrer
58d3e1ea8e test: in VTOL integration test use VTOL_LAND (#24261)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-01-28 11:22:51 +01:00
Daniel Agar
7288d16855 mavsdk_tests set nice levels for px4/gzclient/mavsdk_tests 2024-11-20 14:45:11 -05:00
Daniel Agar
635e162a0c test/mavsdk_tests: continue sending manual control between steps in fly_forward_in_posctl()/fly_forward_in_altctl() 2024-11-20 09:36:06 -08:00
Jacob Dahl
ed3cac9122 tests: increase timeout for armable check 2024-11-05 21:13:10 -05:00
Ramon Roche
16c77be7c0 tests: loosen radius of vtol rtl landing pos check 2024-08-26 14:05:17 -04:00
Matthias Grob
f2bca92221 Fix duplicate newlines at the end of files 2024-07-19 14:33:36 +02:00
Silvan Fuhrer
0379048ad2 mavsdk_tests: increase acceptance radius for position check on offboard landing
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-05-29 20:46:26 -04:00
Silvan Fuhrer
97191bd60f 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-04-23 16:37:31 +02:00
Silvan Fuhrer
818e318334 autopilot_tester: reduce mission distance for wind world
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-04-23 16:37:31 +02:00
Silvan Fuhrer
59232c27ae autopilot_tester: use normal VTOL mission for airspeed blockage test
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-04-23 16:37:31 +02:00
Daniel Agar
78bbb66568 delete SYS_MC_EST_GROUP
- introduce per module parameters (EKF2_EN, LPE_EN, ATT_EN)
 - add basic checks to prevent EKF2 + LPE running simultaneously
2024-04-15 16:06:08 -04:00
Matthias Grob
4e3bd4f196 MAVSDK tests: shorten Position, Altitude control flights
We get more than 5 meter away much quicker.
2024-02-22 15:29:13 +01:00
Matthias Grob
0cc4b41a51 MAVSDK test: Fix fly_forward_in_altctl() timing 2024-02-22 15:29:13 +01:00
Matthias Grob
f602228048 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?)
2024-02-22 15:29:13 +01:00
PerFrivik
9b122adae4 Fix fly_forward_in_posctl() timing 2024-02-22 15:29:13 +01:00
Matthias Grob
75bb25a44c test_vtol_figure_eight: fix altitude check
wait_until_altitude() checks for absolute altitude being
close so checking for 1m below the setpoint can fail
if the speedup results in no sample inside the altitude
window being checked.

Ideally the test could check if the takeoff is done directly
instead of comparing altitudes in the first place.
2023-12-12 20:22:23 +01:00
Konrad
9387de8282 mavsdk figure 8 test: Increase time of timeout 2023-11-22 16:47:38 -05:00
Silvan Fuhrer
5efcde7412 mavsdk_tests: add two new tests for VTOLs
- add functionality to specify world name for simulation in case name
- add test for triggering an airspeed invalidation in case of pitot blockage
- add test for high wind (ramped up wind over short period) to NOT invalidate airspeed in this case

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-09 09:42:43 +01:00
Konrad
72c6db6b23 vtol_rtl_test: explicitly disable RTL_FORCE_APPROACH for RTL direct Home testcase 2023-11-08 17:48:34 +01:00
Konrad
e3473a0f90 mavsdk_tests: Add integration tests for figure of 8 2023-10-31 15:57:59 -04:00
Konrad
2e850371c5 test_vtol_rtl: increase time to disarm to make tailsitter CI pass 2023-10-31 14:16:02 +01:00
Konrad
654e885003 mavsdk: Add integration tests for RTL with approaches 2023-10-31 14:16:02 +01:00
Konrad
24f59dd465 autopilot_tester: Add mavlink passthrough to end custom commands 2023-10-31 14:16:02 +01:00
Konrad
4227e2b7e7 test_vtol_mission: Increase thresholds for tests to pass. Temporarily disable checks tracks fro reverse mission.
Current threshhold has no margins of errors with the set acceptance radius. Increase corridor radius by 5m.
Increase time to disarm for tailsitter test to pass.
Rverse mission needs check tracks test disabled since mavsdk does not really work with mission has reverse order.
2023-09-29 14:25:03 +02:00
RomanBapst
6fca984c3f test_vtol_mission: Add additional testing for VTOL RTL and reverse mission RTL
mavsdk-test: added a vtol mission without a landing at the end (used for reversed RTL)
math_helpers: added function to compute local position from a raw mission item

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-09-29 14:25:03 +02:00
Beat Küng
57297234e2 autopilot_tester: slower descend for fly_forward_in_offboard_attitude
As CI was sometimes failing
2023-08-08 12:28:52 -04:00
Beat Küng
0277a6486f mavsdk_tests: add offboard attitude test & run with Q estimator 2023-08-04 11:27:31 -04:00
Junwoo Hwang
9c001f2e40 Fix SITL Test failure: Place PX4 instance runner after Gazebo server runner (#21230)
* MAVSDK_Test_Runner: Place PX4 instance runner after Gazebo server runner

- This was a nasty bug where starting PX4 instance first, then starting
  Gazebo server was causing PX4 instance' EKF to freak out, probably
because it doesn't like getting data a while after it is started
- Detailed breakdown is given here: https://github.com/PX4/PX4-Autopilot/issues/21229#issuecomment-1450761542
- This now guarantees that such edge case won't occur and MAVSDK test
  will run as it should

* MAVSDK Test Runner: Retain comment within 79 character limit

- To pass flake8 python style check

* Update test/mavsdk_tests/mavsdk_test_runner.py

Co-authored-by: Julian Oes <julian@oes.ch>

---------

Co-authored-by: Julian Oes <julian@oes.ch>
2023-03-26 11:27:01 +09:00
Daniel Agar
6991ac014c rename 'gazebo' simulation to 'gazebo-classic' (#20936)
- use `gazebo-classic` everywhere consistently referring to the original Gazebo (eg version 9,10,11)
   - additional `gazebo_*` helper targets added for compatibility, but warn about deprecation and tell you the new target naming
 - use `gz` everywhere when referring to Gazebo (aka Ignition Gazebo or new Gazebo)
2023-01-15 11:36:12 -05:00
Daniel Agar
618288cca9 SITL Gazebo classic make airframes simulator specific 2023-01-07 17:00:35 -05:00
Junwoo Hwang
3e35f948d8 autopilot_tester: Make wait_until_ready also wait until vehicle can
arm

- Previously, due to the way MAVSDK's `health_all_ok` was implemented,
vehicle often didn't have a valid global position estimate (although
function returned true), and it wouldn't arm, and the SITL would fail
- Also sometimes as vehicle didn't have manual control, it entered weird
states where it wasn't able to arm as well
- This adds a check to make sure vehicle is able to arm, directly from
the Health struct
2022-11-08 11:53:43 +13:00
Daniel Agar
cea185268e msg ROS2 compatibility, microdds_client improvements (timesync, reduced code size, added topics, etc), fastrtps purge
- update all msgs to be directly compatible with ROS2
 - microdds_client improvements
   - timesync
   - reduced code size
   - add to most default builds if we can afford it
   - lots of other little changes
 - purge fastrtps (I tried to save this multiple times, but kept hitting roadblocks)
2022-10-19 19:36:47 -04:00
Daniel Agar
4040e4cdf2 simulation organization and cleanup
- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
2022-08-25 09:10:03 -04:00