Commit Graph

3895 Commits

Author SHA1 Message Date
Nicole Ashley 7eb9bfc54e autotest: Add IBus test to Arducopter test suite 2024-08-07 14:01:44 +10:00
Peter Barker 6c851c4ea3 Tools: rename OFFBOARD_GUIDED to AP_PLANE_OFFBOARD_GUIDED_SLEW_ENABLED
and remove comparison vs ENABLED
2024-08-05 10:20:14 +10:00
Peter Barker 6354a8b912 autotest: add test for forced arm/disarm 2024-08-02 16:29:13 +10:00
Peter Barker 8f8e796e00 autotest: add a disabled test for CRUISE maintaining height when home alt changed 2024-08-01 09:53:41 +10:00
Iampete1 0d30dd1981 Tools: AutoTest: Rover: DriveMission: add a loiter turns waypoint 2024-07-31 20:25:17 +09:00
George Zogopoulos 548b871168 autotest: Added airspeedless takeoff test with stock parameters 2024-07-31 18:23:40 +10:00
Henry Wurzburg 9311344f4b Tools: correct prearm message 2024-07-31 17:01:07 +10:00
Peter Barker 61196b7d04 autotest: add tests for iBus telemetry 2024-07-30 20:00:16 +10:00
Peter Barker 602f5bc61c autotest: correct applet-testing scripts to use contexts for scripts
means we don't leave the script lying around in case of test failure
2024-07-30 11:39:46 +10:00
Thomas Watson c797baa37b autotest: add test for require() after rescheduling
It can end up broken due to incorrect assumptions about the executed
function's upvalues, which might change after rescheduling.
2024-07-30 10:33:56 +10:00
Peter Barker b358c503fb autotest: add test for detection of duplicate AuxSw values 2024-07-30 10:28:42 +10:00
Peter Barker 3c1021d208 Tools: add documentation for SIM_ENGINE_FAIL and SIM_ENGINE_MUL 2024-07-30 09:21:26 +09:00
Peter Barker f2ec97e4c7 autotest: correct Rover RangeFinder test
for reasons I can't fathom, defaulting the rangefinder state causes problems with the vehicle orientation in SITL - probably a state update fix somewhere.

This test was kind of broken anyway - the RangeFinder was pointing latterally out from the vehicle, but is displayed forward of the vehicle (ther RANGEFINDER mavlink message conveys no orientation information)
2024-07-30 08:42:42 +10:00
Peter Barker f60ecbfe4e autotest: disable PolyFenceObjectAvoidanceBendyRuler as it is unreliable ATM 2024-07-29 20:58:39 +10:00
Peter Barker 2245399ff9 autotest: tidy Rover autotests
autotest: tidy WheelEncoders test

autotest: rover: tidy PolyFenceObjectAvoidance code

autotest: add load_fence_using_mavwp

Also corrects the mission item types being returned by the mission-item-to-misison-item-int converter

autotest: fix Rover PolyFenceAvoidanceBendyRulerEasier test

these tests weren't being run becausethey were disabled based on support for loading fence items from QGC files.

autotest: fix Rover PolyFenceAvoidanceBendyRuler test
2024-07-29 20:58:39 +10:00
Peter Barker d7bc9a420f autotest: tracker; tidy GPSForYaw test 2024-07-29 20:58:39 +10:00
George Zogopoulos b5c91a1690 autotest: Converted parameter TKOFF_MODE to TKOFF_OPTIONS 2024-07-29 15:50:32 +10:00
George Zogopoulos 1e6e291b52 autotest: New tests
Autotests for takeoffs have been added for Plane, covering AUTO and
TAKEOFF mode takeoffs.

An auxiliary `set_servo` method has been added to `vehicle_test_suite.py`.
2024-07-29 15:50:32 +10:00
Peter Barker 317c59c709 autotest: tidy various ArduPlane autotests
autotest: tidy Plane TerrainRally test

autotest: tidy Plane TestFlaps test

autotest: tidy Plane ThrottleFailsafe test

autotest: tidy Plane GripperMission test

autotest: tidy Plane FenceStatic test

autotest: tidy Plane FenceRTL tests

autotest: tidy FenceRetRally test

autotest: tidy Plane ahrs2 test

autotest: tidy Plane RangeFinder test

autotest: tidy Plane ADSB test

autotest: tidy Plane LOITER test

autotest: tidy Plane EKFLaneswitch test

autotest: tidy Plane FenceAltCeilFloor test

autotest: tidy Plane FenceMinAltAutoEnable

autotest: tidy Plane FenceMinAltEnableAutoland

autotest: tidy Plane FenceMinAltAutoEnableAbort

autotest: tidy Plane FenceCircleExclusionAutoEnable

autotest: tidy self.homeloc out of MainFlight
2024-07-28 11:53:44 +10:00
Peter Barker f1a1b11830 autotest: tidy Helicopter missions to use new infrastructure
autotest: tidy PosHoldTakeoff heli test

autotest: tidy StabilizeTakeoff heli test

autotest: tidy SplineWaypoint heli test

autotest: tidy ManAutoRotation heli test

autotest: tidy AirspeedDrivers heli test

autotest: tidy PIDNotches heli test
2024-07-27 09:44:41 +10:00
Peter Barker 605a9d34e3 autotest: tidy various Rover autotests
autotest: tidy Sprayer test

autotest: tidy rover AC_Avoidance test

autotest: tidy rover ModeSwitch test

autotest: tidy rover AuxModeSwitch

autotest: tidy rover RCOverrides test

autotest: tidy rover MANUAL_CONTROL test

autotest: tidy rover PolyFenceObjectAvoidance test
2024-07-26 23:43:16 +10:00
Peter Barker 1f60ca3342 autotest: add SmartRTL test for rapid switch between smartrtl and althold 2024-07-26 20:11:05 +10:00
Peter Barker 82d59f6ba7 autotest: tidy various tests to take advantage of new infrastructure
autotest: clean MotorVibration test for new infrastructure

autotest: clean VisionPosition test for new infrastructure

autotest: clean MotorFail test for new infrastructure

autotest: clean OpticalFlowLimits test for new infrastructure

autotest: tidy OpticalFlow test for new infrastructure

autotest: tidy SetModeViaModeSwitch test for new infrastructure

autotest: tidy SetModesViaAuxSwitch test for new infrastructure

autotest: tidy SplineLastWaypoint test for new infrastructure

autotest: tidy PIDNotches test for new infrastructure

autotest: tidy ThrottleGainBoost test for new infrastructure

autotest: tidy PrecisionLoiterCompanion test for new infrastructure

autotest: tidy BeaconPosition test for new infrastructure
2024-07-26 20:10:49 +10:00
Clyde McQueen cbef094435 autotest: test mag fusion 2024-07-25 10:52:01 +10:00
Clyde McQueen 872cbc72ff autotest: MAV_CMD_DO_REPOSITION in sub 2024-07-25 10:44:16 +10:00
Luca Pescante 9acd23d196 autotest: use RC6 for tuning 2024-07-25 09:40:13 +10:00
Peter Barker bedc76e0e8 autotest: tidy various tests to take account of new framework capabilities
autotest: simplify AutoDock test

autotest: tidy AP_Proximity_MAV test

autotest: tidy DriveSquare test

autotest: tidy BatteryFailsafe test

autotest: tidy GPSViconSwitching test

autotest: tidy RangeFinder test
2024-07-24 17:01:26 +10:00
Andy Piper 0b6a1f4fe7 autotest: test for circle exclusion fence using AUTOENABLE=2 2024-07-24 08:24:06 +10:00
Andy Piper b7ce3ff286 autotest: add test for minimum altitude avoidance fence 2024-07-24 08:24:06 +10:00
Andy Piper e30dc2c536 autotest: fix fence autotests
add Plane.FenceMinAltEnableAutoland
test that vehicle can be landed manually after descending below fence floor
2024-07-24 08:24:06 +10:00
Andy Piper c216536a94 autotest: test aborted landing with fence correctly 2024-07-24 08:24:06 +10:00
Andy Piper cedccdb8fe autotest: add test for auto-disabling min alt fence breaches on disarming
clean-up fence manipulation functions and add test for auto-enablement on copter
update tests to have some FENCE_ENABLE tests
add avoidance minimum and maximum altitude fence
add fence switch test while flying
add FenceAutoEnableDisableSwitch for auto mode 2
add more scenarios for plane fence auto-enable
validate fence rc switch behaviour
check fence autoenable by taking off in guided mode
more FENCE_AUTOENABLE tests
add FenceEnableDisableAux and FenceMinAltAutoEnableAbort
2024-07-24 08:24:06 +10:00
Rhys Mainwaring 0272f59d0c Tools: autotest: add rover-omni3mecanum
- Add frame rover-omni3mecanum.
- Remove params with default values.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2024-07-23 13:27:04 +10:00
Peter Barker 57d6815124 autotest: add Mount test for relative yaw 2024-07-21 19:52:10 +10:00
Peter Barker aab1ae4018 autotest: test Solo mount 2024-07-20 22:44:10 +10:00
Stephen Dade 8674bb84a6 Tools: Add skid steering motorboat 2024-07-20 19:10:09 +10:00
Peter Barker 6eeaa10b7e Tools: add test for final-yaw behaviour in Auto mode RTL 2024-07-20 19:03:48 +10:00
Peter Barker 9c10e64168 Tools: add documentation for SIM_ACC?_RND parameters 2024-07-20 13:43:44 +10:00
Peter Barker 2f0f7aa669 autotest: tidy Copter flip test 2024-07-20 09:57:55 +10:00
Peter Barker 8dcd3986c7 autotest: correct uploading of exclusion circles 2024-07-17 08:33:44 +10:00
Peter Barker 1de60a31b0 autotest: rename do_reposition to send_do_reposition 2024-07-17 08:33:44 +10:00
Iampete1 49e77718ac Tools: autotest: Copter: add battery unhealthy prearm and failsafe test 2024-07-14 17:11:47 +10:00
Willian Galvani bd27edc9f5 autotest: test mag fusion and origin backup
Co-authored-by: Clyde McQueen <clyde@mcqueen.net>
2024-07-11 14:17:54 -03:00
Peter Barker 69c76a96d3 autotest: reboot after any context in which a reboot was done
this makes the assumption that any reboot done within a SITL was because some parameter changes only take effect after a reboot.

... so after we have reverted the parameters, reboot again to make the reverted parameter values take effect
2024-07-09 16:48:29 +10:00
Peter Barker 0cf357eb51 autotest: increase timeout for GCSMission upload test
MAVProxy may not have gotten all of the waypoints uploaded in 5 seconds.
2024-07-09 16:48:29 +10:00
Peter Barker 11e49c5528 autotest: add test for entering loiter after auto in RC failsafe 2024-07-09 10:52:14 +10:00
Peter Barker a110c9c39f autotest: add tests for onboard file log validity 2024-07-09 10:40:08 +10:00
Peter Barker 91b2d0dcdf autotest: fix race condition in DataFlashOverMAVLink test
we're running at large speedups; 5 simulated seconds might not be enough time for MAVProxy to accumulate statistics.  So get MAVProxy to emit the rate each second instead
2024-07-08 23:20:41 +10:00
Peter Barker 3ca15b23b9 autotest: param_metadata: add jerk as a known unit 2024-07-08 23:04:12 +10:00
Peter Barker 96a78456bf autotest: reboot after reverting rangefinder settings
Co-authored-by: Thomas Watson <twatson52@icloud.com>

Thomas noted that tests prior to RngFndQuality were leaving a LUA rangefinder hanging around in https://github.com/ArduPilot/ardupilot/pull/27484

Thomas' patch fixes RngFndQuality to only collect context messages after a reboot, which will fix the problem.

But tests should *not* leave the vehicle in this state, so this patch fixes that.
2024-07-08 14:36:10 +10:00
George Zogopoulos 2cd5413b0d SITL: Documented SIM_WIND_DIR_Z 2024-07-03 18:13:11 +10:00
Bill Geyer b03203c612 Tools: heli autotune autotest save gains and add tune check 2024-07-01 22:57:55 -04:00
bnsgeyer b1b4ddea94 Tools: update heli autotune autotest 2024-07-01 22:57:55 -04:00
Peter Barker e2ef47b221 autotest: break out a run_replay method 2024-07-02 11:05:40 +10:00
Peter Barker eb539f2c4a autotest: allow message hooks to be instances of a MessageHook class
allows state to be encapsulated within the object rather than simply in the same scope / closure of the method being called.

Will allow easier re-use of these blocks
2024-07-02 11:05:40 +10:00
Peter Barker 0c7a527ad3 autotest: add test infrastructure for installing lua modules 2024-07-02 11:05:40 +10:00
Peter Barker 3a23cf7144 autotest: add option to ingore RTL mode change during in auto mode
Plane emits a heartbeat with RTL in it when doing a DO_LAND_START
2024-07-02 11:05:40 +10:00
Peter Barker 1dae1fe7df autotest: add get_mode_string_for_mode 2024-07-02 11:05:40 +10:00
Peter Barker 744da0aec7 autotest: add a home_relative_loc_neu method 2024-07-02 11:05:40 +10:00
Peter Barker bac008d51c autotest: tidy pre_arm_checks 2024-07-02 09:56:40 +10:00
Peter Barker 98068e481e autotest: correct places using print rather than progress 2024-07-01 16:58:25 +10:00
bnsgeyer 2809b160ae Tools: update heli-dual params 2024-06-30 18:21:21 -04:00
Andrew Tridgell 060818a0e1 Tools: fixed default glider parameters 2024-06-30 10:02:15 +10:00
Peter Barker 9d7c8277a4 autotest: make WaitAndMaintainEKFFlags progress nicer 2024-06-28 17:06:23 +10:00
Thomas Watson ad7270f682 autotest: add serial loopback test script
Tests that data can flow both ways with one end using protocol 28
(Scripting) and the other using the serial device feature.
2024-06-27 12:00:18 +10:00
Peter Barker c388943f52 autotest: remove pointless try/except in PayloadPlaceMission 2024-06-26 19:19:19 +10:00
Peter Barker a77a0c22a7 autotest: add test for logged script statistics 2024-06-25 11:07:07 +10:00
Peter Barker 6bb0709b22 Tools: add Copter flight option for requiring position to arm 2024-06-25 11:06:10 +10:00
Peter Barker b841f5517e autotest: install multiple test scripts with one call 2024-06-24 12:46:40 +10:00
Peter Barker 75614b8c3b autotest: add basic sensor-health test for optical flow in Rover 2024-06-20 17:18:03 +10:00
Peter Barker 6aa662d5d0 autotest: tidy TestGripperMission
take advantage of new infrastructure
2024-06-19 13:48:25 +10:00
Peter Barker 35cb526241 autotest: add a test for gripper release on thrust loss 2024-06-19 13:48:25 +10:00
Peter Barker 47625e693e autotest: test guided attitude control with no GPS 2024-06-11 14:17:10 +10:00
Peter Barker 470663b30b autotest: add test for simulated Copter clamp 2024-06-11 09:56:43 +10:00
Peter Barker 81e08b16c9 autotest: remove test for mount_control mavlink message
no longer compiled in by default
2024-06-11 09:37:56 +10:00
Peter Barker 364452ffc8 autotest: add test for DroneCAN battery handling 2024-06-11 09:31:46 +10:00
Peter Barker 3c2f7944eb autotest: test SBP2 as part of GPSTypes check 2024-06-11 09:29:14 +10:00
Peter Barker 7cf96fb0a1 autotest: add a lineno method
allows for debug like this:

print(f"{self.lineno()} {self.mav.message_hooks=}")
2024-06-10 07:04:40 +10:00
Peter Barker 2a964c44d4 autotest: copy message hooks while iterating over them for removal
won't remove a number of entries from the end of the list if others have been removed
2024-06-10 07:04:40 +10:00
Paul Riseborough 5c76e77c11 autotest: Reduce time threshold used in plane deadreckoning test 2024-06-09 14:25:02 +10:00
Andrew Tridgell 09623f46e8 autotest: enable LOG_REPLAY in deadreckoning test 2024-06-09 14:25:02 +10:00
Paul Riseborough b17e189473 Tools: update AHRS_OPTIONS for dead reckoning test 2024-06-09 14:25:02 +10:00
Paul Riseborough 19f6b2d6d6 Tools: relax req accuracy for plane dead reckoning when not using airspeed 2024-06-09 14:25:02 +10:00
Paul Riseborough 9d2b05840b Tools: Disable DCM fallback for plane dead reckoning tests 2024-06-09 14:25:02 +10:00
Paul Riseborough 87a867ee2e Tools: Use GPS jamming option in EKF dead reckoning autotests 2024-06-09 14:25:02 +10:00
Paul Riseborough 8639543cdd Tools: Allow dead reckoning test longer to learn wind if no aspd sensor 2024-06-09 14:25:02 +10:00
Paul Riseborough 2b027a7265 Tools: re-work copter and plane loss of GPS auto tests
Explicitly test time taken to reset to GPS loss and regain of lock for copter without and plane with dead reckoning assistance.
2024-06-09 14:25:02 +10:00
Peter Barker 3ede599cfd autotest: clarify AutoTuneSwitch test 2024-06-09 09:53:08 +10:00
Peter Barker 2c3594b8ff autotest: revert SIM_SPEEDUP for RTL in follow test 2024-06-09 09:09:31 +10:00
Peter Barker 56a865147d autotest: ModeFollow: correct relative altitude being fed to autopilot 2024-06-09 09:09:00 +10:00
Peter Barker eaf5767bfa autotest: simplify AC_Avoidance_Proximity test
take advantage of new infrastructure
2024-06-09 09:08:29 +10:00
George Zogopoulos 396865223f autotest: Removed unnecessary parameter whitelist item 2024-06-05 19:03:31 +10:00
Tom Pittenger ad006de914 locations: add Madera and Peg 2024-06-04 09:22:53 -06:00
Peter Barker f9a22458e2 autotest: disable autotest for MAV_CMD_NAV_SET_YAW_SPEED 2024-06-03 09:47:57 +10:00
Ethan Nguyen 2082ecbedd Tools: (autotest) add UCSB location.txt 2024-05-31 17:20:52 -07:00
Michael du Breuil 15bb86ded9 Tools: Do not emit __field_text in JSON parameter documentation
__field_text is basically the raw parsed text, and is used internally
but as far as I can tell it was never meant for external usage, the JSON
emitter already removes other fields that were not intended to be there.
By including the __field_text entry we were doubling the size of the
emitted documentation
2024-05-31 13:33:24 +10:00
Peter Barker c6a239ef63 autotest: correct Valgrind error detection 2024-05-31 13:23:03 +10:00
Peter Barker ac7629c546 autotest: fold close method into sole caller
we're missing the non-zero-valgrind-logs-means-failure check somehow
2024-05-31 13:23:03 +10:00
Peter Barker bdb84ed244 autotest: add test for Guided WeatherVane behaviour 2024-05-29 13:11:58 +10:00
Peter Barker 5fe4fec6ab autotest.py: remove unused frame parameter 2024-05-28 17:39:08 +10:00