Skip to content

Commit

Permalink
Autotest: Add AutoRTL test that results in dumpstack
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKear committed Jul 19, 2024
1 parent d9518ff commit 0ac8ac6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tools/autotest/ArduCopter_Tests/AutoRTLTest/mission.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
QGC WPL 110
0 1 0 16 0 0 0 0 -35.3632667 149.1652377 587.000000 1
1 0 3 22 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 30.000000 1
2 0 0 177 5.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.000000 1
3 0 3 189 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.000000 1
4 0 3 21 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.000000 1
5 0 3 16 0.00000000 0.00000000 0.00000000 0.00000000 -35.36321560 149.16522930 30.000000 1
6 0 3 189 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.000000 1
7 0 3 16 0.00000000 0.00000000 0.00000000 0.00000000 -35.36318090 149.16518670 30.000000 1
8 0 3 189 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.000000 1
9 0 3 16 0.00000000 0.00000000 0.00000000 0.00000000 -35.36321510 149.16514950 30.000000 1
10 0 3 21 0.00000000 0.00000000 0.00000000 0.00000000 -35.36326920 149.16515480 0.000000 1
20 changes: 20 additions & 0 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9714,6 +9714,25 @@ def AUTO_LAND_TO_BRAKE(self):
self.change_mode('AUTO')
self.wait_disarmed()

def AutoRTLTest(self):
'''testing an odd mission with do jumps and do land starts that has previously caused a dumpstack'''

self.load_mission('mission.txt')
self.customise_SITL_commandline([
"--home", self.sitl_home_string_from_mission("mission.txt"),
])

self.set_parameter('AUTO_OPTIONS', 3)
self.change_mode('AUTO')
self.wait_ready_to_arm()
self.arm_vehicle()

self.wait_altitude(10, 15, relative=True, timeout=60)
self.change_mode('AUTO_RTL')

self.wait_disarmed()


def MAVLandedStateTakeoff(self):
'''check EXTENDED_SYS_STATE message'''
ex = None
Expand Down Expand Up @@ -10802,6 +10821,7 @@ def tests2b(self): # this block currently around 9.5mins here
self.MAV_CMD_SET_EKF_SOURCE_SET,
self.MAV_CMD_NAV_TAKEOFF,
self.MAV_CMD_NAV_TAKEOFF_command_int,
self.AutoRTLTest,
])
return ret

Expand Down

0 comments on commit 0ac8ac6

Please sign in to comment.