All Projects → gabrieloc → QuadKit

gabrieloc / QuadKit

Licence: BSD-3-Clause license
Communicate with your Quadcopter from a native app

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to QuadKit

Starrypilot
A lightweight autopilot software for Pixhawk
Stars: ✭ 243 (+575%)
Mutual labels:  quadcopter, drones
Swarms
The ultimate node.js library for controlling Bitcraze Crazyflie 2.0 drones
Stars: ✭ 11 (-69.44%)
Mutual labels:  quadcopter, drones
sbus
Arduino and CMake library for communicating with SBUS receivers and servos.
Stars: ✭ 277 (+669.44%)
Mutual labels:  drones
QUICKSILVER
Flight Controller Firmware
Stars: ✭ 45 (+25%)
Mutual labels:  quadcopter
ublox
Arduino and CMake library for communicating with uBlox GPS receivers.
Stars: ✭ 89 (+147.22%)
Mutual labels:  drones
specification
The Cyphal specification documents are maintained here.
Stars: ✭ 38 (+5.56%)
Mutual labels:  drones
AirPose
This repository contains the code of AirPose, our multi-view fusion network for Human Pose and Shape Estimation method
Stars: ✭ 39 (+8.33%)
Mutual labels:  drones
unity-drones-multiplayer
Enable multiple players to connect to the same enrironment (UNET), fly a drone, and watch others fly their drones
Stars: ✭ 30 (-16.67%)
Mutual labels:  drones
AutonomousPrecisionLanding
Precision landing on a visual target using OpenCV and dronekit-python
Stars: ✭ 31 (-13.89%)
Mutual labels:  drones
source x
Open Source Giant FPV Racing Drone Frame
Stars: ✭ 19 (-47.22%)
Mutual labels:  drones
pyuavcan
Python implementation of the Cyphal protocol stack.
Stars: ✭ 91 (+152.78%)
Mutual labels:  drones
safe-control-gym
PyBullet CartPole and Quadrotor environments—with CasADi symbolic a priori dynamics—for learning-based control and RL
Stars: ✭ 272 (+655.56%)
Mutual labels:  quadcopter
aruco-geobits
geobits: ArUco Ground Control Point Targets and Detection for Aerial Imagery (UAV/MAV).
Stars: ✭ 32 (-11.11%)
Mutual labels:  drones
hardware
PCB designs for the Waterloo Aerial Robotics Group
Stars: ✭ 42 (+16.67%)
Mutual labels:  drones
RaspberryPilot
RaspberryPilot
Stars: ✭ 31 (-13.89%)
Mutual labels:  quadcopter
DroneDB
Free and open source software for aerial data storage.
Stars: ✭ 74 (+105.56%)
Mutual labels:  drones
CDTM-Deep-Learning-Drones
Course Material for CDTM Deep Learning Drones Course
Stars: ✭ 23 (-36.11%)
Mutual labels:  drones
bme280
Arduino and CMake library for communicating with the Bosch Sensortec BME280 environmental sensor.
Stars: ✭ 21 (-41.67%)
Mutual labels:  drones
PyODM
A Python SDK for adding aerial image processing capabilities to your applications 🔌
Stars: ✭ 70 (+94.44%)
Mutual labels:  drones
LaunchPadFlightController
TM4C123G based Flight Controller
Stars: ✭ 62 (+72.22%)
Mutual labels:  quadcopter

QuadKit

A simple set of interfaces for communicating with your Wi-Fi enabled quadcopter.

QuadKit powers SCARAB, an RC controller for iOS. Read about the making of QuadKit: Building a Quadcopter Controller for iOS and Open-Sourcing the Internals

Carthage compatible

Installation

Add this to your Cartfile: github "gabrieloc/QuadKit"

To test the examples, make sure Carthage is installed, then run:

carthage update

Integration

Ensure any project using this framework includes QuadKit.framework and SwiftSocket.framework as embedded binaries.

To connect to your quadcopter, create an instance of QuadClient and call -connect:. Ensure that your device has been connected to the Wi-Fi network created by your quadcopter, before attempting to connect. Once a connection has been established, the client expects to be passed an InputState object via -updateInput:, in response to user interaction.

Example

let client = QuadClient()
let inputState = InputState()
let thrustControl = UIControl()

func connectClient() {
	if let error = client.connect() {
		// Error connecting
	}
	thrustControl.enabled = true
}

func thrustControlTouched(_ thrustControl: UIControl) {
	inputState.thrust = thrustControl.selected ? 1.0 : 0.0
	client.updateInput(with inputState)
}

iOS and macOS samples can be found inside the Examples/ directory.

Contributing

While the format for input data appears to be generic across models (needs to be verified), it's possible that handshake data isn't. For this reason, BindingSupport defines a protocol QuadcopterModel, which individual models can use for providing this data.

Handshake data can be found by running a tool like tcpdump or Wireshark to get a packet trace, and collecting the first few packets your device sends your quadcopter in the software provided by it's manufacturer.

Example

  1. Connect your device via USB and create a RVI: $ rvictl -s (DEVICE UDID)
  2. Ensure the remote interface was created by running: $ ifconfig -l and verifying rvi0 exists
  3. Turn on your quadcopter and join it's Wi-Fi network
  4. In a tool like Wireshark, begin capturing rvi0
  5. Open the software provided by your quadcopter's manufacturer and access the input controls
  6. Stop capturing and find what looks like identification data. It should consistently look the same every time you try to connect the app, and will appear before you begin receiving any form of input or video data
  7. Create a new class in QuadKit representing your quadcopter model, and have it adopt QuadcopterModel
  8. In your class' implementation of -identification, return the data your recorded in the form of byte arrays

Reference

Apple provides step by step instructions for creating using various network debugging tools: Technical Q&A QA1176: Getting a Packet Trace.

For more information on the protocol, refer to Jim Hung's Hubsan X4 H107L Quadcopter Control Protocol Specification, or his excellent reverse engineering series, Reverse Engineering a Hubsan X4 Quadcopter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].