Commit Graph

366 Commits

Author SHA1 Message Date
Paul Riseborough a0ae998a4d Tools: Fix AIRSPEED_AUTOCAL test failure
The mission plan for this test causes a lot of overshoot when turning onto final approach with the result that there is still some lateral offset when passing the landing waypoint that is not a measure of estimator accuracy.
2021-07-22 18:20:45 +10:00
Peter Barker 9fb7ef915e Tools: add support for ms5525 i2c sensor 2021-07-13 12:00:37 +10:00
Peter Barker 7842f55a3b Tools: add rc channel option to disable all airspeed sensors 2021-06-23 15:13:13 +10:00
Peter Barker d3f90bde7f autotest: add FlyEachFrame test for Plane 2021-06-21 14:13:18 +10:00
Peter Barker 61fda691f2 autotest: add trivial test for smart battery logging 2021-06-15 09:46:26 +10:00
Peter Barker 14b2af84ab autotest: break out a home_relative_loc_ne for getting a home-rel loc 2021-06-11 16:59:51 +10:00
Peter Barker fd792bebf8 autotest: wipe SITL state after temperature cal test
ArduPilot internals are fiddling state that the autotest suite is
unaware of, so wipe the eeprom after the test
2021-06-09 14:14:06 +10:00
Peter Barker 6944ef6af1 autotest: fly each working Helicopter frame 2021-06-09 12:15:42 +10:00
James O'Shannessy bc38d8a78c AutoTest: Fix autotest from failing due to state from earlier test
Autotest was failing because there was an expectation that the plane would fly relatively north from the takeoff point.
This assumption may not be true. We work around it by using a tin can instead of an exclusion polygon so that we breach no matter the direction we fly.
2021-05-05 10:59:10 +10:00
James O'Shannessy 0e656c1504 AutoTest: Ensure Plane uses home as Fence Return Point if one is not present and no exclusion fence is present 2021-05-05 10:59:10 +10:00
Iampete1 aa72b7da46 Tools: autotest: Plane: add loiter terrain following test 2021-05-02 18:51:27 +10:00
Peter Barker 0ee0228883 autotest: fix flapping fly-home-land-and-disarm
One of the tests just happened to be within acceptance radius of
waypoint 8 - so when we set that as a waypoint we never saw it actually
be our waypoint so the set_waypoint failed
2021-04-20 23:04:24 +10:00
Peter Barker fff4aa8bde autotest: increase allowed time for climb_before_turn to get home 2021-04-01 19:11:31 +11:00
Peter Barker 30ebe6cde9 autotest: augment test DO_AUX_FUNCTIION test for FAILED AND DENIED 2021-03-31 11:36:09 +11:00
Peter Barker b55094fef4 autotest: Test triggering Auxillary Functions via mavlink 2021-03-31 11:36:09 +11:00
Peter Barker 462ac255a3 autotest: start MAVProxy only as needed for testing 2021-03-19 09:46:45 +11:00
Stavros Korokithakis f6fc6d22da autotest: Fix the climb-before-turn test 2021-03-18 07:37:21 +11:00
Peter Barker 0c7f3d20a4 autotest: fix attitude test
autotest: add a get_messages_frame method

Attempts to get a set of messages as close as reasonable in time.
2021-03-16 14:19:44 +11:00
Stavros Korokithakis 29043d62e9 Add FLIGHT_OPTION to climb before RTL 2021-03-16 11:58:47 +11:00
Hwurzburg d15e01d390 Plane: fix DO_CHANGE_SPEED airspeed to impact only AUTO and GUIDED modes 2021-03-16 10:09:34 +11:00
Peter Barker eb702b0f82 Tools: add support for ATTITUDE_QUATERNION 2021-03-13 09:44:12 +11:00
Peter Barker f78d7c3b25 autotest: add option to not check current wp after set_current_wp
Sometimes a waypoint is set which we'll never emit as our current
waypoint (e.g. a JUMP)
2021-03-10 09:12:39 +11:00
Peter Barker 4a251bebbd autotest: fix fly_home_land_and_disarm; wp 7 is never current wp
This is never a current waypoint, so we can't wait for it
2021-03-10 09:12:39 +11:00
Peter Barker bdeadce95b autotest: improve deadreckoning test
autotest: use location_offset rather than coordinates in Deadreckoning test
2021-03-05 21:34:58 +11:00
Peter Barker 425ab1358a autotest: tidy streamrate handling
Stop setting MAVProxy stream rates; these are neither here-nor-there now as MAVProxy will only modify its own connection's streamrates now

Stop doing the set-streamrate dance to work around MAVProxy's
set_streamrate algorithms.

Remove useless and misleading set of streamrate in Plane test; we reset
streamrates on the reboot immediately following this set.  Considering
the streamrate was never eset this was a good thing.
2021-03-05 21:34:58 +11:00
James O'Shannessy bcc0da9c47 AutoTest: Adds additional autotests to capture mode change while breached
AutoTest: Adds test for fence breach switching to guided mode when no fence return point is present. In upstream, this results in a vehicle fly-away.
2021-03-05 14:52:46 +11:00
James O'Shannessy dac5996d93 AutoTest: Fix autotest conflicts after rebase on upstream 2021-03-05 14:52:46 +11:00
James O'Shannessy fa7be629e5 AutoTest: Make fence tests flake8 compliant 2021-03-05 14:52:46 +11:00
James O'Shannessy 2353b55452 AutoTest: Address race conditions in changes to fence tests 2021-03-05 14:52:46 +11:00
James O'Shannessy 76a2a76b54 AutotTest: Adds autotests for Plane to test RetRally flag added to AC_Fence 2021-03-05 14:52:46 +11:00
James O'Shannessy 8545715837 AutoTest: Add Static Fence Tests for unallowed arming when breaching geofence 2021-03-05 14:52:46 +11:00
James O'Shannessy 6f7ba3b037 AutoTest: Ensure fence is disabled at end of throttle_failsafe_fence test 2021-03-05 14:52:46 +11:00
James O'Shannessy bbd606b8b5 AutoTest: Corrections to autotests 2021-03-05 14:52:46 +11:00
James O'Shannessy 47e76a1807 AutoTest: Move fence enable/disable to common location 2021-03-05 14:52:46 +11:00
James O'Shannessy 215901be30 Autotest: Correct the logic for fence based autotest functions
Adds corrections to enabling fence using aux function.
Correctly test fences statically. Only uploaded fences can be checked using a fence file, so we check those first. Then we add steps to check tin can, max and minm all set the fence as present, as expected.
Plane will support MAV_PROTOCOL_CAPABILITY_MISSION_FENCE, so we assert that it does support it.
To test ceiling and floor, leverage some existing functions for takeoff, change altitude and land. Check for respective breach.
Add a floor breach check to copter.
2021-03-05 14:52:46 +11:00
James O'Shannessy 1a3e168ced Autotest: Fence is present, but test looking for not present
Autotest: Remove ties to mavlink FENCE_ACTION

Autotest: Add ArduPlane autotest to test ceiling and floor

Adds a test to ensure the vehicle reverts to RTL when breaching a ceiling or floor.

Autotest: Progress the test once we reach takeoff complete and fence enable

Autotest: Use RC_OPTION for Aux Switch functionality

Autotest: Enable fence last
2021-03-05 14:52:46 +11:00
Peter Barker a235246628 autotest: correct units in new AHRS2 test 2021-03-03 18:41:14 +11:00
Peter Barker b3ee5d5f59 autotest: increase verbosity in AHRS2 test 2021-03-03 16:29:33 +11:00
Peter Barker 317181922c autotest: ensure we're getting vaguely sane data in AHRS2 message 2021-03-02 20:48:36 +11:00
Peter Barker cc83562add autotest: tidy fence handling 2021-03-02 16:54:06 +11:00
Peter Barker 10007e2e42 autotest: load missions natively rather than using MAVProxy 2021-03-02 14:24:36 +11:00
Peter Barker 9120882e9e autotest: print name of open dataflash log when test exception caught
The stack trace is already extremely useful... but mapping back to the
relevant dataflash log is a bit of a pain.

Adding more stuff to this method in the future might be good, too.
2021-02-21 21:35:35 +11:00
Peter Barker d4aef2dba8 autotest: stop using MAVProxy to change mode 2021-02-20 00:03:24 +11:00
Peter Barker c13d229877 autotest: use self.set_current_waypoint rather than "wp set" to set current wp 2021-02-19 12:25:40 +11:00
Peter Barker dcc04ccd09 autotest: stop using MAVProxy to change modes 2021-02-18 17:38:52 +11:00
Peter Barker 628a3843b2 autotest: flake8 compliance for arduplane.py 2021-02-18 10:43:05 +11:00
Peter Barker a292fe1b8b autotest: use wait_statustext rather than mavproxy.expect
This is important when running under Valgrind as the text can be
significantly delayed.  wait_statustext times out in simulation time,
whereas mavproxy.expect has a flat 60s timeout
2021-02-17 18:16:04 +11:00
Peter Barker c00a82868e autotest: make DLVR sole airspeed sensor in test
The test wasn't actually *using* the DLVR...
2021-02-17 14:23:07 +11:00
Peter Barker ca49f62b6d autotest: add test for Plane's RTL_CLIMB_MIN parameter 2021-02-13 19:34:52 +11:00
Peter Barker d60fa86026 autotest: use set_map_from_rc more 2021-02-13 19:34:52 +11:00
Andrew Tridgell 3add045924 autotest: fixed accel/gyro threshold consistency for tempcal 2021-01-21 13:09:21 +11:00
Andrew Tridgell fe7d933976 autotest: use delay_sim_time() in tempcal test 2021-01-21 13:09:21 +11:00
Andrew Tridgell 58b9cd2c6e autotest: added assert_reach_imu_temperature() abstraction 2021-01-21 13:09:21 +11:00
Andrew Tridgell 4c315b57ca autotest: run gyro/accel cal at non-reference temperature 2021-01-21 13:09:21 +11:00
Andrew Tridgell 2cf7e7945c autotest: make tempcal debug output clearer 2021-01-21 13:09:21 +11:00
Andrew Tridgell 84dda13b42 autotest: use new learn param setup 2021-01-21 13:09:21 +11:00
Andrew Tridgell 30385fb8cb autotest: use set_parameters() in IMU temp cal test 2021-01-21 13:09:21 +11:00
Andrew Tridgell 327db46c15 autotest: added automatic testing of IMU Temperature calibration 2021-01-21 13:09:21 +11:00
Andrew Tridgell c396d15890 Revert "autotest: ensure defaults files don't set already-default-values"
This reverts commit 3d431cd4f1.

It breaks MissionPlanner SITL. We can re-apply once MissionPlanner
copes with external_model.
2021-01-20 08:54:43 +11:00
Peter Barker 3d431cd4f1 autotest: ensure defaults files don't set already-default-values
autotest: mark some vehicles as having external physics models

autotest: add default_params_filename to some vehicle info
2021-01-19 10:34:00 +11:00
Peter Barker 6becd90df0 autotest: increase timeout on DO_CHANGE_SPEED test 2021-01-18 19:08:46 +11:00
Peter Barker 5848ff7512 autotest: eliminate race condition in plane fence static test 2021-01-18 16:32:21 +11:00
Peter Barker 6865649b9b autotest: tidy and correct ekf lane switching test 2021-01-18 15:19:39 +11:00
Peter Barker 48a38f3ee2 autotest: wait for GPS fix before installing position validation handling 2021-01-18 15:11:19 +11:00
Peter Barker cd8a393ac2 autotest: create own RC thread to handle setting of RC overrides
autotest: prevent method-on-undef problem in case of early test failure

autotest: plumb MAVProxy rc input back in for switch test

autotest: close off rc thread in case of timeout
2021-01-15 20:56:30 +11:00
Peter Barker 47aea5f44c autotest: print stack traces for caught exceptions 2021-01-13 19:46:13 +11:00
Andrew Tridgell b5476c6e5c autotest: added ExternalAHRS test 2021-01-05 21:13:12 +11:00
Peter Barker 2b06ae9aa0 autotest: create and use a wait_sensor_state method 2020-12-31 17:42:33 +11:00
Peter Barker 26bbedd777 autotest: remove un-needed parameter wipe after soaring test 2020-12-25 12:18:01 +11:00
Peter Barker 69ef0937f4 autotest: add trivial test just to cover the Airspeed_DLVR code 2020-12-22 23:07:24 +11:00
Pierre Kancir 871b9fc12d Tools: plane : initial_mode_switch_mode 2020-12-16 17:27:07 +09:00
Andrew Tridgell 5fc68a1ce5 autotest: adjust for new baro SITL param names 2020-12-11 15:21:41 +11:00
Peter Barker 813723d0b7 autotest: add test for needing AHRS to be healthy to arm 2020-12-11 09:55:40 +11:00
Tom Pittenger 58c7f8279d Tools/autotest: fix CI by updating new ADSB_ENABLE->ADSB_TYPE param name 2020-11-30 16:05:17 +11:00
Peter Barker 18330d16de autotest: add test for MAVlite 2020-10-27 10:17:53 +11:00
Peter Barker 49fd762f26 autotest: fix and re-enable button test
A recent commit to fix the setting-of-pullup-resistors in SITL makes it
possible to re-enable this.

Closes #15259
2020-10-15 08:34:08 +11:00
Samuel Tabor bd28a62155 autotest: Update soaring test for THERMAL mode. 2020-09-25 16:21:15 +10:00
Samuel Tabor fe6c4d9290 autotest: Update for THERMAL mode. 2020-09-24 07:30:48 +10:00
Harshit Kumar Sankhla f0c237d88e autotest: bug fixes for ekf lane switch test 2020-09-11 10:16:20 +10:00
Samuel Tabor 6de4967a3d autotest: Fix typos and unclear comments in soaring test. 2020-09-10 22:21:41 +10:00
Samuel Tabor f6017d60bf autotest: Update for new soaring behaviour. 2020-09-10 22:21:41 +10:00
Peter Barker 51b54d3740 autotest: avoid leaving message hooks around
Can lead to some very weird and confusing output
2020-09-09 17:59:17 +10:00
Peter Barker 9228f47dc9 autotest: create collections-on-context to record selected messages 2020-09-08 14:19:08 +10:00
Peter Barker f3866e5f39 autotest: disable button test 2020-09-08 12:31:15 +10:00
Peter Barker 522c3e6281 autotest: make LogUpload the last test again
ATM any logs produced by EKFLaneswitch won't get uploaded in case of
failure
2020-09-01 18:15:37 +10:00
Harshit Kumar Sankhla 464c90a03c Tools: add an EKF3 lane switching test to plane 2020-08-27 20:20:51 +10:00
Peter Barker 67b71e2b94 autotest: add test for Plane dead-reckoning support 2020-08-21 18:16:40 +10:00
Samuel Tabor d57b7cad63 autotest: Update soaring test to use RCX_OPTION. 2020-07-21 09:38:04 +10:00
Samuel Tabor ed14ab84ce autotest: Add test for terrain following mission. 2020-07-07 11:46:32 +10:00
Samuel Tabor c3f039a739 autotest: Add timeout to fly_mission. 2020-07-07 11:46:32 +10:00
Peter Barker 4e216f976f autotest: assert that Plane doesn't support fence-via-mission-item-protocol
Hopefully this starts to fail at some stage!
2020-06-02 19:00:32 +10:00
Peter Barker b0916231b2 autotest: add tests for log download 2020-05-26 19:32:49 +10:00
Samuel Tabor 913e5a23fe autotest: Add method to get default params for model. 2020-04-22 10:01:09 +10:00
Peter Barker e63e5ba130 autotest: correct path to defaults file when customising SITL cmdline 2020-04-19 11:09:16 +10:00
Samuel Tabor e30f0a9173 autotest: Move soaring test into plane. 2020-04-19 11:09:16 +10:00
Peter Barker 899b98b2f9 Plane: add test for loading/restoring large missions 2020-04-15 16:24:40 +10:00
Peter Barker 10e8f3f3d7 autotest: canonicalise on defaults_filepath rather than defaults_file
This naming better represents the fact this isn't just a filename.
2020-04-14 15:09:17 +10:00
Pierre Kancir 07435cc541 Tools: correct path for soaring mission 2020-04-09 09:01:03 +10:00
Pierre Kancir bcd15bc6e4 Tools: update path for plane test missions files 2020-04-09 09:01:03 +10:00
Samuel Tabor a4c5e12fac Tools: Make soaring test a subclass of plane test. 2020-04-08 09:11:54 +10:00
Pierre Kancir 56298aabda Tools: update arduplane.py wait function parameters 2020-03-27 22:13:52 +11:00
Peter Barker 403950f61f autotest: add autotests for CPU failsafe 2020-03-20 12:19:21 +11:00
Peter Barker 92d2186b95 autotest: don't use self.mav.motors_disarmed_wait as it blocks forever 2020-03-17 16:31:29 +11:00
Peter Barker b0aceaea70 autotest: add tests for LTM telemetry output 2020-02-08 10:38:34 +11:00
Peter Barker 71a129d685 autotest: add test for Plane LOITER 2020-02-07 15:02:35 +11:00
Peter Barker 9192cb7b41 autotest: add tests for parameter download 2020-01-15 13:54:23 +11:00
Peter Barker ba13f0bb29 autotest: add test for Frsky SPort 2020-01-13 16:03:12 +11:00
Peter Barker cefd991fb0 autotest: add test for frsky passthrough 2020-01-11 22:43:36 +11:00
Peter Barker 1cfb4e4a49 autotest: test FRSky serial output by taking output via TCP 2020-01-09 12:24:11 +11:00
Peter Hall 2518328801 Tools: autotest: update flap test 2020-01-01 08:11:01 +11:00
Peter Barker 5b45931728 autotest: test buttons on Plane and Copter as well as Rover 2019-12-10 09:29:52 +09:00
Peter Barker fc98b7d9e8 autotest: add test for fence surviving a bind-values receiver failure 2019-11-19 10:59:02 +11:00
Peter Barker d8322500c1 autotest: augment ADSB test for RC_Channel enable/disable 2019-11-12 13:48:09 +11:00
Peter Barker f8d10ebc0f autotest: add test for GuidedRequest handling in Plane 2019-11-11 14:07:37 +11:00
Peter Barker ece59f8233 autotest: replace wait_seconds with delay_sim_time
These did exactly the same thing
2019-11-08 19:49:46 +11:00
Peter Barker 2daccf0ef0 autotest: add test for deepstall with relative LAND item 2019-10-18 20:13:18 +11:00
Peter Barker 8cfe181604 autotest: increase timeouts on collision test
Azuer seems to have some issue with this test.  Make it a little more
lenient
2019-10-18 20:12:44 +11:00
Peter Barker 1f7a3d0e16 autotest: add deepstall test 2019-10-18 09:26:12 +11:00
Peter Barker 1af76bbf60 Tools: autotest: make plane receiver-healthy check more reliable 2019-10-09 10:30:18 +11:00
Peter Barker 92160b454a Tools: autotest: remove switch position assumption from takeoff 2019-09-25 13:42:21 +10:00
Peter Barker 642935fd43 Tools: random Python cleanups based on lgtm analysis 2019-09-21 22:26:03 +10:00
Peter Barker 8736a13a87 Tools: autotest: fix for Plane receiver health test
Won't be healthy until SITL is repolled for RC input
2019-09-17 13:31:06 +10:00
Peter Barker bba019abc2 Tools: autotest: add basic tests for AP_AdvancedFailsafe 2019-09-17 09:13:43 +10:00
Peter Barker 36ba3a6e4c Tools: autotest: add test for follow mode 2019-09-16 12:00:11 +10:00
Peter Barker fba072e5fc Tools: autotest; python3 fixes 2019-08-29 08:43:45 +10:00
Peter Barker 4954c190da Tools: autotest: add test for short failsafe triggering via low-throttle 2019-08-26 19:56:54 +10:00
Andrew Tridgell 6de85c4627 Tools: fixed autotest for throttle failsafe 2019-08-26 17:20:24 +10:00
Peter Barker a8a5ccf51b Tools: autotest: test that long fs triggers even if short fs disabled 2019-08-15 12:07:30 +10:00
Peter Barker bf0a947317 Tools: autotest: improve test diagnostics 2019-08-08 08:35:52 +10:00
Peter Barker 16503f7f25 Tools: autotest: add test for Plane reposition 2019-08-06 12:52:09 +10:00
Peter Barker 12b9928a56 Tools: autotest: break out a load_fence function 2019-08-05 16:37:08 +10:00
Peter Barker 6fc22cd5a3 Tools: autotest: make rangefinder test more reliable 2019-07-23 17:08:02 +10:00
Peter Barker b208b76884 Tools: autotest: add trivial test for receiving COLLISION message 2019-07-16 09:52:54 +10:00
Pierre Kancir 12cb09a3f4 Tools: factorize sitl rangefinder setup 2019-07-11 11:52:44 +10:00
Pierre Kancir daaf769055 Tools: add arm/disarm testing on all modes 2019-07-11 11:42:45 +10:00
Peter Barker 5b5f582307 Tools: autotest: present stack traces on exceptions 2019-07-08 16:51:25 +10:00
Peter Barker dc75f382b8 Tools: autotest: loosen check for wait_circling_point_with_radius
Also add a timeout
2019-06-25 19:59:14 +10:00
Peter Barker fec3dc4f70 Tools: autotest: add tests for Plane AuxSwitch mode changes 2019-06-18 10:48:47 +10:00
Peter Barker 553037c117 Tools: autotest: disable fence when RTLing to home
Otherwise we breach the fence while loitering...
2019-06-14 18:23:27 +10:00
Peter Barker c8a4af76fe Tools: autotest: add tests for Plane fence 2019-06-07 16:29:37 +10:00
Peter Barker 9e8e48c9c6 Tools: autotest: add test for Plane DO_CHANGE_SPEED 2019-05-21 13:06:07 +10:00
Peter Barker d05a4a04c5 Tools: autotest: add autotest for sink-rate triggering 2019-04-30 13:04:02 +10:00
Peter Barker 601504e685 Tools: autotest: ensure RNFD messages emitted 2019-04-09 22:17:58 +10:00
Peter Barker 9a16b40a73 Tools: autotest: rename get_rudder_channel to get_stick_arming_channel
... as some of these aren't actually rudder inputs...
2019-03-27 11:29:53 +11:00
Peter Barker 6bf600c587 Tools: autotest: cope with being unable to reboot while armed 2019-03-19 10:53:37 +11:00
Peter Barker d53f787a14 Tools: factor init up into parent class
Tools: autotest: use speedup 8 for all suites

for reliability
2019-03-13 08:20:20 +11:00
Peter Barker 6418226106 Tools: autotest: increase test diagnostics
Tools: autotest: improve wait_distance_home_gt output

Tools: autotest: emit progress for parameter sets

Tools: autotest: add progress for RC health checks

Tools: autotest: remove pointless context
2019-03-11 11:25:04 +11:00
Peter Barker d48eab893a Tools: autotest: stop swallowing critical messages with get_sim_time() 2019-03-10 21:55:51 +11:00
Peter Barker c464da69f1 Tools: autotest: fix Plane guided test
70 degrees is past LIM_ROLL_CD!
2019-03-10 20:33:38 +11:00
Peter Barker 19f51813f2 Tools: autotest: include mavproxy output in all vehicle test log files 2019-03-08 23:21:27 +11:00