Skip to content

Commit

Permalink
autotest: added CopterTailsitter test
Browse files Browse the repository at this point in the history
test rearward rangefinder
  • Loading branch information
tridge committed Sep 13, 2024
1 parent 83cac93 commit fc2f518
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Tools/autotest/default_params/quadplane-copter_tailsitter.parm
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,17 @@ Q_A_RAT_YAW_I 0.039192
Q_A_RAT_YAW_IMAX 0.500000
Q_A_RAT_YAW_P 0.391919
Q_TRANS_DECEL 8

# setup rangefinder for tailsitter
SIM_SONAR_ROT 4
SIM_SONAR_SCALE 10
RNGFND1_TYPE 100
RNGFND1_PIN 0
RNGFND1_SCALING 10
RNGFND1_MIN_CM 10
RNGFND1_MAX_CM 5000
RNGFND1_ORIENT 12
RNGFND_LANDING 1
RNGFND_LND_ORNT 12


19 changes: 19 additions & 0 deletions Tools/autotest/quadplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,24 @@ def Tailsitter(self):
raise NotAchievedException("Changed throttle output on mode change to QHOVER")
self.disarm_vehicle()

def CopterTailsitter(self):
'''copter tailsitter test'''
self.customise_SITL_commandline(
[],
defaults_filepath=self.model_defaults_filepath('quadplane-copter_tailsitter'),
model="quadplane-copter_tailsitter",
wipe=True,
)

self.reboot_sitl()
self.wait_ready_to_arm()
self.takeoff(60, mode='GUIDED')
self.context_collect("STATUSTEXT")
self.progress("Starting QLAND")
self.change_mode("QLAND")
self.wait_statustext("Rangefinder engaged")
self.wait_disarmed(timeout=100)

def setup_ICEngine_vehicle(self):
'''restarts SITL with an IC Engine setup'''
model = "quadplane-ice"
Expand Down Expand Up @@ -1812,6 +1830,7 @@ def tests(self):
self.QAssist,
self.GyroFFT,
self.Tailsitter,
self.CopterTailsitter,
self.ICEngine,
self.ICEngineMission,
self.MAV_CMD_DO_ENGINE_CONTROL,
Expand Down

0 comments on commit fc2f518

Please sign in to comment.