Created
August 5, 2016 22:26
-
-
Save dbaldwin/ba2057c09244957b84c834aa726f03ee to your computer and use it in GitHub Desktop.
Basic script to change flight mode to STABILIZE with DroneKit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dronekit import connect, VehicleMode | |
# Parse connection args | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--connect', default='127.0.0.1:14550') | |
args = parser.parse_args() | |
# Connect to vehicle | |
print 'Connecting to vehicle on: %s' % args.connect | |
vehicle = connect(args.connect, baud=57600, wait_ready=True) | |
# Change vehicle flight mode | |
print("Changing flight mode to stabilize") | |
vehicle.mode = VehicleMode("STABILIZE") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment