Skip to content

Instantly share code, notes, and snippets.

View dbaldwin's full-sized avatar

Dennis Baldwin dbaldwin

View GitHub Profile
@dbaldwin
dbaldwin / gist:4009f1957da16890b55c6d94a2a4ab5b
Created June 6, 2016 14:09
DronePan yaw did not complete
D: 2016/06/06 09:03:23:364 [com.apple.main-thread/1780979] FlightController flightController(_:didUpdateSystemState:) line: 159 Current heading 0.0
D: 2016/06/06 09:03:23:466 [com.apple.main-thread/1780979] FlightController flightController(_:didUpdateSystemState:) line: 159 Current heading 0.0
D: 2016/06/06 09:03:23:564 [com.apple.main-thread/1780979] FlightController flightController(_:didUpdateSystemState:) line: 159 Current heading 0.0
D: 2016/06/06 09:03:23:660 [com.apple.main-thread/1780979] FlightController flightController(_:didUpdateSystemState:) line: 159 Current heading 0.0
D: 2016/06/06 09:03:23:780 [com.apple.main-thread/1780979] FlightController flightController(_:didUpdateSystemState:) line: 159 Current heading 0.0
D: 2016/06/06 09:03:23:781 [com.apple.main-thread/1780979] FlightController flightController(_:didUpdateSystemState:) line: 159 Current heading 0.0
D: 2016/06/06 09:03:23:871 [com.apple.main-thread/1780979] FlightController flightController(_:didUpdateSystemState:) line: 159 Current
@dbaldwin
dbaldwin / gist:a2af9bd260692c2d894e31805a4cc9fe
Created June 6, 2016 16:57
DronePan yaw to with speed of 45
D: 2016/06/06 11:55:56:429 [com.apple.main-thread/1790726] FlightController flightController(_:didUpdateSystemState:) line: 173 Current heading 0.0
D: 2016/06/06 11:55:56:508 [com.apple.main-thread/1790726] FlightController flightController(_:didUpdateSystemState:) line: 173 Current heading 0.0
D: 2016/06/06 11:55:56:609 [com.apple.main-thread/1790726] FlightController flightController(_:didUpdateSystemState:) line: 173 Current heading 0.0
D: 2016/06/06 11:55:56:711 [com.apple.main-thread/1790726] FlightController flightController(_:didUpdateSystemState:) line: 173 Current heading 0.0
D: 2016/06/06 11:55:56:811 [com.apple.main-thread/1790726] FlightController flightController(_:didUpdateSystemState:) line: 173 Current heading 0.0
D: 2016/06/06 11:55:56:928 [com.apple.main-thread/1790726] FlightController flightController(_:didUpdateSystemState:) line: 173 Current heading 0.0
D: 2016/06/06 11:55:57:018 [com.apple.main-thread/1790726] FlightController flightController(_:didUpdateSystemState:) line: 173 Current
@dbaldwin
dbaldwin / gist:a86d3a24638108e055eb9d57b50b12e8
Created June 6, 2016 17:55
DronePan yaw with negative speed
D: 2016/06/06 12:53:43:680 [com.apple.main-thread/1797325] FlightController flightController(_:didUpdateSystemState:) line: 197 Current heading 0.0
D: 2016/06/06 12:53:43:783 [com.apple.main-thread/1797325] FlightController flightController(_:didUpdateSystemState:) line: 197 Current heading 0.0
D: 2016/06/06 12:53:43:883 [com.apple.main-thread/1797325] FlightController flightController(_:didUpdateSystemState:) line: 197 Current heading 0.0
D: 2016/06/06 12:53:43:998 [com.apple.main-thread/1797325] FlightController flightController(_:didUpdateSystemState:) line: 197 Current heading 0.0
D: 2016/06/06 12:53:44:106 [com.apple.main-thread/1797325] FlightController flightController(_:didUpdateSystemState:) line: 197 Current heading 0.0
D: 2016/06/06 12:53:44:196 [com.apple.main-thread/1797325] FlightController flightController(_:didUpdateSystemState:) line: 197 Current heading 0.0
D: 2016/06/06 12:53:44:295 [com.apple.main-thread/1797325] FlightController flightController(_:didUpdateSystemState:) line: 197 Current
@dbaldwin
dbaldwin / gist:6e413d4eb104da08a97dd87df7c2b8ab
Created July 6, 2016 16:21
DronePan I1 Gimbal Yaw Branch - Testing AC Yaw
I: 2016/07/06 11:09:16:334 [com.apple.main-thread/164807] AppDelegate application(_:didFinishLaunchingWithOptions:) line: 50 DronePan launched
I: 2016/07/06 11:09:16:343 [com.apple.main-thread/164807] AppDelegate application(_:didFinishLaunchingWithOptions:) line: 53 Running version 1.4.3(10)
I: 2016/07/06 11:09:16:429 [com.apple.main-thread/164807] MainViewController viewWillAppear line: 99 Showing main window
D: 2016/07/06 11:09:16:610 [com.apple.main-thread/164807] ConnectionController sdkManagerDidRegisterAppWithError line: 82 Connecting to product
I: 2016/07/06 11:09:16:612 [com.apple.main-thread/164807] MainViewController sdkRegistered() line: 313 Registered
D: 2016/07/06 11:09:16:613 [com.apple.main-thread/164807] ConnectionController sdkManagerDidRegisterAppWithError line: 90 Connecting to real product
I: 2016/07/06 11:10:05:472 [com.apple.main-thread/164807] AnalyticsUtils info line: 83 GoogleAnalytics 3.15 -[GAIReachabilityChecker reachabilityFlagsChanged:] (GAIReachabilityChecker.m:159): Reachabili
@dbaldwin
dbaldwin / takeoff_and_land.py
Created August 5, 2016 21:46
Basic takeoff to 20m and land with DroneKit, Raspberry Pi and Pixhawk
from dronekit import connect, VehicleMode, LocationGlobalRelative
from pymavlink import mavutil
import time
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--connect', default='127.0.0.1:14550')
args = parser.parse_args()
# Connect to the Vehicle
@dbaldwin
dbaldwin / change_flight_mode.py
Created August 5, 2016 22:26
Basic script to change flight mode to STABILIZE with DroneKit
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
@dbaldwin
dbaldwin / undistort.py
Last active August 8, 2016 21:25
Basic script to undistort wide angle photo taken by Phantom 4 for use in Open Drone Map
# Original howto article: http://www.janeriksolem.net/2014/05/how-to-calibrate-camera-with-opencv-and.html
# Original phantom 4 photos and calibrated output is here: https://www.dropbox.com/sh/w0cnw6u3b511eth/AACqFDhnvMAB3YTFRD_BZnONa?dl=0
# Read all about it in this ODM issue: https://github.com/OpenDroneMap/OpenDroneMap/issues/350
import numpy as np
import cv2
# The following parameters come from running the OpenCV calibrate.py script
K = np.array([[2365.85284, 0, 1970.24146],[0, 2364.17864, 1497.37745], [0, 0, 1]])
d = np.array([.0181517127, .134277087, 0, 0, 0])
D: 2016/09/16 16:57:45:253 [com.dronepan.queue.gimbal/246019] GimbalController setAttitude(_:pitch:yaw:roll:) line: 363 Setting attitude: count 0, pitch 0.0, yaw 0.0, roll 0.0
D: 2016/09/16 16:57:46:273 [com.dronepan.queue.gimbal/246119] GimbalController check(pitch:yaw:roll:) line: 287 Checking PA: true P: 0.0 CP: 0.0
D: 2016/09/16 16:57:46:274 [com.dronepan.queue.gimbal/246119] GimbalController check(pitch:yaw:roll:) line: 288 Checking YA: true Y: 0.0 CY: 173.8 CACY: 174.9 ACY: 173.8
D: 2016/09/16 16:57:46:274 [com.dronepan.queue.gimbal/246119] GimbalController check(pitch:yaw:roll:) line: 289 Checking RA: true R: 0.0 CR: 0.0
W: 2016/09/16 16:57:46:274 [com.dronepan.queue.gimbal/246119] GimbalController setAttitude(_:pitch:yaw:roll:) line: 420 Gimbal Controller setAttitude hasn't completed yet count: 0
D: 2016/09/16 16:57:46:274 [com.dronepan.queue.gimbal/246119] GimbalController setAttitude(_:pitch:yaw:roll:) line: 363 Setting attitude: count 1, pitch 0.0, yaw 0.0, roll 0.0
D: 2016/09/16 16:57:47:282 [com.
@dbaldwin
dbaldwin / gist:c8e7d8f3ae1defbc12798b3930628fcb
Last active October 25, 2016 19:51
Scott Dreslinski DronePan Crash
I: 2016/10/22 09:55:35:764 [com.apple.main-thread/5674922] AppDelegate application(_:didFinishLaunchingWithOptions:) line: 48 DronePan launched
I: 2016/10/22 09:55:35:769 [com.apple.main-thread/5674922] AppDelegate application(_:didFinishLaunchingWithOptions:) line: 51 Running version 1.5(1)
I: 2016/10/22 09:55:35:796 [com.apple.main-thread/5674922] MainViewController viewWillAppear line: 100 Showing main window
D: 2016/10/22 09:55:35:942 [com.apple.main-thread/5674922] ConnectionController sdkManagerDidRegisterAppWithError line: 85 Connecting to product
I: 2016/10/22 09:55:35:942 [com.apple.main-thread/5674922] MainViewController sdkRegistered() line: 321 Registered
D: 2016/10/22 09:55:35:942 [com.apple.main-thread/5674922] ConnectionController sdkManagerDidRegisterAppWithError line: 93 Connecting to real product
I: 2016/10/22 09:55:35:943 [com.apple.main-thread/5674922] AnalyticsUtils info line: 83 GoogleAnalytics 3.15 -[GAIReachabilityChecker reachabilityFlagsChanged:] (GAIReachabilityChecker.m:159): Reach
@dbaldwin
dbaldwin / gist:ca21c861fd6416ad18bf03dc3fc5689c
Created November 4, 2016 20:17
DronePan freezes when pano button is clicked
2016-11-04 15:13:09.668615 DronePan[1310:354287] [DYMTLInitPlatform] platform initialization successful
I: 2016/11/04 15:13:09:811 [com.apple.main-thread/354239] AppDelegate application(_:didFinishLaunchingWithOptions:) line: 48 DronePan launched
2016-11-04 15:13:09.815286 DronePan[1310:354281] I: 2016/11/04 15:13:09:811 [com.apple.main-thread/354239] AppDelegate application(_:didFinishLaunchingWithOptions:) line: 48 DronePan launched
2016-11-04 15:13:09.825005 DronePan[1310:354281] I: 2016/11/04 15:13:09:814 [com.apple.main-thread/354239] AppDelegate application(_:didFinishLaunchingWithOptions:) line: 51 Running version 1.5(15)
I: 2016/11/04 15:13:09:814 [com.apple.main-thread/354239] AppDelegate application(_:didFinishLaunchingWithOptions:) line: 51 Running version 1.5(15)
I: 2016/11/04 15:13:09:964 [com.apple.main-thread/354239] MainViewController viewWillAppear line: 96 Showing main window
2016-11-04 15:13:09.964533 DronePan[1310:354293] I: 2016/11/04 15:13:09:964 [com.apple.main-thread/354239] MainViewCo