Browse Source

autotest: added arming to the Rover autotesting.

mission-4.1.18
Grant Morphett 9 years ago committed by Andrew Tridgell
parent
commit
e1b608d56d
  1. 13
      Tools/autotest/apmrover2.py

13
Tools/autotest/apmrover2.py

@ -13,6 +13,16 @@ testdir=os.path.dirname(os.path.realpath(__file__)) @@ -13,6 +13,16 @@ testdir=os.path.dirname(os.path.realpath(__file__))
HOME=mavutil.location(40.071374969556928,-105.22978898137808,1583.702759,246)
homeloc = None
def arm_rover(mavproxy, mav):
# wait for EKF to settle
wait_seconds(mav, 15)
mavproxy.send('arm throttle\n')
mavproxy.expect('ARMED')
print("ROVER ARMED")
return True
def drive_left_circuit(mavproxy, mav):
'''drive a left circuit, 50m on a side'''
mavproxy.send('switch 6\n')
@ -142,6 +152,9 @@ def drive_APMrover2(viewerip=None, map=False): @@ -142,6 +152,9 @@ def drive_APMrover2(viewerip=None, map=False):
mav.wait_gps_fix()
homeloc = mav.location()
print("Home location: %s" % homeloc)
if not arm_rover(mavproxy, mav):
print("Failed to ARM")
failed = True
if not drive_mission(mavproxy, mav, os.path.join(testdir, "rover1.txt")):
print("Failed mission")
failed = True

Loading…
Cancel
Save