• Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    Rust
  • Created over 5 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🚀 👾 A Drone/UAV Programming Library for Rust.

🚀 👾 U.F.O: Universal Flying Objects

ufo dependency status Gitter chat

A Drone/UAV/Quadcopter/RC Plane programming library for Rust.

FYI: this is still a WIP, the traits and structs exist, but examples and documentation are lacking... Proceed with caution.

NOTE: I broke my only quadcopter. When I get a new one, I will continue to work on this library. Until then I will accept pull requests and issues, but no active development will happen.

Goals

  1. Build an extensible modular library that can support an infinite number of UAVs.
  2. Handle as much of the boiler plate as possible. (Things just work)
  3. Low Latency Between Drone and Controller

Non-Goals

  • Implement A UI for controlling UAVs (NOTE: I may decide to build a UI later on, but it will be in its own repository)
    • For controlling the drones using a keyboard checkout mothership
  • Support other types of robotics/RCs, right now this crate is for RC Drones and Planes. This may change at a later date, but not right now.

Supported drones

Right now UFO supports the following drones:

  • JJRC H61

Feel free to implement controls for your own drone and submit it in a pull request.

Installation and usage

Add this to your Cargo.toml

[dependencies]
ufo_rs = "*"

And put something like this in src/main.rs

/// Import std stuff
use std::error::Error;
use std::time::Duration;
use std::thread;

// Import traits
use ufo_rs::traits::control::*;
use ufo_rs::traits::drone::*;

// Import controller
use ufo_rs::drones::jjrc::h61;

fn main() -> Result<(), Box<dyn Error>> {
    let delay = Duration::from_millis(2000);

    // Create a new drone driver
    let mut driver = h61::Driver::new();

    // Connect to drone
    driver.connect()?;

    // Calibrate drone 

    println!("Calibrating...");

    driver.calibrate()?;

    println!("Sent!");

    // Wait 2 seconds
    thread::sleep(delay);
    
    // Take off
    println!("Taking off...");

    driver.take_off()?;

    println!("Sent!");

    // Wait again for 1 second
    thread::sleep(Duration::from_millis(1000));

    // Land
    println!("Landing...");

    driver.land()?;
    
    println!("Sent!");


    // Ta-dah!
    Ok(())
}

See the examples/ directory for more information.

Help out

If you want to help with U.F.O, we could use support in two areas:

  1. Writing Unit Tests, I want to make sure the U.F.O. is a safe and stable way to program drones. If we can find areas prone to bugs, we can build a more stable library quickly.
  2. Adding support for more drones. If you would like to help with this or to see an example, please take a look at src/drones/jjrc/h61.rs.

Inspiration:

Inspired by:

  • Gobot: Really cool robotics library for Go
  • A lack of a drone library for Rust
  • Flying things with code is fun 😄!

More Repositories

1

vim-deus

🌙 A better color scheme for the late night coder
Vim Script
765
star
2

merino

🐑 A SOCKS5 Proxy server written in Rust
Rust
431
star
3

stego

đŸĻ• stego is a steganographic swiss army knife.
Rust
265
star
4

bliss

Ignorance is bliss! Ignore your .gitignore
Rust
153
star
5

lor-axe

đŸĒ“ a multi-threaded, low-bandwidth HTTP DOS tool
Rust
93
star
6

tetanus

🐚 A proof-of-concept reverse-shell written in rust.
Rust
34
star
7

mothership

A way to controls drone using UFO.rs
Rust
11
star
8

vim-conf

📓 My vim files...
Vim Script
9
star
9

oxy

A Wayland window manager... WIP
Rust
5
star
10

cronic

A cron-enabled scheduler for running async Rust tasks and functions.
Rust
5
star
11

dotfiles

Every dev needs some dots
Python
4
star
12

laat

Arma 3 Mod Compiler
Rust
4
star
13

brutecorr

A O(n^2) algorithm for brute-forcing Pearson Correlation Coefficients
Rust
3
star
14

hanoi

⛩ī¸ An implementation of the Tower of Hanoi. Written in Rust.
Rust
2
star
15

shoco-rs

Rust bindings to shoco
Objective-C
2
star
16

roachcoach

A food truck simulator in VR
C#
2
star
17

bdd

💾 Bulk Data Duplicator (bdd)
Rust
2
star
18

MissileMania

🚀 A missile defense game for the HTC Vive!
C#
2
star
19

blog

Personal blog and website
HTML
2
star
20

rascii

Image to ASCII Converter.
Rust
2
star
21

winvec-rs

Windowed Vector (TTL) Collection for Rust
Rust
1
star
22

river

🌊 a scripting language for processing data steams.
Rust
1
star
23

zoraweb

A website for the discord bot build for you.
Vue
1
star
24

slackline

A CLI tool for creating Slack Team directories in various formats.
Rust
1
star
25

zipwhip_webhook_consumer

A Rust webserver to consumer - and respond to https://zipwhip.com webhooks.
Rust
1
star
26

zora

🤖 A discord bot built for you
JavaScript
1
star
27

boa

🐍 A proof of concept toolkit for wireless penetration testing in Python
Python
1
star
28

geometry-toolkit

A Toolkit containing geometric formulas written in Python
Python
1
star
29

primeval-rs

A monstrosity of a prime number generator
Rust
1
star
30

batterup

🔋A small tool to remind you when you should unplug and plug in your laptop. Written in Rust.
Rust
1
star
31

SpeedTAGS

🏃‍♀ī¸ A better use of CTAGS in VIM
Vim Script
1
star