47 Commits

Author SHA1 Message Date
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
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
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
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
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
397fa84cd0 mavsdk_tests: add time in front of debug lines 2021-02-09 11:32:41 +01:00
Daniel Agar
a8f665739d mavsdk_tests: manual fly forward for slightly longer 2020-11-11 19:16:39 -05: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
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
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
d2cb27e0de mavsdk_tests: try with faster RC rate 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
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
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
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
3c499fc3a2 mavsdk_tests: add first GPS lost failsafe test 2020-09-16 12:51:56 -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 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
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
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
kamilritz
5bd0df422d Speed up mavsdk sitl tests 2020-05-06 09:25:03 +02:00
Julian Oes
b5048a3414 mavsdk_tests: add header and fix style 2020-03-18 17:57:41 +00:00
Julian Oes
512faa6ebe mavsdk_tests: use CHECK if we don't need to abort 2020-03-18 17:57:41 +00:00
Julian Oes
a5d1ce91e4 mavsdk_tests: consolidate level of abstraction
This moves the CHECK/REQUIRE inside of AutopilotTester.
2020-03-18 17:57:41 +00:00
Julian Oes
c61cd10db5 mavsdk_tests: without speedup the VTOL takes time 2020-03-18 17:57:41 +00:00
Lorenz Meier
eb50e89d87
Add flow tests to MAVSDK tests (#14039)
* workflows: remove unneeded pip dep and comments

* mavsdk_tests: simple test using flow/offboard

This adds a first proof of concept of a test using flow and offboard.

* Flow MAVSDK test: check against ground truth

* CleanUp

* workflows: use latest docker image with psutil

* mavsdk_tests: fix PEP8 issues

* Add VTOL CI tests back

* switch to non-rendering flow mockup

* workflows: install mavsdk from GitHub release .deb

* Add vision test and disable VTOL temporarlly

* Fist draft of combining test coverage and test in one workflow

* Add VTOL mavsdk tests back in CI

Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: kritz <kritz@ethz.ch>
2020-01-30 11:57:48 +01:00
Lorenz Meier
7b44f5d069 Tests: Add VTOL test
This is a first initial VTOL test.
2020-01-28 08:59:25 +01:00
Julian Oes
956bd1b7b1 Move mavsdk_tests into test 2019-12-26 10:16:58 +01:00