Commit Graph

945 Commits

Author SHA1 Message Date
Andrew Tridgell
52d80241b9 autotest: added quadplane-can vehicle
setup with all CAN peripherals
2023-08-24 13:06:40 +10:00
Andrew Tridgell
19ce28a49d autotest: allow CAN test to run at speedup 10
we can now use larger speedups for DroneCAN SITL AP_Periph
2023-08-24 13:06:40 +10:00
Andrew Tridgell
baa6bc0e2b autotest: revert single precision change for FETtecESC 2023-08-15 22:39:23 +10:00
Peter Barker
a430232e1c autotest: add test for servo output values in scaled passthrough 2023-08-15 08:16:16 +10:00
Peter Barker
f66fcb7a54 autotest: add test for PSC_JERK_Z 2023-08-14 15:24:09 +10:00
Randy Mackay
fb52e6abd1 autotest: relax Copter vibration failsafe timeout 2023-08-12 14:30:02 +10:00
Peter Barker
70c6f49613 autotest: disarm vehicle in exception handle for PrecLand test 2023-08-12 14:03:03 +10:00
Peter Barker
60cfc0f016 autotest: move user_takeoff up to common 2023-08-10 19:51:52 +10:00
Peter Barker
c99b5e5d47 autotest: remove copter wait_for_alt
use common wait_altitude instead
2023-08-05 20:05:08 +10:00
Randy Mackay
ba72c58659 autotest: autotest gets GSF_reset test 2023-08-04 08:16:05 +10:00
Peter Barker
14c3b80c9c autotest: remove pointless try/except block in GSF test 2023-08-04 08:16:05 +10:00
Andy Piper
6e37beb63c autotest: relax precision loiter test 2023-08-02 16:22:59 +01:00
Andy Piper
076a0e848c autotest: relax test limits for single-precision 2023-08-02 16:22:59 +01:00
Peter Barker
8b88dcf336 autotest: ensure we test SET_ROI_SYSID as both command-long and command-int 2023-08-01 10:16:14 +10:00
Peter Barker
c8beddf4c7 autotest: test DO_SET_ROI_NONE as both long and INT 2023-07-19 17:03:00 +09:00
Peter Barker
d69ba376ad autotest: use named parameters for send_cmd and run_cmd
most commands don't use all the parameters.  Counting through these was painful.
2023-07-15 21:39:16 +10:00
Peter Barker
277d16831d autotest: tweak tweak timeout on proximity test
half this allowed time was going on actually getthing the EKF happy
2023-07-15 13:02:37 +10:00
Peter Barker
74199d75c0 autotest: use send_mavlink_arm_command 2023-07-15 13:02:37 +10:00
Peter Barker
9aad60e4ae autotest: remove un-needed context from AC_Avoidance_Fence 2023-07-15 13:02:37 +10:00
Peter Barker
9c0adaf1cf autotest: split Copter proximity avoidance test in two 2023-07-15 13:02:37 +10:00
Peter Barker
ec994957b3 autotest: tidy extraction of home string from mission files 2023-07-15 00:34:19 +10:00
Peter Barker
d0d15ad3ee autotest: augment mount test to attempt as CMD_INT 2023-07-12 18:51:07 +10:00
Peter Barker
522456a535 Tools: act on safety switch being enabled in SITL by zeroing outputs 2023-07-12 17:53:12 +10:00
rishabsingh3003
5500cb97c7 autotest: add simulated nooploop tofsense rangefinder 2023-06-28 17:16:22 +10:00
Andrew Tridgell
669b58b017 Tools: fixed RefindGPS test
this test was relying on the EKF bug fixed in this PR. The copter was
actually fully landing and touching the ground in the LAND phase
whereas the original intention of this test was that it not touch the
ground in LAND. See the graph in
https://github.com/ArduPilot/ardupilot/pull/17104 where the test was
added
2023-06-26 18:09:31 +10:00
bnsgeyer
c8fc238e62 Tools: add throttle curve and governor autotest for tradheli 2023-06-16 23:18:23 +10:00
Randy Mackay
7ecb580519 Tools: autotest proximity sensor fix for sf45b 2023-06-14 17:49:30 +10:00
Peter Barker
d0f06beeaa autotest: care not which CAN GPS is unhealthy when in maintenance mode 2023-06-07 14:21:43 +10:00
Peter Barker
35ebc25172 autotest: restart both CAN nodes in CAN prearm test
the node id we put into maintenane mode varies
2023-06-04 15:24:59 +10:00
Peter Barker
7bdc31b539 autotest: add an epsilon for achieved servo output for speed scaling test
right on the threshold
2023-05-30 12:34:33 +10:00
Peter Barker
ea0ab227ce autotest: remove unnecessary try/except from Sprayer test 2023-05-30 12:34:33 +10:00
Peter Barker
d4dabeb6fc autotest: add tests against bad vel/accels in copter guided 2023-05-25 09:42:28 +10:00
Peter Barker
f722be9758 autotest: add test for RPLidarA1 2023-05-16 10:15:23 +10:00
Peter Barker
76cf605e11 autotest: add test for RPLidar driver 2023-05-16 10:15:23 +10:00
Michael du Breuil
29556ade25 Tools: Support MAX_RPM autotest 2023-05-02 10:23:55 +10:00
Peter Barker
5cc046b9cc Tools: AP_Arming ensures mission items present when in auto mode
Co-authored-by: Henry Wurzburg <hwurzburg@yahoo.com>
2023-04-14 07:49:54 +10:00
Randy Mackay
322ef64aad Tools: ScriptMountPOI test uses applet directory 2023-04-13 07:04:22 +10:00
Andrew Tridgell
402de293d6 Tools: text messages and more defines 2023-04-11 10:31:31 +10:00
Peter Barker
f12777f369 autotest: add test for GuidedYawRate being indpendent of set-rate rate
A bug is being fixed where we couldn't achieve the maximum rate due to the input speed of the guided command.

This makes sure the rate achieved is independent of the rate at which the attitude rate is being set
2023-03-21 08:23:12 +09:00
Andy Piper
7dc6dee5a0 autotest: test Yaw D autotune 2023-03-14 11:01:31 +11:00
Peter Barker
e967fad32a autotest: augment IE24 test with fuel-remaining test 2023-03-11 11:50:20 +11:00
CharlieBurge
62119d5bbe Copter: remove check on pause state 2023-03-09 18:13:38 +00:00
CharlieBurge
224e7c578f Copter: pause/resume reporting test 2023-03-09 18:13:38 +00:00
Peter Barker
7fe547cfce Tools: add support for MAV_CMD_DO_SET_ROI_NONE 2023-03-07 08:06:01 +09:00
Randy Mackay
f997b09358 Tools: autotest correction for sf45b 2023-03-01 18:22:22 +11:00
Andrew Tridgell
a24763a2ba autotest: added a test for landing a copter with significant AHRS trim
this fails with EKF3
2023-02-28 17:16:39 +11:00
Pierre Kancir
8628fd998f Tools: Copter: add test for FS_GCS_TIMEOUT 2023-02-24 09:41:17 -08:00
Pierre Kancir
0b7ef942b4 Tools: move setGCSfailsafe in common 2023-02-24 09:41:17 -08:00
Peter Barker
df06e85450 autotest: fix arming checks test
waity for accels/gyros to settle
2023-02-24 09:21:42 +11:00
Peter Barker
e494c40b61 autotest: correct fettec test
need to wait for accels/gyros to be healthy
2023-02-24 09:21:42 +11:00
Peter Barker
2475ee0239 autotest: add test for gyro consistency check 2023-02-24 09:21:42 +11:00
Peter Barker
421c382bcc autotest: add test for accel consistency check 2023-02-24 09:21:42 +11:00
Peter Barker
357a39adba autotest: add test for flying mission twice back-to-back 2023-02-22 08:57:59 +11:00
Peter Barker
19ccf08412 autotest: add test for mount-poi.lua 2023-02-17 10:04:49 +11:00
Andy Piper
af9aed1017 autotest: correct FFT gyro averaging tests 2023-01-24 10:56:33 +11:00
Peter Barker
773d7cb65c autotest: disable simulated esc telemetry for FETtecESC tests 2023-01-18 18:07:23 +11:00
Andy Piper
d1b272fab7 autotest: anti-gravity test using THR_G_BOOST boost 2023-01-11 18:59:52 +11:00
rishabsingh3003
1c49373088 Tools: Add autotest for checking terrain db pre arm for copter auto mission 2023-01-10 13:22:44 +11:00
Peter Barker
d9564d973d autotest: fix un-set variable problem in verify_innov 2023-01-06 11:11:22 +11:00
Andy Piper
60dcb0423a autotest: add basic FFT post-filter test
record gyro data in FFT postfilter test
check post-filter gyro logging and change notch settings for post-filter FFT
add motor noise test
FFT SNR now has sensible default for post-filter
2022-12-28 18:14:56 +11:00
Peter Barker
a71911c19f autotest: ensure vehicle is armed before issuing takeoff command
sending the arm command isn't sufficient if there are other arming problems.

Caught a test failing when throttle was found to be high - I think the rc(3, 1700) was managing to have effect before we processed the arm command because of the way the input queues to ArduPilot SITL work
2022-12-27 11:32:19 +11:00
Peter Barker
89ecd8fb17 autotest: create a context-per-check whentesting motors blocked
without this all subsequent tests will find the string in the context's collection of statustexts.  So use a context-per-mode
2022-12-27 11:32:19 +11:00
Peter Barker
f44a50bdd8 autotest: use epsilon when testing for zero variance in EK3_RNG_USE_HGT 2022-12-22 21:12:39 +11:00
Gone4Dirt
01481b2ec4 Autotest: Add copter weathervane tests 2022-12-14 16:08:20 -05:00
Andy Piper
5358b4d8de autotest: add up and down components to baro compensation test 2022-12-14 19:19:58 +11:00
Peter Barker
021cb75d5b Tools: autotest: use forced reboot argument 2022-12-06 11:20:08 +11:00
Peter Barker
65e8f153a3 autotest: add a test for EK3_RNG_USE_HGT 2022-11-23 18:40:58 +11:00
Peter Barker
1cfe409189 autotest: tighten tolerances on beacon test
7m is actually pretty much all of the required movement for this fence test!
2022-11-15 18:45:42 +11:00
Peter Barker
d0ce2ca8f2 autotest: use implicit context for AutoTuneSwitch
the wrapper adds nothing
2022-11-15 16:45:00 +11:00
Peter Barker
bac96363f4 autotest: add basic tests for Copter sprayer 2022-11-15 08:45:42 +09:00
Peter Barker
cafce7671d autotest: slow down specific tests so they pass 2022-10-22 15:14:55 +11:00
Peter Barker
02a6f71df4 autotest: change Copter default speedup time to 100 2022-10-22 15:14:55 +11:00
Peter Barker
117c5df6ca autotest: ensure optical flow mavlink status roughly correct 2022-10-19 21:00:48 +11:00
Peter Barker
49b991b92d autotest: use new altitude_source keyword in EKF/GPS test 2022-10-01 08:27:37 +10:00
Andrew Tridgell
0210d7c60c autotest: added a test for EKF lane change in GUIDED
an EKF lane change when the two lanes are using different GPS should
not cause a height change in GUIDED
2022-09-30 07:44:42 +10:00
Peter Barker
0c5f972ddb autotest: add ability to watch-and-maintain from SIM_STATE.alt 2022-09-29 20:00:01 +10:00
Peter Barker
bd364b6169 autotest: specify baudrate for NMEA GPS for testing 2022-09-28 20:53:34 +10:00
m
635df2ca45 autotest: check local home location 2022-09-21 15:58:25 +10:00
Peter Barker
d3f6d9eaa3 autotest: make proximity sensor test more reliable 2022-09-21 11:58:38 +10:00
Iampete1
ef9f5a9552 Tools: autotest: update copter param validation check 2022-09-19 20:57:51 -04:00
murata
9c52930d87 autotest: Add test "RC not found" 2022-09-15 17:59:37 +10:00
m
61bb575422 autotest: Fix watch_altitude_maintained for Copter 2022-09-13 07:43:15 +10:00
Peter Barker
b1909d9edf autotest: create and use a Result object to ship failure data around 2022-09-12 08:49:04 +10:00
Peter Barker
ba6cf1a42b autotest: remove disabled LogUpload test
This has been unused for a long time, and is getting in the way of reforms.  Its position as a test rather than as a part of a framework was always going to cause oddities, particularly after we split the Copter tests into several chunks.
2022-09-11 20:45:13 +10:00
m
3fdcf5f940 autotest: test landed state of copter during takeoff in auto mode 2022-09-10 21:53:23 +10:00
Peter Barker
80c36ecc97 autotest: use reflection to collect test details
We had a pattern emerging of using the test name as the method name to contain the actual test.  We also tended to duplicate the docstrings in the test description - or omit the docstring.

This uses reflection to retrieve both the test name and the description, meaning less duplication of this information and enforcing having docstrings on the test methods.
2022-09-10 18:27:27 +10:00
Peter Barker
4caaf1533f autotest: check context for expected esc-rpm statustext 2022-09-10 09:21:44 +10:00
Peter Barker
1a46a27bb8 Tools: remove vestiges of travis autotest hooks
travis had a split into two tests, test1 and test2 - which we no longer need
2022-09-09 12:08:59 +10:00
Peter Barker
e9bffe2045 autotest: throw exception when GIMBAL_DEVICE_ATTITUDE_STATUS not received 2022-09-08 21:13:15 +10:00
Andy Piper
203f691df4 autotest: add takeoff check test 2022-09-07 17:03:03 +01:00
Randy Mackay
4108e4b77f Tools: copter autotest integrates MNT param changes 2022-09-06 13:53:25 +09:00
Peter Barker
045115de05 autotest: explicltly close filehandle with streamrate contents
Test sporadically failing on autotest server.
2022-09-03 11:28:10 +10:00
esaldiran
9218cf18ce autotest: add test for custom controller 2022-08-30 13:10:09 +10:00
Peter Barker
1f430daef6 autotest: correct system ID used when setting ROI_SYSID 2022-08-26 14:38:12 +10:00
Randy Mackay
c898261698 Tools: autotest uses PRX1 parameters 2022-08-24 18:26:27 +10:00
Peter Barker
217338955d autotest: wait for logging to be good in replay GPS test
I think it's possible for the reboot to be coplete but the log not yet open as it's done in the update call
2022-08-24 13:11:46 +10:00
Peter Barker
668ec44968 autotest: let heading settle before testing WP_YAW_BEHAVIOR=0
2022-08-19T02:22:48.3161982Z AT-0229.9: Exception caught: Unexpected heading=94.000000 want=91.000000
2022-08-19T02:22:48.3162341Z Traceback (most recent call last):
2022-08-19T02:22:48.3162738Z   File "/__w/ardupilot/ardupilot/Tools/autotest/common.py", line 7173, in run_one_test_attempt
2022-08-19T02:22:48.3163101Z     test_function()
2022-08-19T02:22:48.3163507Z   File "/__w/ardupilot/ardupilot/Tools/autotest/arducopter.py", line 4414, in GuidedSubModeChange
2022-08-19T02:22:48.3164012Z     self.assert_heading(orig_heading)
2022-08-19T02:22:48.3164419Z   File "/__w/ardupilot/ardupilot/Tools/autotest/common.py", line 5610, in assert_heading
2022-08-19T02:22:48.3164866Z     raise NotAchievedException("Unexpected heading=%f want=%f" %
2022-08-19T02:22:48.3165290Z common.NotAchievedException: Unexpected heading=94.000000 want=91.000000
2022-08-19 17:06:45 +10:00
Peter Barker
00d3af6fc5 autotest: handle terrain requests internally to autotest
We will cache all required SRTM data within the autotest branch
2022-08-16 11:12:44 +10:00
Randy Mackay
9b357a5cd2 Tools: copter autotest uses gimbal-device-attitude-status
add set_mount_mode to reduce duplication
remove reliance on GIMBAL_REPORT
slightly loosen accuracy of mount pitch test
2022-08-15 20:29:25 -04:00
Randy Mackay
7d901491a3 Tools: remove link to resolved issue 2022-08-15 20:29:25 -04:00
Peter Barker
5eb2f6780e autotest: tidy angle test 2022-08-12 19:55:32 +10:00
Peter Barker
ffc0d8b229 autotest: add test that we need RC input by default to arm for Copter 2022-08-11 20:01:45 -04:00
Peter Barker
445ee86734 autotest: tidy resetting of parameters after battery failsafe test 2022-08-11 13:32:24 +10:00
Peter Barker
5ee8f99e7b autotest: adjust for terrain arming requirements
Lots of tests really did need terrain stuff but weren't able to get it
2022-08-09 14:31:14 +10:00
Henry Wurzburg
cea1e29f4e Tools: add TeraRange Neo Rangefinder 2022-08-09 09:01:34 +10:00
Peter Barker
e92d4c6fc5 autotest: add test for WP_YAW_BEHAVIOUR 0
With behaviour 0 anbd typemask specifying ignore yaw/yaw_cds the yaw should reamin fixed
2022-08-08 21:33:03 +10:00
Peter Barker
7284fbc978 autotest: allow more time for angle test to retrieve correct angle
Faster speedups mean we can simply not run this loop often enough to see the change
2022-08-04 16:49:28 +10:00
Iampete1
f1c4797ef4 Tools: autotest: copter: rangefinder mavlink enable landing gear 2022-08-02 10:48:19 +10:00
Peter Barker
1c78baac72 autotest: fix Copter PrecisionLoiterCompanion 2022-07-28 21:06:18 +10:00
Peter Barker
35d60d8025 autotest: augment PayLoadPlaceMission test to check drop distance 2022-07-28 21:06:18 +10:00
Peter Barker
f67877655b autotest: tidy payload place test 2022-07-28 21:06:18 +10:00
Andy Piper
022ae00199 autotest: att attempts to DataFlashErase test 2022-07-28 08:55:01 +10:00
bugobliterator
2375564bb2 autotest: add test for CAN node health pre arm check 2022-07-27 18:18:03 +10:00
Peter Barker
515b79a6ca autotest: remove un-needed calls to drain_mav_unparsed
these calls are generally bad now, given we have context_collect things going on which always want to see messages coming in
2022-07-20 15:17:25 +10:00
Peter Barker
acd9fb9c0a autotest: pause/unpause SITL while draining mav
If Python can't keep up with the message volume coming from the autopilot we never manage to drain all messages from the vehicle.

So try pausing/unpausing the simulation so we can drain the link...

AT-1968.6: AP: PreArm: Radio failsafe on
AT-1969.9: AP: PreArm: Radio failsafe on
AT-1971.2: AP: PreArm: Radio failsafe on
AT-1972.4: AP: PreArm: Radio failsafe on
AT-1973.7: AP: PreArm: Radio failsafe on
AT-1974.9: AP: PreArm: Radio failsafe on
AT-1975.3: Drained 2000283 messages from mav (7218.974791/s)
AT-1975.3: Exception caught: Traceback (most recent call last):
  File "/mnt/volume_nyc3_01/autotest/APM/APM/Tools/autotest/common.py", line 699
8, in run_one_test_attempt
    self.context_pop()
  File "/mnt/volume_nyc3_01/autotest/APM/APM/Tools/autotest/common.py", line 499
3, in context_pop
    self.set_parameters(dead_parameters_dict, add_to_context=False)
2022-07-19 11:00:27 +10:00
Peter Barker
0677965524 autotest: adjust PAUSE_CONTINUE_GUIDED to use globalframe for navigation
Co-author: Leonard Hall <leonardthall@gmail.com>

This test was failing when the yaw control on the simulated vehicle was cleaned up.  Navigating in body frame meant that the vehicle was told to go to a different position than we were actually expecting.
2022-07-19 09:24:45 +10:00
Leonard Hall
0405451463 SITL: Fix BaroWindCorrection Test 2022-07-15 09:59:44 +09:00
Peter Barker
bceaa10794 autotest: add a test for rally point altitudes 2022-07-14 11:49:53 +10:00
Peter Barker
72734d38de autotest: add test for AUTO_LAND_TO_BRAKE
Having some terrain-based issues with BRAKE mode
2022-07-10 20:59:52 +10:00
Andy Piper
8799b3839a autotest: add triple notch test. 2022-07-03 18:21:41 +10:00
Andy Piper
f2aa6e99c3 autotest: test pre and post filter logging in FFT test 2022-07-03 18:19:55 +10:00
Randy Mackay
1a5216aaee Tools: autotest for mount sets MNT_RC_RATE 2022-06-21 13:37:11 +09:00
Peter Barker
6fcdea67c3 autotest: tidy hover_and_check_matched_frequency method
- remove pointless elses
 - clarify why a test is failing in exception messages
 - move variable definitions closer to their use
2022-06-15 19:07:34 +10:00
Peter Barker
abc1b7b644 autotest: factor out extract_median_FTN1_PkAvg_from_current_onboard_log 2022-06-13 21:21:30 +10:00
Peter Barker
d6dc0464dd autotest: tidy extraction of FTN1 data from dflogs in fft tests 2022-06-13 21:21:30 +10:00
Peter Barker
1a9470d635 autotest: return hover throttle from hover_for_interval 2022-06-13 21:21:30 +10:00
Peter Barker
ef29350a72 autotest: tidy hovering in fft tests 2022-06-13 12:01:13 +10:00
Andrew Tridgell
8441f4a130 autotest: fixed FETTec bad mask test
can support up to 15 outputs with FETTec now
2022-06-10 13:46:43 +10:00
Pierre Kancir
4e2e4fa4d4 Tools: autotest: remove useless shebang 2022-06-08 08:16:42 +09:00
Andy Piper
f244866329 autotest: add test for FFT continuous averaging 2022-06-01 15:49:32 +01:00
Peter Barker
4240ad7ae9 autotest: update test for which entry is last in tasks table 2022-05-18 12:25:26 +09:00
Peter Barker
336079ddfa autotest: add test for compass error state logging 2022-05-10 19:46:40 +10:00
Andy Piper
0fa0a27c77 autotest: add FFT averaging test.
add harmonic test for FFT averaging
reduce configuration for averaged FFT test
enable harmonic notch in-flight
2022-05-04 17:05:51 +10:00
Peter Barker
b2d811a444 autotest: add test for sensor health logging 2022-05-03 17:38:09 +10:00
Andy Piper
67aecea4c1 autotest: remove fast_loop tasks test 2022-05-03 08:20:13 +09:00
Peter Barker
ecd5cb21fc autotest: tidy richenpower test using new methods 2022-04-18 12:41:45 +10:00
Andrew Tridgell
db9d796dd4 Tools: update for changed INS_NOTCH parameter name 2022-04-16 08:14:06 +10:00
Peter Barker
c33f6f3a8d autotest: add tests to ensure we get BCN, RPM and PRX/PRXR log msgs 2022-04-13 16:22:19 +10:00
Peter Barker
2fb1bde457 autotest: add test for earth-frame-accel 2022-04-03 11:41:09 +10:00
Peter Barker
7a62b5429b autotest: add test for landing speed 2022-03-23 21:07:05 +11:00
Andrew Tridgell
a98e913a2a autotest: flake8 warning fixes 2022-03-09 17:13:45 +11:00
m
37abfb98dc autotest: Copter Pause/Continue in AUTO and GUIDED modes with SCurves 2022-03-08 13:12:36 +09:00
Peter Barker
f199f8be10 autotest: add more parachute tests 2022-02-24 09:20:31 +11:00
Peter Barker
17915faa98 autotest: add test for proximity sensors 2022-02-17 09:23:29 +11:00
Peter Barker
376d7ade50 autotest: use assert_receive_message to remove redundant code 2022-02-15 11:06:10 +11:00
Peter Barker
0cd5bdebfb autotest: reduce Copter speed requirement in DO_CHANGE_SPEED 2022-02-15 08:29:10 +09:00
Peter Barker
dc312260de autotest: add test for DO_CHANGE_SPEED 2022-02-14 14:07:47 +11:00
Randy Mackay
10f4500584 Tools: remove SPORT from autotests 2022-02-11 16:11:39 +09:00
Andy Piper
46ae9d2c34 autotest: TasksV1 -> TasksV2 2022-02-09 12:47:55 +00:00
Tatsuya Yamaguchi
08438c30a6 Tools: autotest for takeoff altitude 2022-02-03 21:33:05 +11:00