Commit Graph

626 Commits

Author SHA1 Message Date
Randy Mackay 2f51b59de4 Tools: copter test parameter validation waits 10sec before starting
This allows the GPS driver to initialise which avoids an EKF3 source requires GPS failure
2021-01-16 08:24:23 +09:00
Randy Mackay bb926a2976 Tools: autotest fly_gyro_fft disables EKF2 and EKF3
fly_gyro_fft_harmonic also disables EKF2 and EKF3
2021-01-16 08:24:23 +09:00
Randy Mackay f9e7d59756 Tools: Copter.ArmFeatures fixups for EKF3
changed to disable the simulated GPS instead of disabling the driver
expected EKF flags are slightly different
2021-01-16 08:24:23 +09:00
Randy Mackay 9c56b406be Tools: Copter.AltEstimation fixes
disable baro so EKF has no altitude estimate
add check that mode change to ALT_HOLD failed
2021-01-16 08:24:23 +09:00
Randy Mackay f68f26e75d Tools: Copter.VisionPosition config for EKF3 2021-01-16 08:24:23 +09:00
Randy Mackay d2bdc949b2 Tools: Copter.OpticalFlowLimits checks altitude 2021-01-16 08:24:23 +09:00
Randy Mackay 0ba696f761 Tools: Copter.OpticalFlowLimits config for EKF2/3 2021-01-16 08:24:23 +09:00
Randy Mackay d00194c60a Tools: copter test_rangefinder_switchover config for EKF2/3 2021-01-16 08:24:23 +09: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 1dad0ecb46 autotest: disarm vehicle in case vibration test excepts 2021-01-13 19:46:13 +11:00
Peter Barker 47aea5f44c autotest: print stack traces for caught exceptions 2021-01-13 19:46:13 +11:00
Peter Barker e85e6d3375 autotest: use new set_parameters in place of many set_parameter calls
autotest: use set_parameters for applying from parameter file

autotest: use set_parameters in place of many set_parameter calls
2021-01-13 15:09:29 +11:00
Peter Barker 8497f8fc73 autotest: correct some timeout issues around Copter takeoff 2021-01-13 12:24:17 +11:00
Peter Barker 0a39c49711 autotest: gpstovicon: reboot after setting new EKF type rather than before 2021-01-13 12:24:17 +11:00
Peter Barker 252b166099 autotest: reboot after Copter gyrofft test
Really weird things happen if you switch from EKF2 to EKF10 - like your
home position being set but your origin not!
2021-01-13 12:24:17 +11:00
Peter Barker 987466bc3d autotest: increase timeout on avoidance-corners test
Race conditions can mean angles are less than expected
2021-01-13 12:24:17 +11:00
Peter Barker 7474948971 autotest: add test for mavlink rangefinder out-of-range-low 2021-01-06 15:33:41 +11:00
Peter Barker fdd0297f12 autotest: add more tests for MAVLink rangefinder
Allows for finer-grain control over what messages we're sending.
2021-01-06 15:33:41 +11:00
Randy Mackay 66b2b988c4 Tools: update gps-vicon switching test params 2021-01-05 10:58:06 +11:00
Peter Barker 8abf9a82f3 autotest: reliability improvements for EKF failover tests 2020-12-31 14:49:25 +11:00
Peter Barker 0788b46374 autotest: add trivial test for Callisto 2020-12-25 12:18:01 +11:00
Pierre Kancir 824b9c1dc9 Autotest: add setpoint_target test for copter 2020-12-24 00:22:52 +11:00
Peter Barker 662814d6bd autotest: reboot after running Copter vibe tests
The EKF type (at the very least) requires a reboot to revert to its
original value.
2020-12-22 23:51:54 +11:00
Randy Mackay d964fa2307 Tools: fixup EKF source pre-arm test
although setting COMPASS_USE/2/3 to zero disables the pre-arm for EK3_SRCx_YAW = 1 (Compass) the pre-arm still triggers if EK3_SRCx_YAW = 3 (External Compass Fallback)
2020-12-21 16:56:38 +09:00
Randy Mackay 50f9eee54c Tools: relax fly_guided_stop climb rate tolerance to 1cm/s 2020-12-18 08:32:21 +09:00
Paul Riseborough 4cf78c34e7 Tools: Add autotest for copter wind estimation and baro correction 2020-12-11 15:21:41 +11:00
Paul Riseborough a3b5901218 autotest: Fix failing copter fly_square test
This test should be flown in ALT_HOLD, not  STABILIZE as that is better mode to test the record waypoint function becasue it removes the need to fine tune the RC3 value to match thrust/weight variation as the hover thrust is not learned fast enough at the start of the test.
2020-12-11 15:21:41 +11:00
Randy Mackay 9803a70d3f Tools: copter autotest spelling and format fixes 2020-12-09 19:30:48 +09:00
Randy Mackay 665e6ccdcb Tools: copter GCS fs tests explicitly set FS_GCS_ENABLE and FS_OPTIONS 2020-12-09 19:30:48 +09:00
Peter Barker 0406b28abd autotest: print exception if caught in test_alt_estimate_prearm 2020-12-09 18:06:18 +11:00
Peter Barker 768e3e7931 autotest: adjust Vicon test for new PREARM-checking code
The new check that the prearms-passing bit from the autopilot
indicated prearms have passed was failing here because the yaw isn't
alighed until we frob channel 7.

The intent of the prearm seems ot have been to ensure we can get a
global position - that can be accomplished by polling the home position.
2020-12-07 11:21:30 +11:00
Peter Barker be52e642f7 autotest: adjust Replay gps bit to make final logfile replayable 2020-12-03 17:28:26 +11:00
Peter Barker 211cd5255d autotest: tweak beacon test to be replay-friendly 2020-11-30 18:50:24 +11:00
Peter Barker 498b0b79a3 autotest: Replay tests OpticalFlow and Beacons
autotest: run Replay on log generated by test.Copter.BeaconPosition

autotest: test OpticalFlow in replay tests
2020-11-30 18:50:24 +11:00
Peter Barker 9e20f4a68d autotest: add a test for compass yaw sources 2020-11-25 15:19:00 +11:00
Peter Barker b788a172c8 autotest: add simple test for IE24 generator
Tools: Modified richenpower autotest setup

autotest: IE24: Add error code failsafe test
2020-11-24 12:54:52 +11:00
Peter Barker 935d39322c autotest: correct test for mode-change-reason change 2020-11-24 10:09:37 +11:00
Randy Mackay f257dc20d0 Tools: add test.Copter.GPSViconSwitching to CopterTests1d 2020-11-20 16:43:44 +09:00
Randy Mackay b6fe039a9f Tools: autotest for beacon sets EK3_SRC params 2020-11-20 16:43:44 +09:00
Peter Barker 58bdae1b52 autotest: get Valgrind closer-to-working
This gets us past the reboot problem for the most part, where Valgrind doesn't like you exec'ing
2020-11-11 18:22:58 +11:00
Andrew Tridgell 00cfc1932f autotest: fixed arm delay in replay test
thanks to Peter
2020-11-10 16:15:45 +11:00
Andrew Tridgell 5f669e22ff autotest: adjust optical flow speed test 2020-11-10 16:15:45 +11:00
Andrew Tridgell 1a1ca7cca7 autotest: fly a bit higher in optical flow test
test was occasionally hitting the ground
2020-11-10 16:15:45 +11:00
Andrew Tridgell 690af580c9 autotest: abstract out load_local_module()
this will be useful for other tests
2020-11-10 16:15:45 +11:00
Andrew Tridgell f674d124d6 autotest: use SITL replay 2020-11-10 16:15:45 +11:00
Andrew Tridgell 7b50780c5e autotest: fixed rmtree error in autotest 2020-11-10 16:15:45 +11:00
Andrew Tridgell a37cae5dae autotest: added test.Copter.Replay test 2020-11-10 16:15:45 +11:00
Andrew Tridgell 3dff0b3d58 autotest: removed dcm yaw test
this should not be part of replay PR
2020-11-10 16:15:45 +11:00
Andrew Tridgell 3ae237b652 autotest: started work on replay testing 2020-11-10 16:15:45 +11:00
bugobliterator c72c96fa9c Tools: setup CI test for CANBus 2020-11-04 19:59:40 +11:00
Andrew Tridgell 3e3da61396 Tools: fixes from review feedback 2020-10-28 14:20:44 +11:00
Andrew Tridgell 47bf3e2249 Tools: use max_err for alt wait in flip test 2020-10-28 14:20:44 +11:00
Andrew Tridgell 72d0730194 Tools: fixed flow speed test to be much more robust
takeoff in ALT_HOLD so we don't overshoot as much, and calculate speed
limit based on actual alt
2020-10-28 14:20:44 +11:00
Andrew Tridgell da86dc8814 Tools: fixed FFT test thresholds for new tune 2020-10-28 14:20:44 +11:00
Andrew Tridgell a95c2e9db3 Tools: fixed optical flow speed limit
should be 10m/s, as per comment
2020-10-28 14:20:44 +11:00
Andrew Tridgell 86c558e735 Tools: fixed fast climb in SuperSimpleCircle test
1700 makes us climb much too far
2020-10-28 14:20:44 +11:00
Andrew Tridgell ca6da722a9 Tools: adjust StabilityPatch test
fixed to account for use of propeller expo in model
2020-10-28 14:20:44 +11:00
Andrew Tridgell 98dacd5ee4 Tools: fixed wait_for_alt
should be a min alt. This is needed for Flip test to pass with new
model, as it doesn't lose as much height as the old model. So it
starts above the min alt
2020-10-28 14:20:44 +11:00
Buzz 586e9f80d5 AutoTest: break copter autotests into smaller "under 10 minute" chunks to speedup github actions CI 2020-10-21 18:01:47 +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
Peter Barker d865c8553c autotest: loosen takeoff check in heli takeoff to 1m
On the basis that random noise can make it drift 10cm
2020-10-14 12:49:23 +11:00
Peter Barker f9324d38c9 autotest: loosen groundspeed tolerance in guided-stop function
Fixes current "Vehicle did not stop" problem
2020-10-09 12:05:23 +11:00
Peter Barker b630aeeddf autotest: comment suspicious-looking latitude/longitude parameters 2020-10-08 17:23:09 +09:00
Peter Barker 750f1d4032 autotest: send position targets once 2020-10-08 17:22:29 +09:00
Peter Barker 1d0735f206 autotest: add a poll_message method 2020-10-07 11:54:02 +11:00
Peter Barker 64461dba5e autotest: fix Copter motortest test
We were swallowing all of the rc output containing the values we were
looking for.

Rearrange so we don't swallow where we were, and increase timeout on the
basis that there's still a narrow race.
2020-09-23 09:49:54 +10:00
Peter Barker 995cda6363 autotest: stop taking off when we're already in the air
Depending on timing we can miss the fact we're already at altitude as we
take off in stabilize and manipulate the throttle before checking
altitude
2020-09-10 10:39:30 +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 f3866e5f39 autotest: disable button test 2020-09-08 12:31:15 +10:00
Andrew Tridgell 80ef6fa7f2 Tools: added a MagFail test
ensures that both EK2 and EK3 will failover to a new compass on
compass failure
2020-09-08 11:01:14 +10:00
Peter Barker d508ba97c5 autotest: add test for SmartRTL getting another GCS failsafe
Test for specific bug where we would land instead of continue in
SmartRTL
2020-09-08 09:05:03 +09:00
Andy Piper 6ebc7622fe autotest: comprehensive dataflash test 2020-09-05 10:20:39 +10:00
Peter Barker e8fa4e1351 autotest: disable autotest for altitude prearm check 2020-08-30 08:38:35 +10:00
Peter Barker b7641345e1 autotest: set and get parameters directly using mavlink message 2020-08-30 08:38:35 +10:00
Pierre Kancir 084ec2bb5a Autotest: copter: fix wait_for_alt for descending wait 2020-08-29 14:53:30 +10:00
Pierre Kancir ebd13ac84e Tools: copter: wait_landed_and_disarmed: use wait_for_alt 2020-08-29 14:53:30 +10:00
Pierre Kancir 7fbf11061f Tools: copter: add wait_rtl_complete function 2020-08-29 14:53:30 +10:00
Pierre Kancir 3080899b43 Tools: copter: add wait land and disarm functions 2020-08-29 14:53:30 +10:00
Pierre Kancir 5b72de25e0 Autotest: update wait_distance_to_home
Autotest: copter: allow to pass min_distance for RTL

Autotest: rover: allow to pass min distance for RTL
2020-08-29 10:44:19 +10:00
Pierre Kancir 16b499d0f6 Autotest: allow to select which GPS flags we want to wait for 2020-08-27 09:11:13 +10:00
Peter Barker 3ae83d70b1 autotest: ensure df log is present for rangefinder tests
there may not be a current onboard log present if we've just rebooted
2020-08-26 11:59:11 +10:00
Peter Barker a523868b33 autotest: fix Beacon test 2020-08-25 17:21:50 +10:00
Randy Mackay 660579f2f4 Tools: fix copter beacon test params 2020-08-25 09:38:10 +09:00
Peter Barker 69d246d63e autotest: add test for priority-based compass reordering 2020-08-25 08:30:04 +10:00
Pierre Kancir f73e4c0071 Autotest: copter: add test for mandatory alt estimation for Alt_hold 2020-08-21 13:35:51 +10:00
Peter Barker f14c9db568 autotest: improve debug around heli poshold takeoff test 2020-08-20 10:10:34 +10:00
Pierre Kancir acc4a1db3f Autotest: remove special case for vicon and default vicon for copter to false 2020-08-17 21:17:26 +10:00
Pierre Kancir fa4a01e8f9 autotest: copter: don't use raw reboot on fly_battery_failsafe() 2020-08-14 09:42:52 +10:00
Pierre Kancir 3c6d1a359a autotest: copter: catch exception on test_battery_failsafe to reset parameters 2020-08-13 12:09:23 +10:00
Pierre Kancir 5fe81706bb autotest: copter: catch exception on test_gcs_failsafe to reset parameters 2020-08-13 12:09:23 +10:00
Pierre Kancir 9c41462bf6 Tools: copter: correct flip test 2020-08-13 10:37:02 +10:00
Peter Barker 9cd5fdacfc Tools: autotest: add a test for motor test 2020-08-10 09:18:05 +10:00
Peter Barker e51427a2bc autotest: add a test to ensure we get voltage from generator in battery_status message 2020-08-07 14:46:20 +10:00
Peter Barker 77df7c7a39 autotest: autotest the MaxBotixI2CXL i2c rangefinder code 2020-08-07 08:52:00 +10:00
Peter Barker 07abb3ab6a autotest: extend RichenPower test 2020-08-05 16:26:19 +09:00
Rishabh bac3660fca Tools: Push autotune switch test to run after avoidance tests 2020-08-05 15:37:04 +09:00
Rishabh cf04a01389 Tools: Increase timeout for avoidance autotest 2020-08-05 15:37:04 +09:00
Peter Barker 39f16c4679 autotest: reboot SITL after running autotune switch test 2020-07-24 20:49:12 +10:00
Andy Piper a00b5cb770 autotest: db's are negative so check dynamic notches the right way 2020-07-18 19:09:33 +10:00
Andy Piper 229036b4ae autotest: run dynamic notch twice to avoid statistical anomolies
relax notch tests attenuation levels
2020-07-16 13:18:32 +10:00
Peter Barker 2c1d77bf8f autotest: test simulated ship takeoff 2020-07-10 13:28:38 +10:00
Peter Barker 6eb1d289b8 autotest: add trivial test for CRSF in copter 2020-07-07 18:48:06 +10:00
Peter Barker 977ec1a7d6 autotest: SuperSimpleCircle: increase throttle while rolling in stab
We're hitting the ground...
2020-07-04 17:18:37 +10:00
Peter Barker b8c2b16394 autotest: autotest gyus42v2 rangefinder 2020-07-04 13:40:10 +10:00
Peter Barker 560b4a9847 autotest: fix race condition between switch message and rc output 2020-07-03 22:06:48 +10:00
Peter Barker 96e500fe49 autotest: correct heli rebase issue 2020-07-03 12:07:06 +10:00
Peter Barker 717dabfe69 autotest: remove heat model for generator 2020-07-03 08:21:42 +09:00
Peter Barker bac60e0d3a autotest: add simple tests for richenpower generator 2020-07-03 08:21:42 +09:00
bnsgeyer 1191a5e1ea Tools: Tradheli add rotor_runup_complete_checks 2020-07-02 21:49:40 +10:00
Peter Barker 332c73d168 autotest: reboot before running Copter ModeCircle test
This shouldn't be required, but CI is falling over too much.
2020-07-02 18:40:11 +10:00
Peter Barker de226c69ab Tools: add simulated LightWare serial lidar talking new binary protocol 2020-07-02 10:50:59 +10:00
Andy Piper 4147f0cce3 autotest: test gains are saved by autotune 2020-06-30 20:09:48 +10:00
Peter Barker 7da5f7c9b5 autotest: disable Spline waypoint test
The bug being exposed is causing too much noise in CI.
2020-06-26 18:05:41 +09:00
Andy Piper b4efb78315 autotest: rangefinder transition test 2020-06-24 21:16:50 +09:00
Andy Piper c6415136ed autotest: add a test for dynamic harmonics 2020-06-21 19:09:35 +10:00
Peter Barker ba5e4b8e37 autotest: python3 fix for fly_guided_move_to 2020-06-15 12:54:25 +10:00
Andrew Tridgell 7390846851 autotest: we need more than 1500 throttle for SimpleMode test
we are in stabilize and flying around, needs more than half throttle
to maintain height. This test was already marginal, but addition of
pressure alt in SITL pushed it over the edge
2020-06-05 11:35:53 +10:00
bugobliterator 2c3bd61eb4 autotest: remove older compass calibration test 2020-06-05 09:38:40 +10:00
Pierre Kancir bd53796ed4 Tools: copter: add compass calibration testing 2020-06-05 09:38:40 +10:00
Peter Barker 6c67ddacf4 autotest: rename set_heartbeat_interval to set_heartbeat_rate 2020-06-04 01:11:28 +10:00
Christian Clauss b07fb05dde autotest: Use ==/!= to compare constant literals (str, bytes, int, float, tuple)
Avoid SyntaxWarnings on Python >= 3.8

% `python3.8`
```
>>> "second" is "second"
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
```
`flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics`
```
./Tools/autotest/arducopter.py:3899:20: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
                if loop is not "second":
                   ^
./Tools/autotest/arducopter.py:4047:20: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
                if loop is not "second":
                   ^
2     F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
2
```
2020-06-02 16:25:15 +10:00
Peter Barker adeb37581f autotest: fix heli for setpoint change 2020-05-29 14:53:12 +10:00
Peter Barker aaef44858f autotest: add test for Heli stabilize-mode takeoff 2020-05-29 14:25:30 +10:00
Peter Barker b0916231b2 autotest: add tests for log download 2020-05-26 19:32:49 +10:00
Andy Piper 1358e39ffd autotest: test 256 FT windows and fix calculation of log-based FFT
fix quadplane FFT reference calculation
re-enable harmonic test
use median for measuring in-flight FFT average as it's much more reliable
relax quadplane filter restriction
harmonic switching test
tighten frequency check and loop twice to avoid heisenbugs
2020-05-24 07:43:34 +10:00
Peter Barker c0fae0b1fb autotest: disable GyroFFT test; underlying issue being actively worked on 2020-05-15 16:02:41 +10:00
Andy Piper 8f864f02fb autotest: 256 windows don't currently work 2020-05-06 10:14:30 +10:00
Andy Piper db4a612c13 autotest: test 256 FT windows and fix calculation of log-based FFT
fix quadplane FFT reference calculation
re-enable harmonic test
use median for measuring in-flight FFT average as it's much more reliable
relax quadplane filter restriction
2020-05-06 10:14:30 +10:00
Peter Barker 1c7354c321 autotest: improve mount debug 2020-05-05 20:51:23 +10:00
Andy Piper dd987c9a19 autotest: new harmonic notch test 2020-04-28 09:32:02 +10:00
Peter Barker 39032459d1 autotest: add explicit test for mavlink rangefinder 2020-04-21 20:44:59 +10:00
Randy Mackay f78d8b009a Tools: enable visual odometry for fly_vision_position test 2020-04-09 19:41:08 +09:00
Pierre Kancir 24a2bc3b0e Tools: update path for copter test missions files 2020-04-09 09:01:03 +10:00
Peter Barker cbe1dba781 autotest: loosen slowdown constraint on zigzag test 2020-04-02 09:39:27 +11:00
Peter Barker f450df18b0 autotest: allow more time to loiter to ne in precision test 2020-04-01 21:51:22 +11:00
Pierre Kancir aec5ae91fa Tools: adjust zigzag timing to pass test 2020-03-27 22:13:52 +11:00
Pierre Kancir 3f441e61cd Tools: copter : make zigzag more verbose 2020-03-27 22:13:52 +11:00
Pierre Kancir aba594fe2d Tools: copter: update exception for rangefinder test 2020-03-27 22:13:52 +11:00
Pierre Kancir 1689714a5c Tools: copter: add more verbose on fly_guided_change_submode 2020-03-27 22:13:52 +11:00
Pierre Kancir e4eebce5a6 Tools: update arducopter.py to use new wait functions 2020-03-27 22:13:52 +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
Andy Piper 718a6593e6 autotest: disable harmonic FFT test 2020-03-13 21:10:56 +11:00
Andy Piper 7c1757bab4 autotest: separate out harmonic matching test
be more forgiving about harmonic fit detection due to imperfect simulation
use the fft length to determine how accurate the frequency match should be
2020-03-13 21:10:56 +11:00
Andy Piper de55e4dcc2 autotest: disable harmonic matching test 2020-03-07 20:44:52 +11:00
Andy Piper eb0923a018 autotest: separate out harmonic matching test 2020-03-07 20:44:52 +11:00
Peter Barker 3fac5ad52c autotest: loosen gyro fft test to avoid spurious CI failures 2020-03-01 20:51:26 +11:00
Peter Barker cb8d623624 autotest: add test for fixed yaw calibration 2020-02-29 16:25:30 +11:00
Andy Piper ee18db36fa autotest: be more lenient on frequency with harmonic matching test 2020-02-25 08:35:09 +11:00
Peter Barker b3bfc0bd32 autotest: add instant-disarm radio failsafe test 2020-02-24 12:25:42 +11:00
Peter Barker 82f53abee2 autotest: restore fly.ArduCopter as running all tests
the test list for ArduCopter is made up of those from tests1 and tests2
2020-02-22 16:51:39 +11:00