Commit Graph

276 Commits

Author SHA1 Message Date
Julian Oes 43fccece61 mavsdk_tests: check installed version
Starting with MAVSDK 0.39.0 we can specify the version required. This
way we can fail at configure time instead of later during compilation or
linking.
2021-04-29 21:08:33 -04:00
Julian Oes 7384bd2675 mavsdk_tests: specify required MAVSDK version
This way it can be better picked up by CI scripts.
2021-04-29 21:08:33 -04:00
Julian Oes bb0fe9ee61 mavsdk_tests: losen time limit for VTOL mission 2021-04-06 11:35:18 -04:00
Julian Oes 2eaf677de3 mavsdk_tests: correctly locate plan 2021-04-06 11:35:18 -04:00
Julian Oes cd66a79747 mavsdk_tests: move waypoints to vehicle position
This way it shouldn't matter where the test is run.
2021-04-06 11:35:18 -04:00
Julian Oes d714c2faec mavsdk_tests: add VTOL mission tests
This adds VTOL mission tests to the CI integration tests.
This depends on MAVSDK v0.38.0.
2021-04-06 11:35:18 -04:00
Julian Oes 1e88939605 mavsdk_tests: report speed factor every second
This helps in debugging slow CI.
2021-04-06 11:35:18 -04:00
Daniel Agar 82200fab9e mavsdk_tests: relax MC "Fly straight" speed threshold 2021-02-21 22:51:51 +01:00
Julian Oes 46e75ebddb mavsdk_tests: remove leftover debug line 2021-02-17 18:13:14 +01:00
Julian Oes 2703a34900 mavsdk_tests: add link back to github action 2021-02-17 18:13:14 +01:00
Julian Oes 64d0ce43b6 mavsdk_tests: upload to logs.px4.io in test_runner
By doing the upload directly inside the mavsdk_test_runner.py we have
more context such as the model, case, etc.
2021-02-16 17:07:21 +01:00
Julian Oes 2315618b85 mavsdk_tests: use autopilot timestamps to sleep
This way we should be able to avoid some of the timeouts happening on
the PX4 side if MAVSDK doesn't send setpoints in time.
2021-02-16 17:07:21 +01:00
Julian Oes 6c26387e85 mavsdk_tests: try to prevent auto-disarm
We should not spend too much time sending RC init messages because if it
takes too long, we might auto-disarm in the meantime.
2021-02-16 17:07:21 +01:00
Julian Oes c1de27acf7 mavsdk_tests: use more conservative speed_factor 2021-02-16 17:07:21 +01:00
Julian Oes 0ebb8c6981 mavsdk_tests: use microseconds to avoid sleep(0) 2021-02-16 17:07:21 +01:00
Julian Oes b6b9ce5f11 mavsdk_tests: robustify test by climbing longer 2021-02-16 17:07:21 +01:00
Julian Oes b79553862e mavsdk_tests: remove timeout for mission upload
Just use what is MAVSDK internal.
2021-02-16 17:07:21 +01:00
Julian Oes aca1e85da4 mavsdk_tests: don't forget to check for rootfs dir 2021-02-11 22:25:07 +01:00
Julian Oes 4184c204c4 autopilot_tester: don't poll mission progress
Instead use subscription here as well in order not to miss an update.
2021-02-11 22:25:07 +01:00
Julian Oes 2971ce8664 mavsdk_tests: don't clear logs 2021-02-11 22:25:07 +01:00
Julian Oes 176d932f23 mavsdk_tests: prevent missing updates
It seems like we are often missing updates from topics like flight mode
or in air state, both topics that are sent out infrequenctly e.g. at 1
Hz. Therefore, instead of polling for that data we should probably
subscribe to the updates and that way get notified of each an every
update.

For instance this should prevent the case where we miss the mode change
from mission to descend and back to mission once landed and disarmed.
2021-02-10 16:37:02 -05:00
Julian Oes 2772022785 mavsdk_tests: disable mag stuck test
The estimator sometimes diverges in vz after landing which makes the
test fail. This needs to be dealt with first before we can enable the
test again.
2021-02-09 11:32:41 +01:00
Julian Oes e592bed7d3 mavsdk_tests: use timestamp from attitude field
The flight_information field was not updated often enough which lead
to timeouts.
2021-02-09 11:32:41 +01:00
Julian Oes 397fa84cd0 mavsdk_tests: add time in front of debug lines 2021-02-09 11:32:41 +01:00
Julian Kent 14cb98a6b4 Increase corridor check thresholds for mission tests 2021-01-28 12:02:06 +01:00
Lorenz Meier fda63f802e Tone alarm: Adjust log levels
The earlier log levels represented normal operation scenarios as errors, this aligns the log levels.
2020-12-31 01:05:30 +01:00
Lorenz Meier 3cc53f551d MAVSDK tests: Use full system timeout off
Depending on loop iterations for timeouts is not accurate, as usleep behavior depends on the system load and asking for a 0 ms sleep can potentially return immediately.
2020-12-31 01:05:30 +01:00
Lorenz Meier 565da15f2f MAVSDK test: Increase timeout 2020-12-28 22:04:08 +01:00
Daniel Agar fb1f360724 mavsdk_tests: consistent 180s disarm timeout 2020-11-16 15:55:10 -05:00
Daniel Agar f5660c6b0c mavsdk_tests: adjust px4 and gzserver priority relative to mavsdk_test
- this is to avoid starving the test runner
2020-11-16 15:55:10 -05:00
Daniel Agar a8f665739d mavsdk_tests: manual fly forward for slightly longer 2020-11-11 19:16:39 -05:00
Daniel Agar 756609c3e8 mavsdk_tests: relax corridor radius default for missions 2020-11-11 19:16:39 -05:00
Silvan Fuhrer d4d02f449f
Improve tailsitter tuning master (#16078)
* tailsitter SITL: improve hover tuning

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* Add SITL testing for tailsitter VTOLs

This enables SITL testing for Tailsitter vehicles

Co-authored-by: Jaeyoung-Lim <jaeyoung@auterion.com>
2020-11-02 23:41:12 +01:00
Daniel Agar cf082d7f1c
Github actions: SITL tests upgrade MAVSDK v0.30.1 -> v0.33.1 2020-10-28 20:26:47 -04:00
Daniel Agar 76602b3a8f mavsdk_tests: longer climb (5 -> 10 seconds) in fly forward altctl/posctl tests 2020-10-10 20:03:50 -04:00
JaeyoungLim 9d3e159e65
Make mavsdk test runner handle generated sdf files (#15797)
Update sitl_gazebo
Fix indent errors
Fix syntax error
Fix indentation errors
Fix syntax errors
use autopep8
2020-09-29 15:44:58 +02:00
Julian Oes 44b4a6eb74 mavsdk_tests: increase time for manual tests 2020-09-16 12:51:56 -04:00
Julian Oes e7651c94f6 mavsdk_tests: use custom rootfs, reset it
Instead of messing with existing params, use a separate rootfs for
tests, as suggested by @bkueng.
2020-09-16 12:51:56 -04:00
Julian Oes 012763e5f1 mavsdk_tests: fly forward a bit longer
Hopefully, that's long enough for slow VTOLs.
2020-09-16 12:51:56 -04:00
Julian Oes 58b4135ab0 mavsdk_tests: wait even longer
Again, hopefully that's enough.
2020-09-16 12:51:56 -04:00
Julian Oes a299e2c57d mavsdk_tests: fly forward even longer
Hopefully that's enough.
2020-09-16 12:51:56 -04:00
Julian Oes 4c00c1f561 mavsdk_tests: add missing switch to POSCTL 2020-09-16 12:51:56 -04:00
Julian Oes bbef07bc80 mavsdk_tests: init RC with throttle centered 2020-09-16 12:51:56 -04:00
Julian Oes c26b769cc0 mavsdk_tests: add missing type annotation 2020-09-16 12:51:56 -04:00
Julian Oes d2cb27e0de mavsdk_tests: try with faster RC rate 2020-09-16 12:51:56 -04:00
Julian Oes f8f03835ad mavsdk_tests: increase timeouts yet again
This is after using PX4 time to check for timeouts.
2020-09-16 12:51:56 -04:00
Julian Oes 3135b94980 mavsdk_tests: use PX4 time for timeouts
This way we are less dependent on CPU load of the host.
2020-09-16 12:51:56 -04:00
Julian Oes ca0f26a003 mavsdk_tests: added posctl/altctl test 2020-09-16 12:51:56 -04:00
Julian Oes 0a7dcf26d5 mavsdk_tests: clean up includes 2020-09-16 12:51:56 -04:00
Julian Oes 630a6f3810 mavsdk_tests: clear params between test cases 2020-09-16 12:51:56 -04:00
Julian Oes a5a577a6c4 mavsdk_tests: use speed factor, increase timeouts
We had not actually properly adjusted the timeout to the lockstep speed
factor. Once we did that, we had to increase the timeouts quite a bit to
have the tests pass.
2020-09-16 12:51:56 -04:00
Julian Oes 4eb1ea10f0 mavsdk_tests: don't block inside of callback
This is required with MAVSDK v0.29.0 and later!
2020-09-16 12:51:56 -04:00
Julian Oes 8d3f1e63f0 mavsdk_tests: use all os env vars by default 2020-09-16 12:51:56 -04:00
Julian Oes 55d2bdc438 mavsdk_tests: adapt to changed inject API
We now need to say which instance, for now it's all instances.
2020-09-16 12:51:56 -04:00
Julian Oes ed357cf356 mavsdk_tests: move math things to separate header 2020-09-16 12:51:56 -04:00
Julian Oes 1eaceb17dc mavsdk_tests: adjust timeouts by lockstep speed up 2020-09-16 12:51:56 -04:00
Julian Oes 20621e6744 mavsdk_tests: add tests for GPS as height source 2020-09-16 12:51:56 -04:00
Julian Oes c31246e13a mavsdk_tests: add test for stuck mag 2020-09-16 12:51:56 -04:00
Julian Oes afcfa2fbe0 mavsdk_tests: check for stuck baro 2020-09-16 12:51:56 -04:00
Julian Oes a05ad9c64c mavsdk_tests: add wildcards for case filtering 2020-09-16 12:51:56 -04:00
Julian Oes c4efcbf895 mavsdk_tests: check for baro failure in mission 2020-09-16 12:51:56 -04:00
Julian Oes 8d6ebf15b6 mavsdk_tests: test for losing mag during mission 2020-09-16 12:51:56 -04:00
Julian Oes ef7e4531f9 mavsdk_tests: enable GPS lost test for VTOL
This is in multicopter mode only for now though.
2020-09-16 12:51:56 -04:00
Julian Oes 3c499fc3a2 mavsdk_tests: add first GPS lost failsafe test 2020-09-16 12:51:56 -04:00
Beat Küng 055fa768d8 posix: enable ROMFSROOT
This will copy the ROMFS into the build directory under etc/, and thus
needs a change of the PX4 startup parameters and mixer paths.
2020-09-15 09:30:16 +02:00
Julian Kent 435c2fe438 Fix rarely flakey test on Github Actions 2020-07-15 09:50:58 -04:00
Julian Oes 5f2abb66a4 mavsdk_tests: add workaround to prevent failsafe
This workaround should fix the test failure where we disarm before
taking off because we accidentally switched to failsafe mode right
before taking off because we were still in Manual mode and not Hold yet.
2020-07-15 09:38:06 -04:00
Julian Oes 4ad7ea6c1a mavsdk_tests: increase the poll time resolution
With only 10 steps for e.g. 60 seconds we are likely to miss updates.
2020-07-15 09:38:06 -04:00
Julian Kent 78ff7c608f Expand tracking error for straight line test 2020-07-14 11:34:14 +02:00
Julian Kent 14e2603bc4 Pull out matrix math primitives into anon functions 2020-07-14 11:34:14 +02:00
Julian Kent 6ce2769342 Pull out point-to-line distance calc, getting local mission coords 2020-07-14 11:34:14 +02:00
Julian Kent ff4be5d815 Set rate when subscribing to velocity, specify units 2020-07-14 11:34:14 +02:00
Julian Kent e6c5771c59 Add 'corridor check' which makes sure 3D tracking is along mission 2020-07-14 11:34:14 +02:00
Julian Kent db361d7a59 Add straight-line MAVSDK test 2020-07-14 11:34:14 +02:00
Matthias Grob 480cd5ed4e mavsdk_tests: load all os environment variables for gazebo client
such that OpenGL options are also used for mavsdk_tests when the GUI
is enabled.
2020-07-09 16:43:34 +02:00
Julian Oes 620916e4c1 mavsdk_tests: add test back in
This failed with other frames but seems to pass with iris and
standard_vtol.
2020-06-24 10:44:56 -04:00
Julian Oes 5e21eb3b78 mavsdk_test: remove flaky tests
Tests for both of these models did not pass for me locally. Therefore,
I'm removing them for now. It's up to the stakeholders of these models
to add them again.
2020-06-24 10:44:56 -04:00
Daniel Agar 43fdc770c7 mavsdk_tests: temporarily disable offboard position control test 2020-06-22 13:04:39 -04:00
TSC21 bc2b118e48 mavsdk_tests: add iris_dual_gps tests 2020-06-22 12:46:40 -04:00
JaeyoungLim 59c70a5811 Add plane_catapult test for testing hand/catapult launch for fw
This adds the plane_catapult model to the test for testing fw hand /catapult takeoff
2020-06-21 11:10:33 +01:00
Daniel Agar 3092d9e1f9 github actions run SITL tests in parallel
- temporarily disable iris dual gps
2020-06-20 17:44:57 -04:00
TSC21 24ae8f601d mavsdk_tests: add iris_dual_gps to the test pipeline 2020-06-16 13:03:44 +01:00
Julian Oes be4e253e63 mavsdk_tests: bump library from v0.24.0 to v0.27.0 2020-06-11 15:18:57 +02:00
Julian Oes 9b2527549b mavsdk_tests: relax timeout for offboard goto
This probably makes sense because we ask for more accuracy, so it will
take longer to reach a position.
2020-05-29 11:46:14 +02:00
Julian Oes bc1960ef2b mavsdk_tests: make offboard tests more accurate
By making the acceptance radius smaller we should potentially also be
more accurate while landing and fail less.
2020-05-29 11:46:14 +02:00
Julian Oes dd95498379 mavsdk_tests: at normal speed RTL can take a while 2020-05-29 11:46:14 +02:00
Julian Oes 76b7d462ae mavsdk_tests: relax requirement to land at home
Hopefully, this will fix CI.
2020-05-29 11:46:14 +02:00
Julian Oes d43e4d88c3 mavsdk_tests: wait until home is set properly
Otherwise we might have NaN stored as home.
2020-05-29 11:46:14 +02:00
Julian Oes 73dda496ef mavsdk_tests: more verbose output on fail 2020-05-29 11:46:14 +02:00
Julian Oes 160aca9207 mavsdk_tests: more debug info 2020-05-29 11:46:14 +02:00
Julian Oes 1a25cdf7b2 mavsdk_tests: remove intermittently failing tests
We can bring them back when they work consistently.
2020-05-29 11:46:14 +02:00
Julian Oes a1bf1bdd9d mavsdk_tests: prevent exception if log_fd is None 2020-05-29 11:46:14 +02:00
Julian Oes 262341455b mavsdk_tests: map stderr to stdout
That way we don't need to collect it separately.
2020-05-29 11:46:14 +02:00
Julian Oes eba1cf08f8 mavsdk_tests: also use sleep workaround locally
However, don't sleep as long as in CI.
2020-05-29 11:46:14 +02:00
Julian Oes 76750fc8a6 mavsdk_tests: collect buffered up stdout output
Somehow only subprocess.stdout.readline() works at a time. In order not
to miss out on some of the stdout output, we need to collect it all at
the end. Also, we can stop using readline() for processes that have quit
already.
2020-05-29 11:46:14 +02:00
kamilritz 5bd0df422d Speed up mavsdk sitl tests 2020-05-06 09:25:03 +02:00
kamilritz af1a445031 Vision test can be speed up 2020-05-06 09:25:03 +02:00
kritz 33dc0fd146
Add vision velocity integration test (#14818) 2020-05-05 11:14:30 +02:00
Pedro Roque 3ea52fecd3 Added Roll Pitch Yawrate Thrust offboard test. Testing... 2020-04-30 17:43:25 -04:00
Julian Oes cc0b834d15 mavsdk_tests: don't fail if DISPLAY is not set 2020-04-10 14:55:18 +02:00