Commit Graph

2214 Commits

Author SHA1 Message Date
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 025cf8f72b autotest: cleanup load_local_module 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 403275beea autotest: added RBOH message 2020-11-10 16:15:45 +11:00
Andrew Tridgell 4a06641048 autotest: added RWOH message 2020-11-10 16:15:45 +11:00
Andrew Tridgell 7f0113b82d autotest: added REPH and REVH 2020-11-10 16:15:45 +11:00
Andrew Tridgell ef5baaf482 autotest: added ROFH msg 2020-11-10 16:15:45 +11:00
Andrew Tridgell 8ba067608b autotest: cope with LogStructure.h in multiple places
and allow for no docs in replay msgs
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
Andrew Tridgell 161f2a8d2f autotest: improved error msg for missing doc fields
Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
2020-11-10 16:15:45 +11:00
bugobliterator c1dc6465cf Tools: add CANGPSCopterMission mission file 2020-11-04 19:59:40 +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 16bede2d74 Tools: allow for -f Callisto as frame type
loads json and params
2020-10-28 14:20:44 +11:00
Andrew Tridgell 31e3fd0771 Tools: added battery capacity to Callisto model 2020-10-28 14:20:44 +11:00
Andrew Tridgell 1286c5f64e Tools: adjust quadplane tuning and QAssist test
fixed roll RTL and land in QAssist test
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 7820b402d6 Tools: tweak Qassist test to be more reliable
disabling stall prevention should help with travis
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 eacebb619a Tools: lower ALT_HOLD_RTL for quadplanes
this speeds up a number of tests that end with an RTL
2020-10-28 14:20:44 +11:00
Andrew Tridgell 1ea0daa95f Tools: adjust quadplane tuning
prevent oscillation
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 d221756e2d Tools: fixed copter MOT params 2020-10-28 14:20:44 +11:00
Andrew Tridgell c7a60f57ad Tools: improved quadplane tuning
and shorten GyroFFT log msgs so values can be seen in log
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 4e553bcbde Tools: fixed Qassist test
it was using the wrong roll angle for recovery, and relied on poor
tuning of old model to overshoot by 20 degrees
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
Andrew Tridgell 10a07bf4f9 Tools: added Callisto model from Leonard 2020-10-28 14:20:44 +11:00
Peter Barker 18330d16de autotest: add test for MAVlite 2020-10-27 10:17:53 +11:00
Pierre Kancir 87d9beab4f Autotest: firmware page: fix html 2020-10-24 10:30:09 +11:00
Pierre Kancir 45a35f9470 Autotest: fix html and use class on CSS 2020-10-24 10:30:09 +11:00
Pierre Kancir 60805fdfa3 Autotest: anonimize IP on ga on autotest page 2020-10-24 10:30:09 +11:00
Pierre Kancir 05d365f1a6 Autotest: remove jdrone logo from firmware server 2020-10-24 10:30:09 +11:00
Pierre Kancir 4ca8f6bf1e Autotest: fix githash on python 3 for firmware html page 2020-10-24 10:30:09 +11:00
Pierre Kancir de927691f2 Tools: remove empty fields in autotest.ardupilot.org 2020-10-24 10:30:09 +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
Patrick José Pereira cbc3384187 default_params: Sub: Add camera mount parameters
Allow the usage of MOUNT_CONTROL in SITL

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-10-19 16:25:38 -04:00
Peter Barker 937d7bf335 autotest: add quiet option to drain_mav 2020-10-15 16:31:41 +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
Pierre Kancir dc8d42b12d Tools: expose option --sysid into sim_vehicle.py 2020-10-13 10:31:21 +11:00
Peter Barker 8f1e9ebc7f autotest: reset camera feedback rate if exception is raised 2020-10-12 13:48:15 +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 d13f6acc66 autotest: quieten mav draining 2020-10-08 17:21:35 +09:00
Pierre Kancir 774c8583b1 Tools: make apm.pdef.xml more readable. 2020-10-07 19:38:14 +11:00
Peter Barker 1d0735f206 autotest: add a poll_message method 2020-10-07 11:54:02 +11:00
Peter Barker 04633d7e1c autotest: if MODE_AUTO is disabled then we also need to disabled AFS 2020-10-06 11:25:09 +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
Peter Barker 536e2db947 Tools: sim_vehicle.py: add --disable-breakpoints commandline option 2020-09-23 20:28:08 +10: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 669622c614 autotest: improve use of SITL-is-running
ATM if the SITL binary dies we don't catch it anywhere.  This might
become part of the solution for that, as well as some changes on
run_one_test.
2020-09-22 21:11:57 +10:00
Peter Barker fdb31a6419 autotest: param_parse.py: validate @User field to be Standard or Avanced 2020-09-22 14:56:04 +10:00
Peter Barker 1075e13352 autotest: stop set_parameter from using get_parameter
Setting a parameter on ArduPilot causes the autopilot to emit the new
value in a PARAM_VALUE message, so we do not need to fetch it ourselves.

Fetching it ourselves causes subtle problems for the autotest suite
where a PARAM_VALUE is currently in the uart buffer - so the autotest
set_parameter has consumed one PARAM_VALUE message (the auto-emitted
one).  If it immediately does a set_parameter then the next
PARAM_VALUE it sees will be the OLD value as the value comes out of the
uart.
2020-09-15 19:27:36 +10:00
Peter Barker 9e148f245b autotest: param_parse.py: correct parsing of Values fields
the regex used to parse the values field later is rather strict - no
spaces allowed around the : for example.

Canonicalise the string before trying to do anything more with it
(including validation)
2020-09-15 11:09:52 +10:00
Andrew Tridgell 8b95fac214 Tools: added --Werror option to autotest.py 2020-09-15 09:40:03 +10:00
Peter Barker 3e882fcad8 autotest: loosen mag-percent-complete threshold to 95%
So 98% wasn't loose enough...
2020-09-11 15:31:45 +10:00
Harshit Kumar Sankhla f0c237d88e autotest: bug fixes for ekf lane switch test 2020-09-11 10:16:20 +10:00
Peter Barker 796cc72344 autotest: remove parameters with default values from copter.parm
Setting these just takes time we don't need to spend
2020-09-11 08:02:38 +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 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 0f5f040380 autotest: send all progress messages to autopilot
These will be logged into dataflash and into the telemetry log
2020-09-09 23:47:28 +10:00
bugobliterator d997ca8779 autotest: pass calibration test even if 98% complete before success 2020-09-09 23:46:23 +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
Andrew Tridgell 7c5a0a6a43 Tools: disable LOG_REPLAY by default in autotest
LOG_REPLAY prevents us logging when we have sensor failures, which
makes many tests hard to debug
2020-09-08 11:01:14 +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
Samuel Tabor 3c0d4b6d5a autotest: Add start time argument and parsing. 2020-09-07 21:20:25 +10:00
Andrew Tridgell a9ecac4fff Tools: added --osdmsp option to sim_vehicle.py 2020-09-07 11:59:20 +10:00
Peter Barker 65268ee3d4 autotest: more button-test fixes 2020-09-06 16:49:16 +10:00
bugobliterator 6203e0685e autotest: disable MAG orientation test 2020-09-06 11:21:28 +10:00
Andy Piper 0b9d9fc284 autotest: use StringIO correctly 2020-09-06 09:12:59 +10:00
Andy Piper 6ebc7622fe autotest: comprehensive dataflash test 2020-09-05 10:20:39 +10:00
Peter Barker 2ea41b7997 autotest: spit out actual simulated mag orientations as part of debug 2020-09-03 13:08:07 +10:00
Peter Barker 5a8b1639d0 autotest: fix nmea output test 2020-09-02 10:05:26 +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
Peter Barker 23ba2002e8 autotest: dump final mag cal report verbosely 2020-09-01 14:11:57 +10:00
Peter Barker 74c47827d9 autotest: drain stdout of SITL binary
The new rate messages were filling up the stdout buffer, causing the
process to block....
2020-08-30 08:38:35 +10:00
Peter Barker e8fa4e1351 autotest: disable autotest for altitude prearm check 2020-08-30 08:38:35 +10:00
Peter Barker 397e134106 autotest: quieten RTL 2020-08-30 08:38:35 +10:00
Peter Barker 065d03dd30 autotest: add a timeout in the button test 2020-08-30 08:38:35 +10:00
Peter Barker c01b26ca62 autotest: fix race condition in EKF type 10
EKF type 10 is always able to give you a position - but the arming
checks require you to have a good GPS position, and that's something
else again.
2020-08-30 08:38:35 +10:00
Peter Barker cafc5b01f4 autotest: fix race condition in Rover RTL test 2020-08-30 08:38:35 +10:00
Peter Barker 43cdceba8f autotest: tweak wait_ready_to_arm 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
Peter Barker ba91cbb270 autotest: correct sub parameter name PSC_VELZ_P, fix test to match 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 936511a720 Autotest: common: correct some text format 2020-08-29 10:44:19 +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
Harshit Kumar Sankhla 464c90a03c Tools: add an EKF3 lane switching test to plane 2020-08-27 20:20:51 +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 80bee19bc9 autotest: correct race condition in button test
A BUTTON_CHANGE may have been emitted after we send the parameter but before it is processed by the autopilot
2020-08-26 13:22:14 +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
Pierre Kancir 420587fb68 Tools: logger_metadata fix relative dir search 2020-08-25 20:01:27 +10:00
Pierre Kancir a181fcf8a2 Autotest: common: put generated parameter and LogMessage files into buildlogs directory 2020-08-25 20:01:27 +10:00
Peter Barker a523868b33 autotest: fix Beacon test 2020-08-25 17:21:50 +10:00
Andrew Tridgell 155b39bab3 autotest: added loiter-to-alt test mission 2020-08-25 10:39:18 +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
Peter Barker bb697dd4b9 autotest: avoid using mavproxy for testing message intervals 2020-08-24 19:33:37 +10:00
Peter Barker a190490b64 autotest: do not rely on MAVProxy for sending banner request 2020-08-24 15:26:57 +10:00
Peter Barker 00bfe04539 autotest: remove duplicate recovery code from set-message-interval test 2020-08-24 14:00:38 +10:00
Peter Barker 03d0eda7f1 autotest: use a passthrough progress function for Telem objects 2020-08-24 13:24:41 +10:00
Peter Barker 67b71e2b94 autotest: add test for Plane dead-reckoning support 2020-08-21 18:16:40 +10:00
Pierre Kancir 8b92af732a Autotest: common: add wait_heartbeat to change_mode to clean up msg and give time to status to update 2020-08-21 13:35:51 +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 cddb5fb1cc autotest: use message hook when waiting for statustext
Eliminates a race condition when waiting for statustexts.  Getting the
current sim time slurps messages.
2020-08-21 12:26:12 +10:00
Pierre Kancir b7f46462f8 Autotest: common: reduce timeout on ArmFeature test
This is unnessary to wait for 60s for failure, 15s is enough
2020-08-21 09:13:32 +10:00
Peter Barker f14c9db568 autotest: improve debug around heli poshold takeoff test 2020-08-20 10:10:34 +10:00
bugobliterator c02c500ac5 param_metadata: add microseconds under known param type 2020-08-19 17:31:09 +10:00
Peter Barker a5aa963a77 autotest: fixes --tracker and --tracker-location sim_vehicle.py options 2020-08-18 15:26:03 +10:00
Mark Whitehorn a37b5c2c6b autotest: add rudder disarm checks for airmode 2020-08-18 11:42:34 +10:00
Pierre Kancir 0c3e9bbd4b Autotest: fix mavlink_time_boot format: should be int 2020-08-18 08:33:08 +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
Peter Barker c69908e7ea autotest: add proximity sensor readinds as if from depth camera 2020-08-17 11:20:12 +10:00
Peter Barker ea5aa594a3 autotest: add test for AP_Proximity_MAV 2020-08-17 11:20:12 +10:00
Peter Barker 82dd7ece6c autotest: fix frsky bitop on float issue
Crops up in Python 3.8:

    gpi_lat = self.tf_encode_gps_latitude(gpi.lat)
  File "/home/pbarker/rc/ardupilot/Tools/autotest/common.py", line 6183, in tf_encode_gps_latitude
    value = ((abs(lat)/100)*6) | 0x40000000
TypeError: unsupported operand type(s) for |: 'float' and 'int'
2020-08-15 10:42:47 +10:00
Pierre Kancir 52ae087fb5 Autotest: rover: remove some raw mavproxy cmd for rc 2020-08-15 09:16:24 +10:00
Pierre Kancir 388fef23d9 Autotest: common: remove use of some raw mavproxy cmd for rc 2020-08-15 09:16:24 +10:00
Pierre Kancir 30fa433faa Tools: don't add duplicate param to context 2020-08-14 18:16:47 +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
Mark Whitehorn d0ff26e782 autotest: expand quadplane AirMode autotest 2020-08-13 08:47:27 +10:00
Mark Whitehorn b9830f657a autotest: add quadplane airmode test 2020-08-13 08:47:27 +10:00
Peter Barker 9cd5fdacfc Tools: autotest: add a test for motor test 2020-08-10 09:18:05 +10:00
Peter Barker f0482935cc autotest: slow down simulation to avoid receiving re-request of item
# avoid a timeout race condition where ArduPilot re-requests a
        # fence point before we receive and respond to the first one.
        # Since ArduPilot has a 1s timeout on re-requesting, This only
        # requires a round-trip delay of 1/speedup seconds to trigger
        # - and that has been seen in practise on Travis

AT-0417.0: Sending item with seq=0
AT-0417.2: Got (MISSION_REQUEST {target_system : 243, target_component : 250, seq : 0, mission_type : 1})
AT-0417.2: Got (MISSION_REQUEST {target_system : 243, target_component : 250, seq : 0, mission_type : 1})
AT-0417.2: Exception caught: Traceback (most recent call last):
  File "/home/travis/build/ArduPilot/ardupilot/Tools/autotest/common.py", line 3950, in run_one_test
    test_function()
  File "/home/travis/build/ArduPilot/ardupilot/Tools/autotest/rover.py", line 4216, in test_poly_fence
    self.test_fence_upload_timeouts()
  File "/home/travis/build/ArduPilot/ardupilot/Tools/autotest/rover.py", line 4057, in test_fence_upload_timeouts
    target_component=target_component)
  File "/home/travis/build/ArduPilot/ardupilot/Tools/autotest/rover.py", line 4010, in test_fence_upload_timeouts_2
    self.expect_request_for_item(item)
  File "/home/travis/build/ArduPilot/ardupilot/Tools/autotest/rover.py", line 3958, in expect_request_for_item
    raise NotAchievedException("Expected request for seq=%u" % item.seq)
NotAchievedException: Expected request for seq=1

The "AT" timestamps there are wallclock time.  Since speedup for Rover
is 8 by default, that could be as much as 1.6 seconds meaning a
re-request from ArduPilot would be legitimate.

I've added some debug, too - we now emit "Sending item with seq=1"
between those two "Got" lines.  That should make the problem clearer -
we've received a re-request rather than a request for the item after the
one we've already sent.
2020-08-09 20:13:27 +10:00
Peter Barker 749b678e14 autotest: add scan-build autotest steps 2020-08-07 16:00:18 +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
Pierre Kancir 1fa6138ca1 Tools: Autotest.py: Allow autotest subtests completion 2020-08-06 20:55:13 +10:00
Pierre Kancir 4930142b6e Tools: add generator for MP parameter xml 2020-08-05 22:32:33 +10:00