Commit Graph

664 Commits

Author SHA1 Message Date
Leonard Hall
41c437b768 AutoTest: Copter: fly_poshold_takeoff increase acceptable range 2021-05-24 20:13:37 +10:00
Peter Barker
c7a9fb3c9c autotest: retry dynamic notches 8 times before failing
This test is flapping.

This is a poor - but serviceable - workaround.
2021-05-18 11:13:10 +10:00
Andy Piper
2df7b5453e autotest: add test for ESC telemetry driven notches. 2021-05-12 17:01:11 +10:00
Peter Barker
d2f78c69be autotest: add a simple test for SMART_RTL 2021-05-12 13:01:50 +10:00
Peter Barker
7ab094f3a1 autotest: tidy fly_guided_move_local 2021-05-12 13:01:50 +10:00
Peter Barker
1d6efbd56f autotest: fix loiter_to_ne
Co-Authored-By: leonardthall@gmail.com
2021-05-11 14:51:28 +10:00
Peter Barker
04aed49572 autotest: adjust GyroFFT threshold to make it pass
From Andy:

Can you make this 0. The test should then pass. I'm not terribly happy about it but its better than disabling the test and I can't tell whether there is actually a problem or not.
2021-05-07 18:30:08 +10:00
Peter Barker
0a235ce094 autotest: remove retry loop from within GyroFFT
This effectively removes an infinite loop from the GyroFFT test.
2021-05-07 18:30:08 +10:00
Peter Barker
b04dfda9fb autotest: enable deca and dodeca frames in FlyEachFrame test 2021-05-06 16:26:28 +10:00
Peter Barker
57abaf0dec autotest: remove retry loop from within GyroFFTHarmonic 2021-05-01 21:30:28 +10:00
Peter Barker
4928ec18af autotest: remove retry loop from within fly_dynamic_notches
We retried externally to the test - may as well do so within
2021-05-01 21:30:28 +10:00
Peter Barker
2cd0099bbc autotest: exclude decarotor from fly-each-frame-test 2021-05-01 13:25:13 +10:00
Peter Barker
76678ffaf3 autotest: fix octa-cwx in SITL 2021-05-01 13:25:13 +10:00
Peter Barker
5172e767df autotest: fix octa-dji in SITL 2021-05-01 13:25:13 +10:00
Peter Barker
63ba484087 autotest: add test which flies each frame we can 2021-05-01 13:25:13 +10:00
Peter Barker
e4c405b77b autotest: add a test for Spline missions showing terrain requirement 2021-04-28 18:40:26 +10:00
Peter Barker
30e8160aa1 autotest: sort logs before moving
Makes it easier to find last log in output.

Also removing pointless lamdaing of some functions
2021-04-21 13:16:24 +10:00
Peter Barker
ea4bbcf6ee autotest: add test for copter position reset 2021-04-05 00:02:42 +10:00
Randy Mackay
ab2e429f32 Tools: Copter.fly_square descends more quickly 2021-04-03 12:07:59 +09:00
Randy Mackay
f341429977 Tools: Copter.RTLSpeed gets increased speed tolerance 2021-04-03 12:07:59 +09:00
Randy Mackay
c04f686ce7 Tools: extend copter NavDelay test by 80sec
s-curves slows missions slightly
2021-04-03 12:07:59 +09:00
Peter Barker
f0094bac40 autotest: remove copied-in duplicate of pymavlink rotmat 2021-04-03 13:26:06 +11:00
Peter Barker
d384ba6585 autotest: increase time permitted for Copter to turn east
Sometimes they turn almost 360 which takes a while
2021-04-02 21:29:43 +11:00
Peter Barker
b2f47ba367 autotest: add test for auxilliary functions in missions 2021-03-31 11:36:09 +11:00
Peter Barker
e2a350f12e autotest: reduce race condition in fly_square mission
We end up where we started, so when we start to play the mission back we
might immediately be at the first waypoint.  That's a problem as we may
never see the NAV_CONTROLLER_OUTPUT mention waypoint 1 and thus we
fail the test
2021-03-25 02:13:44 +11:00
Peter Barker
fdbbcaa506 autotest: bump default speedups for several vehicles
These tests seem to run stabley on my box with essentially no speedup
limit
2021-03-24 14:46:48 +11:00
Peter Barker
9f15689850 autotest: wait longer for prearm failure in IE24 autotest
we only emit prearm failures every 30 seconds - we just weren't waiting
long enough here
2021-03-23 20:34:47 +11:00
Peter Barker
073a9e3390 autotest: fix frsky passthrough test
Mainly through polling much faster, but also allowing for statustexts in
different orders from frsky/statustext
2021-03-22 18:08:44 +11:00
Peter Barker
8901efd69d autotest: start and stop MAVProxy for alttype and surface tracking tests
autotest doesn't currently supply terrain tiles, so MAVProxy must be
started
2021-03-19 09:46:45 +11:00
Peter Barker
462ac255a3 autotest: start MAVProxy only as needed for testing 2021-03-19 09:46:45 +11:00
Peter Barker
37efb1cbeb autotest: Copter sim passes default file instead of setting parms
We're now waiting for the vehicle simulation to provide us a heartbeat
for a non-generic frame before considering it good to fly.

Unfortunately, Copter relies on the parameter file to tell it which
frame to use - and we don't apply parameters from parameter files until
after we've checked the heartbeat.

Passing the file into ArduPilot on the commandline means we don't have
this problem.
2021-03-19 09:46:45 +11:00
Peter Barker
120167f799 autotest: fix fly_square mission
waypoint doesn't change until mission is running
2021-03-18 17:02:06 +11:00
Peter Barker
42eec13f5e autotest: adjust CAN test for lack of MAVProxy 2021-03-18 13:50:57 +11:00
Peter Barker
da52e5d08c autotest: set SYSID_MYGCS in tests which need it
This was still relying on heartbeats coming from MAVProxy.  As speedup
increased those heartbeats may not come fast enough - and they really
should be coming from autotest as that's who's doing the commanding.

autotest: set SYSID_MYGCS in AFS test

autotest: set SYSID_MYGCS before setGCSfailsafe
2021-03-17 16:02:45 +11:00
Peter Barker
216140b58d autotest: remove un-needed portion of reset_delay_item
Looks like this function evolved and this appendix remained
2021-03-17 14:17:39 +11:00
Peter Barker
f7d8994ce1 autotest: move assert_mission_count up, use it 2021-03-17 00:23:05 +11:00
Peter Barker
30c9d4bcf4 autotest: remove pointless loiter switch 2021-03-16 23:33:51 +11:00
Peter Barker
0414929310 autotest: fix Heli spline waypoint test
Mission isn't round-tripped so make it non-strict
2021-03-13 09:35:22 +11:00
bugobliterator
5074b6d336 autotest: add test case for GPS ordering
also fix flake8 issues
2021-03-12 16:32:36 +09:00
bugobliterator
48277b43e4 Tools: add autotest for checking GPS ordering 2021-03-12 16:32:36 +09:00
Randy Mackay
78ddd0512c Tools: autotest for copter spelling fix 2021-03-09 11:49:42 +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
269fa5cbe2 AutoTest: Copter remove FENCE_AUTOENABLE tests
Addresses comments made in review, removes the FENCE_AUTOENABLE param for copter.
No param means no tests required.
2021-03-05 14:52:46 +11:00
James O'Shannessy
e16bbe6e18 AutoTest: Ensure fence state is disabled at end of test
This appears to be another case of the fence state carrying over from one test to another. Disabling the fence at the end of the test appears to have fixed this problem
2021-03-05 14:52:46 +11:00
James O'Shannessy
31462418c6 AutoTest: Ensure Copter can RTL and Land even when Fence Floor has not been auto disabled 2021-03-05 14:52:46 +11:00
James O'Shannessy
6251b6eead AutoTest: Rebase and carry across changes from autotest 2021-03-05 14:52:46 +11:00
James O'Shannessy
b2346ef6df AutoTest: Adds additional tests to ArduCopter to test autoenable and floor
Adds tests for:
* Testing auto-enable disabled (when no autoenabling of the fence is required)
* Test auto-enabled always after takeoff (when takeoff complete condition met)
* Test auto-enabled disable floor only (when land sequence begins)
* Test auto- on arm/disarm (when vehicle is armed/disarmed)
* Tests ability to land when fence is breached
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
dd5ede0fe0 autotest: small comment improvements 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
Dr.-Ing. Amilcar do Carmo Lucas
528defd560 Autotest: activate the fence via a mavlink command
This should not be required in the future, please fix this and revert this commit
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
8d8753b14c Autotest: fix two copter tests after parameter rename
I'm not sure if a better fix would be to remove the set_parameter() call
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
Randy Mackay
a35a7e1523 Tools: autotest manual control test requires 12 deg
adjusted down because of lower default angle_max
2021-03-03 08:03:39 +09:00
Peter Barker
cc83562add autotest: tidy fence handling 2021-03-02 16:54:06 +11:00
Peter Barker
fc9a93ba67 autotest: stop using mavproxy for clearing missions 2021-03-02 14:24:36 +11:00
Peter Barker
97e2596bf8 autotest: stop clearing mission at start of test
These are implicitly cleared by the framework
2021-03-02 14:24:36 +11:00
Peter Barker
973510a4ff autotest: push context after customising cmdline
doing things in the other order causes problems when running the
complete suite
2021-03-02 14:24:36 +11:00
Peter Barker
10007e2e42 autotest: load missions natively rather than using MAVProxy 2021-03-02 14:24:36 +11:00
Peter Barker
34a52e9cfe autotest: use wait_statustext in place of mavproxy.expect for autorotate test 2021-03-02 13:34:09 +11:00
Peter Barker
d3b3c443bc autotest: reset copter completely after autotune test 2021-02-25 10:49:58 +11:00
Peter Barker
013415eb31 autotest: make and mark arducopter.py as flake8-compliant 2021-02-24 15:10:10 +11:00
Peter Barker
79f21ed639 autotest: add test for GSF logging 2021-02-23 12:36:33 +11:00
Peter Barker
44ec74030e autotest: recover from flip in althold to remove stabilise throttle problem 2021-02-21 23:11:26 +11:00
Peter Barker
a4a5d52c35 autotest: extend time allowed for RTL for simplemode test 2021-02-21 22:45:06 +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
b5f490aff4 autotest: make fly_proximity_avoidance_test_alt_no_avoid more reliable 2021-02-21 17:44:10 +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
b1ccf3b3f8 autotest: add test for rangefinder-based proximity avoidance enablement 2021-02-18 15:05:51 +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
dbdda65956 autotest: add basic test for GPS blending 2021-02-17 11:30:01 +11:00
Peter Barker
c2e310d75f autotest: add test for OBSTACLE_DISTANCE_3D message 2021-02-04 15:50:45 +11:00
Peter Barker
393ec5d6f7 autotest: add test for MAVProxy proximity sensor 2021-02-04 12:03:35 +11:00
Peter Barker
ad2ab333f9 Tools: autotest: allow autotest to connect directly to SITL 2021-01-24 09:25:45 +11:00
Peter Barker
30836535d0 autotest: retry dynamic notch test up to 3 times 2021-01-22 11:17:42 +11:00
Peter Barker
281296832a autotest: retry GyroFFTHarmonic test on failure 2021-01-21 16:45:34 +11:00
Andrew Tridgell
3e640eed80 autotest: changes for per-IMU biases and scaling 2021-01-21 13:09:21 +11:00
Peter Barker
c7a6047904 autotest: add option to retry tests / create and use Test definition object 2021-01-21 10:23:17 +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
1cb86303b4 Tools: add test for maxbotixi2cxl 2021-01-19 11:20:47 +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
8f9d3909f1 autotest: model_defaults_filepath always returns a list 2021-01-19 10:34:00 +11:00
Peter Barker
2c0e3751a9 autotest: reboot after moving from EKF type 10 to EKF type 2
Bad things happen with home set but origin not
2021-01-18 20:48:11 +11:00
Peter Barker
662e86780b autotest: reduce motor vibration for landing 2021-01-18 20:14:08 +11:00
Peter Barker
2d62fb99b1 autotest: force-disarm copter before reboot in GCS failsafe tests 2021-01-18 14:17:32 +11:00
Randy Mackay
b18e5966f7 Tools: fixes from peer review as AHRS default changed to EKF3 2021-01-16 08:24:23 +09:00
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